On 2009-09-01, at 3:30 PM, Brendan Duddridge wrote:
Hey WO Folks,
So I had a class version mismatch exception when building from Snow
Leopard (JDK 1.6) and deploying on Leopard Server (JDK 1.5). So I
wanted to switch my servers to use JDK 1.6 by default. Nothing we
tried would make that happen. We tried dragging the Java 6 entry in
Java Preferences up to the top of the list and rebooting the Xserve,
but that still didn't work. We also tried changing the CurrentJDK to
point to the 1.6.0 directory. But that also didn't work. Tried
changing the Current symlink to point to 1.6.0 instead of to A as is
by default.
Well, when I say it didn't work, I mean it didn't help to launch our
WO apps with Java 1.6. They still launched with Java 1.5, even
though typing 'java -version' into the command line returned 1.6,
typing in 'sudo -u appserver java -version' returned 1.5.
So the solution was to modify the build.xml file in Eclipse to have
it generate a hard coded path to the JVM to point to 1.6.
Here's what I added to the build.xml file's <woapplication> task:
JVM="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
bin/java"
So it looks like this now:
<woapplication name="${build.app.name}" JVM="/System/Library/
Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java" destDir="$
{dest.dir}" customInfoPListContent="${customInfoPListContent}"
principalClass="${principalClass}" webXML="${webXML}"
webXML_CustomContent="${webXML_CustomContent}"
servletAdaptor="com.webobjects.jspservlet.WOServletAdaptor">
The end result is a MacOSClassPath.txt file with the following entry
at the top:
# JVM == /System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Home/bin/java
That works for us, so I thought I'd share it with you.
Thanks go to Mike Schrag for the help with this! Is there anything
that guy doesn't know? :-)
We deploy to several client servers that are beyond our control or
stuck on JDK 1.5 - are we going to experience problems with building
on SL and deploying on these boxes or are there just certain scenarios
where this will be an issue?
I've seen posts about people copying the JDK 1.5 from Leopard onto SL
and building with that, I'm just not sure if that is something we're
going to have to investigate.
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to [email protected]