Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Re: Easily switch the current default Java version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: Easily switch the current default Java version
Authored by: Uncle Asad on Jan 27, '06 09:04:36PM

"Mac OS X is no different"...*except* it supplies a *better* way to do this than use the brute-force UNIX method, and the Apple-sanctioned way, as an added benefit, *will not break* Java apps which expect the symlink to be pointed correctly. This is what hayne has been saying for months and what the Apple Java-dev posted linked above stresses.

I do user support and bug report triage for a modestly popular Mac OS X Java app that has only been qualified on Java 1.4.2, and no matter what methods the developers use to keep the app from loading Java 1.5, people (and other Java "developers") blithely mucking with the symlink continue to generate bogus bug reports of crashes, strange behaviors, and other bizarre problems that, after much time spent troubleshooting and tracking down the problem, turn out to be red herrings; the problems always end up being caused by improper mucking with the symlink.

This mucking wastes everyone's time, breaks Apple-supported methods of ensuring Java apps use the JVM the author intends, causes unnecessary problems, and is something which should not be spread around any further. Please, stop spreading this maddness! (hayne, you have our heart-felt appreciation for your role in trying to nip this insanity in the bud from day one!)



[ Reply to This | # ]
check the Java version
Authored by: hayne on Jan 28, '06 07:55:31AM
I do user support and bug report triage for a modestly popular Mac OS X Java app that has only been qualified on Java 1.4.2, and no matter what methods the developers use to keep the app from loading Java 1.5 ...
Since Java 1.5 will very soon (after an imminent Apple update) become the default Java version on OS X, the developers obviously need to fix it to work under Java 1.5 as soon as possible - or at least to ensure that it will use its preferred Java version even if the default is 1.5.

But in the meantime, you might consider having the app check what Java version it is running under (using the method of the "JavaVersionDialog" class supplied in the forum post referred to above) and simply quit if it detects a version that it can't support.

[ Reply to This | # ]

Re: Easily switch the current default Java version
Authored by: raider on Jan 29, '06 05:16:46PM

One of the problems with many Java applications and/or the developers of them - is that they treat Java like a compiled language where you can guarantee more about how your application is run...

Which could be a problem with Java itself. It could probably be argued both ways.

But when you develop a Java application that is going to be run in unknown environments - you HAVE to account for EVERY POSSIBLE configuration. You HAVE to - or you get the problems you describe.

Hell, dealing with classloader issues in different custom JVMs is a pain in the arse. IBM is constantly mucking with the classloading in the JVMs they ship with WebSphere - and BEA likes to break standardized things like SSL... And don't even try and get into having cross JVM compatible encryption and the like without accounting for almost every possible difference in environment...

Even in my work - where I can reasonably guarantee the environment of a server, I regularly run into a problems when porting to other systems with similarly "stable" environments.

Like an old instructor of mine was fond of saying - "if you write it so it will run everywhere it will run nowhere." :)

We go to production with the Java we have - not the Java we want...

:)



[ Reply to This | # ]