command line TokenTool

Thoughts, Help, Feature Requests

Moderators: dorpond, trevor, Azhrei

Post Reply
Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

command line TokenTool

Post by Lee »

hello,

I somehow did something along the way and now tokentool (the latest one) won't start. i tried setting its default launcher to java, javaw, javaws but all return an error saying the main class could not be found. I cracked open the jar file and couldn't find it either though I think this is normal. I'd like to ask if there is a certain command line I should use in order to jumpstart the tool. Thanks :)

Edit: Perusing this forum a bit more, it seems I'm in the same boat as the last poster in this topic. Not knowing about the details of TT implementation, I'm at an impasse as to how to troubleshoot this. MT works just fine btw.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: command line TokenTool

Post by Phergus »

Are you saying that you got the same error message on the command line?

When you type in "java -version" on the command line what do you get?

If it was working and then stopped, what changed on your system?

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: command line TokenTool

Post by Lee »

I had to fix my path to the JRE. After that was done, java - version returns

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)


Running the TT jar from the command prompt returns

Could not find main class...(path to the jar)

Doing java TT.jar returns:

Exception in thread "main" java.lang.NoClassDefFoundError: tt/jar
Caused by: java.lang.ClassNotFoundException: tt.jar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: tt.jar. Program will exit.


I can't put my finger on what I changed. I've been working with MT exclusively for a month now. The last time I used TT was to create character tokens for my players. The only JRE I have left in the system is the jre6. I cleaned out jre7 but tokentool still functioned back then after the removal. Thanks.

Edit: I re-installed jre6 and got the webstart version of TT working. Standalone TT still returns the same error though and I've tried using a new extract downloaded from rptools.net.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: command line TokenTool

Post by Phergus »

Lee wrote:Doing java TT.jar returns:

Exception in thread "main" java.lang.NoClassDefFoundError: tt/jar
Caused by: java.lang.ClassNotFoundException: tt.jar
...
Could not find the main class: tt.jar. Program will exit.
Not quite the right command.

Code: Select all

javaw -jar tokentool-1.0.b28.jar
Any shortcut you had created would have to do the same thing.

If it won't start by double-clicking on the jar file then something has messed up the file association for .jar files.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: command line TokenTool

Post by Azhrei »

Well, the command line version should be java -jar TT.jar but it sounds like you tried that.

Since the main() function is in there, it must be either a command line issue or a Java installation issue.

And now that you've got the Web Start version working, it's clearly not a Java install issue (at least, not now). ;)

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: command line TokenTool

Post by Lee »

Thank you Phergus and Azhrei. After some insights stemming from your suggestions, I got TT standalone to run again. File associations were a mess indeed, and I did forget the -jar switch on the latter tries. Great help as always. This community is probably the best I've ever been part of with regard to spot on help :)

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: command line TokenTool

Post by Phergus »

Glad you got it worked out!

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: command line TokenTool

Post by neofax »

I made a batch file to start TokenTool:

Code: Select all

"C:\Program Files\Java\jre6\bin\javaw" -Xmx128M -jar tokentool-*.jar run
Image
Time-Zone information UTC -5

Post Reply

Return to “TokenTool”