Page 1 of 1

xmage error: could not find or load main class

PostPosted: 09 Nov 2016, 19:02
by killswitch69698
i have windows 10, newest version of java, re downloaded the launcher. i click open the launcher and get the said error. the code line to the file location is the right one. firewall/antivirus is not blocking it. help

Re: xmage error: could not find or load main class

PostPosted: 10 Nov 2016, 16:24
by LevelX
Seems that for some reason you try to execute the launcher jar without the option -jar.

So do the following:
1) Open a command window.
2) Set the current directory to the directory the launcher jar file is located.
3) If you enter now:
java -version
and push the enter key, the java version should be shown. So you're sure java is installed and available.
4) To start the launcher enter:
java -jar XMageLauncher-0.3.8.jar
and push the enter key, that should start the launcher. (So you're fine).
5) The error message you say you get now you would get if you enter:
java XMageLauncher-0.3.8.jar
and push enter. The difference is, that the "-jar" option is missing.

So it seems the definition that connects jar file to the java application is wrong on your system, not using the -jar option for opening jar files.

Re: xmage error: could not find or load main class

PostPosted: 14 Nov 2016, 22:09
by killswitch69698
these are picks of what happened, and my file directory

Re: xmage error: could not find or load main class

PostPosted: 18 Nov 2016, 13:20
by LevelX
You need to set the directory to the C:\Users\Griff\Desktop\Games\xmage directory before entering the commands.

If you are located to C:\Users\Griff\ enter cd Desktop to switch to that subdirectory. And so on until you are located in the xmage directory.

Also I edited the wrong "java -v" to the correct "java -version" in my post.


After that enter the commands written in my post and report the results.

Re: xmage error: could not find or load main class

PostPosted: 21 Nov 2016, 03:18
by killswitch69698
this was with my anti virus and firewall turned off btw, and sorry for the delay. dealing with midterms

Re: xmage error: could not find or load main class

PostPosted: 21 Nov 2016, 22:51
by LevelX
I misspelled the launcher name (I edited now in the old post).

So enter
java -jar XMageLauncher-0.3.8.jar
and it should work.

Re: xmage error: could not find or load main class

PostPosted: 23 Nov 2016, 23:55
by killswitch69698
thank you it worked! is there anyway to make it launch properly or will have to go into the cmd every time now

Re: xmage error: could not find or load main class

PostPosted: 24 Nov 2016, 15:22
by LevelX
killswitch69698 wrote:thank you it worked! is there anyway to make it launch properly or will have to go into the cmd every time now
So far I understand this, it's not the fault of xmage.

The problem is how your system tries to execute jar files if you click on them.
So you need to change/fix that to be able to start the xmage Launcher by clicking on the related icon.