Page 1 of 1

Trouble with Java 6.38 x64 and tokentool

Posted: Mon Dec 17, 2012 5:49 am
by Provos
Greetings,
I am having trouble lauching tokentool. I am running window 7 64 bit and using JAVA (1.6.0_38). I can run MapTool with no issue and several other JAVA based programs. I have PATH and CLASSPATH set to "C:\Program Files\Java\jre6\bin;". When I double click on the tokentool-1.0.b28.jar file I get a popup that says

Code: Select all

Could not find the main class:
D:\Archive\RPTools\tokentool-1.0.b28.jar
Program will Exit
If I open the command prompt and type java -version I get the correct response. Anyone have any ideas?

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Mon Dec 17, 2012 9:44 am
by aliasmask
Should that ; be in your path? I'm uncertain of the details of how you run tokentool (did you create a bat file with path info?). Can you post your bat file or command line. There are some examples under MapTool that show which parameters to set for a batch file run for the java execution.

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Mon Dec 17, 2012 7:09 pm
by Provos
The path and classpath are enviroment variables that are set in windows to allow you to run (javac.exe, java.exe, javadoc.exe, and so on)from any directory without having to type the full path of the command. After setting these I usually just download the zip file, extract it to a folder and just double click on the jar file. I have never needed to do anything beyond that. That is why I have posted here.

Just an update none of the previous versions of tokentool work either.

I did edit the mt.cfg file to launch maptool. I have had this done for a while. I you could explain how I need to set up a batch file to run tokentool or point me to a post about how to do it that would be great.

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Mon Dec 17, 2012 7:44 pm
by Provos
I just went to the command prompt and to the directory with tokentool jar file. I the typed in "javaw -jar tokentool-1.0.b28.jar" and tokentool opened for me. I guess this is a way to do it for now.

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Mon Dec 17, 2012 7:55 pm
by Provos
OK so I made a batch file and it works. I never had to do that to get tokentool to run before. I am now going to sit in the corner with a dunce cap on.

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Wed Dec 19, 2012 3:38 pm
by Azhrei
If double-clicking the JAR doesn't work, there's a problem with the associations that your Windows environment is using. Normally, installing Java should create an association from the .JAR file type to the JVM being installed. Maybe something went wrong there.

Since it's Windows, my best recommendation would be to uninstall all versions of Java, reboot (have to do this to clear memory of DLLs), then install the Java you want to use. That should force the associations to be rebuilt and since all Java versions were gone, there shouldn't be any strange conflicts.

(If the command line and batch files work, there's clearly a problem with the GUI associations.)

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Wed Dec 19, 2012 11:57 pm
by Provos
It was a problem with the default program for .jar. I have no clue as to how it got changed on me. Thanks for the help.

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Sun Dec 23, 2012 2:22 pm
by Azhrei
I'm glad you got it working. :)

(I presume you just Shift-right-clicked on the JAR file and chose "Open With..." followed by the checkbox that says, "Always open with this program". Is that correct?)

Re: Trouble with Java 6.38 x64 and tokentool

Posted: Tue Dec 25, 2012 10:16 am
by Provos
I went into the registry and cleared jar then did the open with thing.