Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
OK, I'm happy that Apple are releasing new versions of Java 5 (about time) but I'm still annoyed that this update does not provide the ability to replace the system default Java with 1.5. It's useful that Apple allows OS X to maintain multiple releases of Java but the CurrentJDK symbolic link in /System/Library/Frameworks/JavaVM.framework/Versions continues to point to 1.4.2. This, as far as I understand it, isn't a problem if your application explicitly requests Java 1.5 or higher but I know that I still have problems with Eclipse when plug-ins need 1.5. Eclipse, while it allows you to compile applications using the 1.5 SDK, doesn't request a Java version when starting so uses the default (1.4.2 still) and therefore some plugins won't work. So far the only way I've found around this is to replace the CurrentJDK symbolic link so that it points to 1.5 but I just WISH that Apple would at least give me the option of making 1.5 the system default rather than the apparent fudge that is the Java Preferences application.
 
Stella said:
Java 1.5 breaks a lot of Java 1.4.x and previous code.

Personally I steer clear of Java 1.5.

Java in general or Apple's implementation?

Maybe you could give a few examples if there is a "lot."

For those who might be panicked by Stella's claim, don't worry. Java 5 won't become the default on your machine if you install it and only apps that request it will use it.
 
Kelmon said:
...but I know that I still have problems with Eclipse when plug-ins need 1.5. Eclipse, while it allows you to compile applications using the 1.5 SDK, doesn't request a Java version when starting so uses the default (1.4.2 still) and therefore some plugins won't work. So far the only way I've found around this is to replace the CurrentJDK symbolic link so that it points to 1.5 but I just WISH that Apple would at least give me the option of making 1.5 the system default rather than the apparent fudge that is the Java Preferences application.

As a Java developer you should be well used to explicitly specifying java implementations, regardless of which platform you're on. It is correct to do so.

There is no fudge involved in Apple's prefs app. It does the right thing for bundled apps, applets etc; individual app bundles can request a specific VM if needed.

The "default" from the command line depends entirely on your path, which is dependent on your shell settings, .cshrc/.bashrc/zshrc, whether you've set JAVA_HOME env --- all maner of things. Again you don't want this messed with and it's easy to control yourself as a command line user and especially as a developer.
 
Nice,

The Java WYSIWYG for my site is much easier to work with now, that and the new version of Gallery that has a Java drag and drop function! I was hoping an upcoming java update would fix these!
 
Stella said:
Java 1.5 breaks a lot of Java 1.4.x and previous code.

Personally I steer clear of Java 1.5.

