Launching on OSX thread

Get general Towns support here

Re: Starting on a mac

Postby mocman » Thu Feb 09, 2012 10:17 am

ok thank you tutamun it worked like you said

except that this happened:
Code: Select all
/Desktop/Towns/towns.command ; exit;
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
logout

Process completed]

and Towns didnt start no errors or pop ups or anything
I checked my java and i only have J2SE 5.0(32&64), Java SE 6, and J2SE 1.4.2.
it should be working right? :| :?:
mocman
 
Posts: 1
Joined: Thu Feb 09, 2012 10:04 am

Re: Starting on a mac

Postby teh.f4ll3n » Thu Feb 09, 2012 1:02 pm

You might want to check this thread too
You're not drunk if you can lie on the floor without holding on. ©Russians
Image
Image
Back to my roots: Fallout 2
User avatar
teh.f4ll3n
 
Posts: 216
Joined: Sun Dec 04, 2011 6:42 pm

Re: Starting on a mac

Postby SphaZ » Thu Feb 09, 2012 1:29 pm

Moved to bugs, since this is more apropriate.
SphaZ
 

Re: Starting on a mac

Postby Tutamun » Thu Feb 09, 2012 6:33 pm

java.lang.UnsupportedClassVersionError: Bad version number in .class file

You are using the wrong java version. Check the thread teh.f4ll3n has posted... there is a description how to make Java 6 the 'default' Java version.
User avatar
Tutamun
 
Posts: 294
Joined: Mon Nov 21, 2011 10:52 am

Re: Launching on OSX thread

Postby Patchumz » Mon Feb 27, 2012 1:03 am

If anyone ever gets "Unable to access jarfile lib/xaos.jar", make sure your Towns folder is named "Towns". It requires that name.
Patchumz
 
Posts: 28
Joined: Sun Feb 26, 2012 6:19 pm

Re: Launching on OSX

Postby Landorama » Mon Feb 27, 2012 3:07 am

edbrannin wrote:
Vibe wrote:Hello, (i'm french)
For the moment it does not work for me too:
Code: Select all
Exception in thread "main" java.lang.NoClassDefFoundError: xaos/Towns
Caused by: java.lang.ClassNotFoundException: xaos.Towns
...


I've found a tweak that lets towns.command run from the Finder:

Edit towns.command (with TextEdit) and add this line before the line that starts with "java":
Code: Select all
cd $(dirname $0) &&


It should look like this:
Code: Select all
#!/bin/sh
cd $(dirname $0) &&
java -cp .:./lib/lwjgl.jar:./lib/lwjgl_util.jar:./lib/slick-util.jar:./xaos.jar -Djava.library.path=./lib/native/ -Dsun.java2d.opengl=false xaos.Towns


Notes:
(That's the number 0 after "dirname", not the letter "O".)
Do the above for Towns{EN,ES}.command if you want to force English or Spanish.


So.. how do you launch it?
Landorama
 
Posts: 5
Joined: Mon Feb 27, 2012 2:57 am

Re: Starting on a mac

Postby Landorama » Mon Feb 27, 2012 3:57 am

mocman wrote:ok thank you tutamun it worked like you said

except that this happened:
Code: Select all
/Desktop/Towns/towns.command ; exit;
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
logout

Process completed]

and Towns didnt start no errors or pop ups or anything
I checked my java and i only have J2SE 5.0(32&64), Java SE 6, and J2SE 1.4.2.
it should be working right? :| :?:


Exactly what happened to me? What do we do? (sorry if someone posted the answer, I might not have seen it...) Please help!
Landorama
 
Posts: 5
Joined: Mon Feb 27, 2012 2:57 am

Re: Launching on OSX thread

Postby Elegant Caveman » Mon Feb 27, 2012 4:40 am

I'm guessing you need to adjust your Java preferences.

Please see 2. in this thread.

You may want to have a look at the rest of the thread. It's basically everything said in this thread, but condensed in a step-by-step guide.
User avatar
Elegant Caveman
 
Posts: 512
Joined: Wed Jan 25, 2012 9:55 pm

Re: Launching on OSX thread

Postby Alphasite » Mon Feb 27, 2012 3:23 pm

Hey, I just threw together a .app Bundle to help you along, it should be easy enough to keep up to date, just drag the files into the Jar folder and if the class files name ever changes just update the "info.plist".

http://www.mediafire.com/?588j8yt0hdfo8yc

Annoyingly the SymLink seems to have broken, but heres the path to the Java Folder. Right click on the app and press Show Package Contents then navigate to Towns.app/Contents/Resources/Java/ and paste the files there.
Alphasite
 
Posts: 3
Joined: Mon Feb 27, 2012 3:12 pm

Re: Launching on OSX thread

Postby Patchumz » Mon Feb 27, 2012 6:56 pm

Alphasite wrote:Hey, I just threw together a .app Bundle to help you along, it should be easy enough to keep up to date, just drag the files into the Jar folder and if the class files name ever changes just update the "info.plist".

http://www.mediafire.com/?588j8yt0hdfo8yc

Annoyingly the SymLink seems to have broken, but heres the path to the Java Folder. Right click on the app and press Show Package Contents then navigate to Towns.app/Contents/Resources/Java/ and paste the files there.

Thanks for that. Saves me the trouble of making my own, so I can properly place it on my dock ^^.
Patchumz
 
Posts: 28
Joined: Sun Feb 26, 2012 6:19 pm

PreviousNext

Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron