Running WO with JDK 1.6
Running WO with JDK 1.6
- Subject: Running WO with JDK 1.6
- From: Galen Rhodes <email@hidden>
- Date: Fri, 18 Sep 2009 12:01:40 -0400
Here's a little helpful hint I recently figured out.
I've seen a few people on here ask how they can run their WO application on Leopard Server with JDK 1.6 instead of the default JDK 1.5. As most people have clearly found out, setting JDK 1.6 as the default using the Java Preferences applet does nothing for WO applications launched by wotaskd (which is typically launched by launchd). The reason is that the Java Preferences applet only adjusts the default for the current user who is running the applet. Specifically it modifies the file ~/Library/Preferences/com.apple.java.JavaPreferences.plist. Unless you happen to be logged in as the appserver user then this is going to do no good.
BUT, the java launchers (/usr/bin/java for example) will honor the JAVA_HOME environment variable! The trick is setting the environment variable it in the right place for launchd.
The easiest way is to set the environment variable for launchd as a whole. All you need to do is create a file called /etc/launchd.conf and add the line:
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
Then when you restart the server all Java applications launched by launchd (such as wotaskd and JavaMonitor) will be launched with JDK 1.6.
-- Galen Rhodes
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden