|
|
|
 |

March 5th, 2004, 06:17 PM
|
 |
Major General
|
|
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Quote:
Originally posted by mivayan:
I am not sure exactly how and why but I have experienced the problem of java not looking for class files in the current directory.
Try this: java -classpath D:\Strategy\dominions2\doc\CombatSim Fight militia militia
|
Thanks a lot for the suggestion!
BTW, from within the correct directory, you could probably type this:
java -cp . Fight militia militia
and get the same result. "." means current directory - it worked for me.
I don't remember how to permanently get it into Java's head that class files are found in the local directory, but I'll post it here if I find out.
|

March 5th, 2004, 06:34 PM
|
 |
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Quote:
Originally posted by Saber Cherry:
I don't remember how to permanently get it into Java's head that class files are found in the local directory, but I'll post it here if I find out.
|
Try setting the CLASSPATH variable at the system level to "." and see if that works.
|

February 22nd, 2005, 06:24 PM
|
 |
Major General
|
|
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Been a while, but a new version of the combat simulator is out - you can grab it here:
http://www.geocities.com/saber_marionette_cherry/
It fixes a bug that has made attack-defense rolls wrong since the last version
Sorry about that! It was a result of a speed-up tweak, and I don't know how it slipped by my QC, but somebody noticed it and emailed me about it. Unfortunately, I forgot who, but thanks, Mr. Mystery person!
|

February 26th, 2005, 10:01 PM
|
First Lieutenant
|
|
Join Date: Sep 2004
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
When I run this on Macintosh I get:
MAIN draco:~/Desktop/Combat_Simulator$ java Fight
Exception in thread "main" java.lang.UnsupportedClassVersionError: Fight (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :539)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:251)
at java.net.URLClassLoader.access$100(URLClassLoader. java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 89)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 35)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:302)
MAIN draco:~/Desktop/Combat_Simulator$ java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4)
Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)
MAIN draco:~/Desktop/Combat_Simulator$ uname -a
Darwin draco.local 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC Power Macintosh powerpc
So much for that whole "Write Once, Run Anywhere" idea. :-/
|

February 26th, 2005, 10:10 PM
|
 |
Major General
|
|
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Quote:
Zooko said:So much for that whole "Write Once, Run Anywhere" idea. :-/
|
This isn't the first time I had trouble with Macs. Before, I found out that Macs use a different director separator than Windows (Windows uses "\").
However, your problem is not OS-related, I think, but rather the fact that I compiled it in Java 5.0 and you are running it in Java 4.2. 5.0 makes some major changes.
Hopefully, if you go here:
http://java.sun.com/j2se/1.5.0/download.jsp
And click on this link: "Download JRE for Other Platforms"
And install it, it will run.
Edit. P.S. Thanks for posting the complete error message and version information!
|

February 26th, 2005, 10:20 PM
|
First Lieutenant
|
|
Join Date: Sep 2004
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Just checked, and there is no JRE 5.0 for Mac listed there.
|

February 26th, 2005, 10:20 PM
|
First Lieutenant
|
|
Join Date: Sep 2004
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Why don't you make the source code freely available under the GNU Public License and I'll compile it for the current version of Java on Mac for you.
|

February 26th, 2005, 10:24 PM
|
 |
Major General
|
|
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Combat Simulator Released!
Ahh... sorry, I didn't realize that. There is a way to compile for compatibility with previous versions, so as soon as I figure that out (it should be somewhere in the sun forums) I'll recompile it for 4.2.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|