Hi, I’m trying to get VASSAL set up for development on my mac. And could really use some help.
I’m following the wiki (vassalengine.org/wiki/doku.p … ipse_setup). I think I’ve done everything right, though the there are some slight differences between my platform and the one used on the wiki.
I’ve got the code checked out, and VASSAL.jar and cryptix32.jar from the web site. I also had to install miglayout-3.7-swing.jar.
Now I’m getting tons of can’t be resolved to a type errors. 1221 errors to be exact. One example I’ve looked at is in BrowserSupport.java. It is unable to resolve BrowserLauncher(). It looks like I’m missing a file. I’ve found BrowserLauncher on SourceForge, but I suspect I’m doing something wrong as the wiki doesn’t say anything about downloading anything beyond VASSAL.jar and cryptix32.jar.
Help?
Harry (completely new to Eclipse, did a lot of java coding back in '95 to '97 - wow that’s a long time ago)
In the VASSAL source tree is a folder named ‘lib-src’ that contains all the third-party .jar files (including BrowserLauncher). Just make sure they are all added to your classpath.
make worked pretty well (20 warnings, no errors). I’m not sure where to go from there. classes/VASSAL/launch looks promising but I haven’t had any luck there yet.
My next step is to get the program(s) to run. After checking out the code, I’ve cd’d to trunk/classes/VASSAL/launch then run java Main.class and java ModuleManager.class. Both complain about lack of a main(). The latter seems to work from eclipse, so I’m sure I’m missing one or more steps in getting things to run from the command line. I’d guess I’ll need to set the classpath too.
The Main class is deprecated. The only thing you’ll get if you run it
successfully is a dialog telling you that your entry point should be
ModuleManager.
The way I run from the command line is via a shell script:
Thank you. When I run the script (from trunk) I get
Exception in thread “main” java.lang.NoClassDefFoundError: gnu/getopt/LongOpt
at VASSAL.launch.LaunchRequest.parseArgs(LaunchRequest.java:199)
at VASSAL.launch.ModuleManager.main(ModuleManager.java:82)
I tried a couple of modifications to the classpath, and finally arrived at this, which almost works…
It’s weird that getopt had to be explicitly added.
But, I’m still not quite there. Executing the above prints my installed modules the the console 3 time, and does start VASSAL, but the program that starts has no windows and just the VASSAL menu on which only the About menu item works (even the Quit menu item doesn’t do anything).
The trunk is broken in various ways at the moment. I’m afraid that finding
workarounds will take about as long as fixing the problems, which I won’t
have time to do for a while (not until August). Since you’re just starting
out, I’d recommend working off the 3.1 branch instead until then.
I probalby should have suggested using the 3.1 branch from the outset;
sorry about that. (I’m having a hard time keeping everything in my head
right now, as I’m about 6 weeks away from finishing my dissertation.)
Im not a java developer! (C++) so the projects set up and compile is what is a real gray area for me.
Here is what I have done
Installed Eclipse & Subclipse
Installed the JDK
Checked out Vassal -src/Branches/3.1 & created a project
checked out lib-src/lib and lib-src/src
In the properties of the Package - Java Build Path I added all the jars in the lib-src/src and in the order and export tab i put the 3.1 first with the JRE next and then vassal.jar and crytix32 next followed by all the others from the src directory
Next I set the run config up as follows
main class = org.vassalengine.Main
inc sys lib checked
VM args = -Xmx256M
Classpath - This is where I think i messed up but Im not sure how.
Bootstrap - default (JRE)
User -
Folder V3.1 (name of my project)
folder V3.1
Vassal.jar
cryptix32.jar
… (all the other var files from lib-src/src)
however i get the following output
java.lang.SecurityException: class “VASSAL.configure.ValidityChecker”'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread “main”
Don’t bother about this step. These are the latest versions of the libraries, but are not necssarily suitable for a specific Vassal revision.
When you checked out the 3.1 project, it includes a sub-directory named lib. In there are all the libraries you need for 3.1. In 3.1, it includes 35 seperate Jar files, all of which must be in your classpath.
Same for other versions of Vassal - Each project includes its own lib directory withe the correct versions of the libraries for that release.
Clean that up, but now what do I run? I have tried a variety of the Vassal.launch but I dont get anything or I get a message stating this is an obsolete entry point.
Ok, So now you project is cleanly compiling, no error?
So, creating a debug configuration for the project (Say we called it Vassal-3.1),
A Config to run the Module Manager:
Main Tab:
Project: Vassal-3.1
Main Class: VASSAL.launch.ModuleManager
Arguments Tab:
None
JRE Tab:
A 1.5 or 1.6 JRE
ClassPath Tab:
Bootstrap Entries: jre
User Entries: Vassal-3.1 (default classpath)
Source Tab:
Default
However, this doesn’t get you far since when you try and edit or play a module, it runs outside the debuggger, so use this setup to debug the Editor Directly:
Main Tab:
Project: Vassal-3.1
Main Class: VASSAL.launch.Editor
Arguments Tab:
Program Arguments: --edit “D:\Vassal\Modules\Napoleonic Art of War\NaoW_v10.vmod”
The errors in dist/ant do not matter, you do not need these to run Vassal under the debugger in Eclipse. I don’t even bother to compile dist, In the Build Path → Source tab, I only have Vassal-3.1/src specified.
The first 3 errors are an OSX issue that can be fixed by following the instructions here: