Archalien Posted September 2, 2005 Share Posted September 2, 2005 Hey guys I have OSX running nicely w/ SSE2 -> SSE3 patch Rosetta works fine, I can run and install nething I want cept- I can compile simple java code in Bluej using 1.4 Installed 1.5 but cant compile simple 1.5 code Mac documentation says to enable 1.5 as default-- run: /Applications/Utilities/Java/J2SE 5.0/Java Prefrences but it crashes b4 launch with this in console: [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sun/deploy/panel/ControlPanel (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(SecureClassLoader.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.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55) at apple.launcher.LaunchRunner.run(LaunchRunner.java:84) at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50) at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52) ne ideas??? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/ Share on other sites More sharing options...
alvins Posted September 2, 2005 Share Posted September 2, 2005 1.5 does not seem to work well with osx86 at the moment. Can't compile much - seg faults and bus errors. I don't know the reason behind this - 1.4 I am pretty sure is ppc based and so is 1.5. Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11186 Share on other sites More sharing options...
Archalien Posted September 2, 2005 Author Share Posted September 2, 2005 I'd be happy to get 1.5 set as default(first), then worry bout other stuff. Gotta find out why Java Prefrences is crashing??? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11199 Share on other sites More sharing options...
TonyKL Posted September 2, 2005 Share Posted September 2, 2005 I bet Control Panel is written in 1.5 (49.0) and is trying to be run in a 1.4 (48.0) VM. Any reason you require 1.5? Are you using generics, annotations etc? I will have a look this weekend is I would like to run 1.5 but I'll be happy if 1.4 runs perfectly. PS: How well are you finding OSX on your Sentia? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11224 Share on other sites More sharing options...
Archalien Posted September 2, 2005 Author Share Posted September 2, 2005 Good point on 1.4 VM, Ill check that *Update, doh dl'd 1.5 VM not SDK, cant find SDK though??? I do alot of Java programming right now and require 1.5 As of now tri-boot Windows XP Pro,OSX, Fedora 4 Linux is flawless!!! Only 3 things I cant do in OSX: Java 1.5 DVD no hardware accel for gfx No wireless nic Other than that u couldnt tell its not on a powerbook...so far Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11275 Share on other sites More sharing options...
TonyKL Posted September 2, 2005 Share Posted September 2, 2005 Cool, I will be playing this weekend and hope to get Quartz working, CD writing and Java. Wireless nic will be a while I think, I'm going to try a USB Wifi that I have lying around. Java 5.0 Release 1 (assuming this is the dev and not runtime - havent got time to check) Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11283 Share on other sites More sharing options...
Archalien Posted September 3, 2005 Author Share Posted September 3, 2005 It may be as simple as a single hex edit of a file to set 1.5 as default but determinig what to edit is beyond my skill. If I knew for sure what file stores this prefrence I might be able to copy it off a working mac w/ 1.5 enabled and replace the one on my x86 install. This is where a little help would be appreciated. Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-11597 Share on other sites More sharing options...
TonyKL Posted September 5, 2005 Share Posted September 5, 2005 Well, I installed Java 5 and had to manually change OSX to use 1.5 instead of 1.4 however, 1.5 doesnt run too good. If you want to try you have to change a symbolic link named CurrentJDK to point from 1.4.2 to your newly installed 1.5 I cant remember the directory atm but all the JDKs are installed in their in a directory called Versions (check out where /usr/bin/java points to for a clue). Hope this helps. I'm going to do a full dvd install using release1 and maybe 0.5 patch and try again. Maybe going to use VMWare for this so I dont blast my current install... Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-12560 Share on other sites More sharing options...
Archalien Posted September 5, 2005 Author Share Posted September 5, 2005 Good work!! well almost Did some lurnin and changed the link as you suggested. now console inqueries jor java and javac show version 1.5.0_02 was able to compile simple hello program that tested 1.5 compatibility from the terminal with no problem. but still wont work with bluej?????? If I can get bluej to compile 1.5 code Id have no more need for linux. Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-12583 Share on other sites More sharing options...
jb_gmd Posted September 5, 2005 Share Posted September 5, 2005 I've found that clearing out and turning off the cache seems to make more apps run stable. Weird things to happen I know but its worth a try if all else fails Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-12754 Share on other sites More sharing options...
alvins Posted September 6, 2005 Share Posted September 6, 2005 Yes the symbolic links seem to do the job but the problem seems to be with java 1.5 itself. It does not like osx 86 at all. Any ideas on where to go from here? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-12994 Share on other sites More sharing options...
Archalien Posted September 9, 2005 Author Share Posted September 9, 2005 Damn neone, neone? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-14413 Share on other sites More sharing options...
zzhu8192 Posted September 9, 2005 Share Posted September 9, 2005 The bundled 1.4.2_07 is an x86 compiled JVM. It will JIT to x86 code as well. When you download 1.5 (j2se 5.0), it will be ppc, which will most likely JIT to ppc code. As a result, it will most likely not work. If rosetta were perfectly stable, then the 1.5 JVM may run, but will run extremely slow. The path it will take is Java byte code -> JIT to ppc -> execute via rosetta -> dynarec to x86. Very few apps out there require JDK 1.5. IMHO, I would save the head aches and stick with the bundled 1.4.2 JVM. It seems to be mostly stable. Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-14687 Share on other sites More sharing options...
Takuro Posted September 10, 2005 Share Posted September 10, 2005 ............................................ Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-14790 Share on other sites More sharing options...
Archalien Posted September 10, 2005 Author Share Posted September 10, 2005 The bundled 1.4.2_07 is an x86 compiled JVM. It will JIT to x86 code as well. When you download 1.5 (j2se 5.0), it will be ppc, which will most likely JIT to ppc code. As a result, it will most likely not work.If rosetta were perfectly stable, then the 1.5 JVM may run, but will run extremely slow. The path it will take is Java byte code -> JIT to ppc -> execute via rosetta -> dynarec to x86. Very few apps out there require JDK 1.5. IMHO, I would save the head aches and stick with the bundled 1.4.2 JVM. It seems to be mostly stable. <{POST_SNAPBACK}> I have no clue what you just said, but I dont want to run Java 5.0 programs, I HAVE TO write Java 5.0 programs. After changing the symbolic link to the 5.0 directory, Ive been able to get a simple "Hello" program (w/ some arbitrary 5.0 code inside) to compile from the command line every so often with occasional failures due to a bus error(??). But bluej still looks for 1.4, so I manually modified its config file to direct it to the correct java/javac files and the default version to 1.5 but it hangs if I take out the default version info then it uses 1.5 to compile but complains about the 5.0 code cuz bluej is requesting to compile in 1.4??? So this may be more of a bluej problem?? Neone else compile 5.0 in an IDE? Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-14830 Share on other sites More sharing options...
zzhu8192 Posted September 10, 2005 Share Posted September 10, 2005 I have no clue what you just said, but I dont want to run Java 5.0 programs, I HAVE TO write Java 5.0 programs. After changing the symbolic link to the 5.0 directory, Ive been able to get a simple "Hello" program (w/ some arbitrary 5.0 code inside) to compile from the command line every so often with occasional failures due to a bus error(??). But bluej still looks for 1.4, so I manually modified its config file to direct it to the correct java/javac files and the default version to 1.5 but it hangs if I take out the default version info then it uses 1.5 to compile but complains about the 5.0 code cuz bluej is requesting to compile in 1.4??? So this may be more of a bluej problem?? Neone else compile 5.0 in an IDE? <{POST_SNAPBACK}> I'm a bit confused as well by your response. Why do you need to write a Java 5.0-only compliant Java app? Isn't it to your advantage to write something that works on 1.3, 1.4, 1.5? Are you needing to use generics templates, or you just have to use abbreviated for loops like for (i : x){}? J2SE 5.0 certainly adds lots of neat stuff, but I don't believe any of it is essential. On the bluej page, it says the environment runs on either 1.4.2 or 1.5. You can also try using jikes. I compiled it natively for MacOS X x86, and it works okay. I don't know if it supports 1.5 syntax though. You may want to do some research on JIT, Java, and dynamic recompilation. It will probably become more apparent as to why you would not want to run a PPC compiled PPC machine code generating JVM vs. a x86 compiled x86 machine code generating JVM. Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-14842 Share on other sites More sharing options...
Archalien Posted September 11, 2005 Author Share Posted September 11, 2005 I'm a bit confused as well by your response. Why do you need to write a Java 5.0-only compliant Java app? Isn't it to your advantage to write something that works on 1.3, 1.4, 1.5? Are you needing to use generics templates, or you just have to use abbreviated for loops like for (i : x){}? J2SE 5.0 certainly adds lots of neat stuff, but I don't believe any of it is essential. On the bluej page, it says the environment runs on either 1.4.2 or 1.5. You can also try using jikes. I compiled it natively for MacOS X x86, and it works okay. I don't know if it supports 1.5 syntax though. You may want to do some research on JIT, Java, and dynamic recompilation. It will probably become more apparent as to why you would not want to run a PPC compiled PPC machine code generating JVM vs. a x86 compiled x86 machine code generating JVM. <{POST_SNAPBACK}> Sorry if u missed it, I write java 5.0 software, this isnt a matter of choice, its what Im required to do. I do it in windows and linux, I do so much of it that I would like to do it on OSX86 for kicks and giggles. I dont know what your talking about with the JVM, I could care less about the VM, It doesnt matter what system I compile on (Write once, run(Debug) everywhere). Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-15221 Share on other sites More sharing options...
Archalien Posted September 16, 2005 Author Share Posted September 16, 2005 bump Link to comment https://www.insanelymac.com/forum/topic/1751-java-sdk-15-50/#findComment-16696 Share on other sites More sharing options...
Recommended Posts