• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Running WO with JDK 1.6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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@hidden
http://www.facebook.com/Galen1967


 _______________________________________________
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

  • Follow-Ups:
    • Re: Running WO with JDK 1.6
      • From: Marius Soutier <email@hidden>
  • Prev by Date: Re: Rewrite URL _rewriteURL
  • Next by Date: Re: Running WO with JDK 1.6
  • Previous by thread: Re: Rewrite URL _rewriteURL
  • Next by thread: Re: Running WO with JDK 1.6
  • Index(es):
    • Date
    • Thread