You can also define global JVM parameters with the JAVA_OPTS variable, e.g.

setenv JAVA_OPTS -Dfile.encoding=UTF-8

- Marius


On 18.09.2009, at 18:01, Galen Rhodes wrote:

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.

If you want to do it just for WebObjects applications launched by wotaskd then simply modify the launchd script that launches wotask and add the environment variable there. This page, http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html , will tell you how.

--
Galen Rhodes
[email protected]
http://www.facebook.com/Galen1967


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/m.soutier%40starhealthcare.info

This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to