Well, I don't know if this is TRUE (I don't think so ... :p ), but then it would be very SAD :( because Java 5 is not MUCH better because it mantains BACKWARDS compatibility.

Stella, could you post some code snippet that would break in Java 1.5 ? :cool:
Most of the old code I have seen that 'broke' when Java was updated, was due to using prerelease API stuff ...

Personally I try to steer clear of Java pre JSE 5 :D
Yes, I'm j junkie , so what?

Between 1.2.x and 1.5.x the language changed just a little (1.4 introduced asserts, but not full programming by contract), the APIs changed more. Java 5 introduced : typesafe enums (cool), Generics (ambitious but not so easy to use (erasure), due to BACKWARDS compatibility), enhanced for loop (foreach like), varargs (nice but not general enough, should handle collections ...), some other stuff ... and annotations (a la C#) which is probably the MOST important change of ALL !

People have complained that now Java is no longer a compact OO language, but code is now (once you get used to the new features) MUCH MORE READABLE, ELEGANT, SAFE AND LESS VERBOSE.
 
i changed my defaults and no probs here yet!

Also another big news is... This Java app is a universal binary! Get info on it and you will see intel, powerpc ...:)

(thanks to the apple blog for this information)
 
1.5 Incompatibilities

Stella said:
I can't remember off hand but I know I've tried compiling code that was fine under Java 1.4 but fails compilation under 1.5 ( and yes, it was correct code!)

Stella is correct here. One of the most well known examples in education is the Britannica software which still refuses to run under 1.5. Any macs running the software have to be kept at 1.4 or the program just won't launch. I'm sure this isn't the only example.

BUT as long as Java Preferences allows you to choose which version of Java you want to use (and since it doesn't uninstall 1.4), it's not too much of a problem. The only shame is that you can't easily set the preference on an application case-by-case basis.
 
Stella said:
I can't remember off hand but I know I've tried compiling code that was fine under Java 1.4 but fails compilation under 1.5 ( and yes, it was correct code!)

Are you rewriting or simply recompiling? If you don't readdress certain outdated code (potentially at least events handling) before it's bytecode it will definitely behave screwy.
 
Kelmon said:
OK, I'm happy that Apple are releasing new versions of Java 5 (about time) but I'm still annoyed that this update does not provide the ability to replace the system default Java with 1.5. It's useful that Apple allows OS X to maintain multiple releases of Java but the CurrentJDK symbolic link in /System/Library/Frameworks/JavaVM.framework/Versions continues to point to 1.4.2. This, as far as I understand it, isn't a problem if your application explicitly requests Java 1.5 or higher but I know that I still have problems with Eclipse when plug-ins need 1.5. Eclipse, while it allows you to compile applications using the 1.5 SDK, doesn't request a Java version when starting so uses the default (1.4.2 still) and therefore some plugins won't work. So far the only way I've found around this is to replace the CurrentJDK symbolic link so that it points to 1.5 but I just WISH that Apple would at least give me the option of making 1.5 the system default rather than the apparent fudge that is the Java Preferences application.

Gee I didn't read all of it, but the README seemed to tell you how to make it the default for apps, the default for applets, how to configure xcode to use it, how to get xcode to index for it, and so on - all in place of 1.4.2.

Check out the Using J2SE and the Outstanding issues section. That (seems to) have all the manual steps to do it.

http://developer.apple.com/releasenotes/Java/Java50Release3RN/index.html
 
MacsAre1 said:
Everyone complains when updates make us restart and lose our uptime. Well, let me just say thanks to Apple for not making us have to restart this time:) If I remember correctly, we've had to restart on most of the other Java updates, so this is an improvement


Aftering downloading, installing, and resetting the Java Preferences to use this new version, I had to restart in order to get Software Update to stop repeating that this update is available for my system.

Does that mean that the new Java wasn't really running until restarted or that Software Update isn't very swift?
 
Mantra said:
May I ask what version of Azureus you are using and what version of java is reported in the terminal (type 'java -version'). Mine reports '1.5.0_05'.

I am using Azureus 2.3.0.4 and the java version is 1.5.0_05.
 
mad jew said:
Safari still doesn't play nicely with the Dell online store though. Yeah, I know, nobody really cares except me. :(

Hmmmm...what happens? I noticed that when coupons are expired or used up or whatever, it gives no error prompt but just goes back to the cart page. But I ordered my Axim from the Dell online store using Safari, my mad friend. :eek:

Now I just need PocketMac or MissingSync to get upgraded for WM5.... I actually really love this thing!
 
mkrishnan said:
Hmmmm...what happens?


I can't customise any BTOs (or whatever Dell calls them). I just get the attached error message. I have the same problem with all browsers on OSX interestingly except Explorer which only shows this error if I don't wait for everything to update first. :(
 

Attachments

  • Picture 1.png
    Picture 1.png
    19.4 KB · Views: 113
mad jew said:
Safari still doesn't play nicely with the Dell online store though. Yeah, I know, nobody really cares except me. :(

The Dell online store doesn't use Java. This update has no relevance.
 
mad jew said:
I can't customise any BTOs (or whatever Dell calls them). I just get the attached error message. I have the same problem with all browsers on OSX interestingly except Explorer which only shows this error if I don't wait for everything to update first. :(

Dell customize features work fine for me but they always have.
 
devman said:
The Dell online store doesn't use Java. This update has no relevance.


But then why the error and how come the little teacup shows in the taskbar in Windows? Whatever it is, it's weird. :(

MacBandit, what browser is that with?
 
mad jew said:
But then why the error and how come the little teacup shows in the taskbar in Windows? Whatever it is, it's weird. :(

Beats me - how did we suddenly switch to windows?

I just tried customising a system at dell.com using Safari and all worked fine for me and no Java applets were loaded by any of the pages (that I could detect). There is tons of Javascript though...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.