Running on linux?

Thoughts, Help, Feature Requests

Moderators: Azhrei, dorpond, giliath

Post Reply
User avatar
coffeelove
Kobold
Posts: 9
Joined: Mon Mar 29, 2010 11:32 pm
Location: USA
Contact:

Running on linux?

Post by coffeelove »

Hey all, tried searching but couldn't find an answer, so here it goes.
Since theres no startup script i figured

Code: Select all

java dicetool-1.0.b34.jar
would work for launching it, but i get the following error.

Code: Select all

Exception in thread "main" java.lang.NoClassDefFoundError: dicetool-1/0/b34/jar
Caused by: java.lang.ClassNotFoundException: dicetool-1.0.b34.jar
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class: dicetool-1.0.b34.jar. Program will exit.

I am running OpenSuSE 11.2 with

Code: Select all

java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.2) (suse-5.10.1-i386)
OpenJDK Server VM (build 14.0-b16, mixed mode)


cpu: intel core2-quad w/ 4gb ram.

Any ideas how to fix this? Are there any options that I need to pass to java to get it running?

Thanks in advance.

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

Re: Running on linux?

Post by Azhrei »

Your best approach is to use Web Start.

Visit the main site and click on the Launch link in the toolbar. Then click the Customization link at the bottom of the page to see what the memory setup defaults to (and change it if you want something different). For MapTool it's a good idea to set the memory configuration, but the other tools don't deal with maps and so don't need nearly the amount of memory. Then click the link for the tool you wish to execute.

Your browser will download the resulting JNLP file and you can save it on your desktop. Double-click it to start the app. The first time you run it this way you need an Internet connection (to download the files). After that they will run out of the cache (although if you are online, a check is made to see if any of the libraries have been updated and new ones will be grabbed if so).

You can also attach the JNLP file and send it to others so they can use the same memory configuration. In order to execute it, they would double-click it just like you did.

Note that you must be using the Sun JRE -- the OpenJDK version of Java won't work.

If you insist on using the unpacked ZIP file, you can run JAR files by double-clicking on them from the desktop. Or, you can execute java -jar tokentool-*.jar from the command line.

User avatar
coffeelove
Kobold
Posts: 9
Joined: Mon Mar 29, 2010 11:32 pm
Location: USA
Contact:

Re: Running on linux? [solved]

Post by coffeelove »

Thanks for the info on the webstart options.

I had maptool running from the get go with the Launch script, it was just the DiceTool & TokenTool that I was having trouble with.

But the clicking on the .jnlp file gave me errors as well.

I had to specifically type out the path to javaws followed by the path to the file in the console.

Code: Select all

/usr/share/javaws ~/Download/DiceTool-10b34-512m-2m.jnlp &

That '&' in there is to launch the app in the background so I could still use that terminal, but it's not required.

All the tools seem to be working great now. Again, thanks for pointing me in the right direction.

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

Re: Running on linux?

Post by Azhrei »

In case someone else has this issue in the future, please describe which distribution and version of Linux you're using, which browser version, and which desktop environment.

Also, are you using OpenJDK or the Sun JRE?

It's weird that the MIME type for JNLP didn't invoke the Java Web Start launcher correctly. But that could an OpenJDK vs. Sun JRE issue.

You'll find that the networking in MapTool doesn't work correctly with OpenJDK. You have been warned. 8)

User avatar
coffeelove
Kobold
Posts: 9
Joined: Mon Mar 29, 2010 11:32 pm
Location: USA
Contact:

Re: Running on linux?

Post by coffeelove »

I am using the following:
OS: OpenSuSE 11.2 - Kernel 2.6.31.12-0.2-desktop SMP
Java: OpenJDK
Browser: Firefox 3.8
Desktop: KDE 4.3.5 rc3

I use the OpenJDK because I have issues getting the SunJRE to work with most applications for me. It's probably a configuration option somewhere that I just can't seem to find.

As far as the networking, it appears to be fine except it grabs the wrong interface sometimes.

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

Re: Running on linux?

Post by neofax »

Azhrei wrote:In case someone else has this issue in the future, please describe which distribution and version of Linux you're using, which browser version, and which desktop environment.

Also, are you using OpenJDK or the Sun JRE?

It's weird that the MIME type for JNLP didn't invoke the Java Web Start launcher correctly. But that could an OpenJDK vs. Sun JRE issue.

You'll find that the networking in MapTool doesn't work correctly with OpenJDK. You have been warned. 8)

JNLP didn't work in Ubuntu for me as well. I haven't tried Arch yet.

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

Re: Running on linux?

Post by Azhrei »

Probably the OpenJDK issue.

It's weird that the Sun JRE is having problems. I've heard that there were some issues when it was initially added to the Ubuntu repositories, but he's using SUSE. It might have something to do with /etc/alternatives preferring the open source OpenJDK instead of the not-so-open source Sun JRE.

If it works for you with OpenJDK, I wouldn't mess with it. But when it breaks and you want to try the Sun JRE again, you might try running update-alternatives. I think it has an "auto" option that grabs the latest versions of each item that has alternative implementations, but you'll want to check the docs first to be sure.

Since the OpenJDK sometimes chooses the wrong interface, and since MapTool doesn't (yet) have the selection of interface as an option, the only way I know of is to shutdown the interface when starting the MapTool server, then after the server is running re-enable the interface. :( And even this isn't 100% (or so I've heard).

User avatar
coffeelove
Kobold
Posts: 9
Joined: Mon Mar 29, 2010 11:32 pm
Location: USA
Contact:

Re: Running on linux?

Post by coffeelove »

I'm confused at my system right now. It's supposed to have the eth0 iface off, but it's showing up for some reason... Will play around with the hosts file & net config stuff tomorrow and post an update here if I get it straightened out.

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

Re: Running on linux?

Post by Azhrei »

I believe the JRE only checks the list of interfaces once, when the JRE is first started. After that you'll get the same device list over and over, even if one of them is brought down. If/when you try to use an interface that is down, the application would receive an exception. Hence my advice to do the interface up/down stuff prior to launching MapTool and the JRE.

Post Reply

Return to “DiceTool”