Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
248 views
in Technique[技术] by (71.8m points)

java - How do I specify the JDK for a GlassFish domain?

I've got GlassFish 2.1.1 installed. I have a 1.5 and a 1.6 JDK installed. Even though my JAVA_HOME variable is set to the 1.5 version (and both "java -version" and "javac -version" display 1.5), whenever I start my glassfish domain it always states at the top of the log that its using version 1.6. How can I override this?

Starting Domain domain2, please wait.
04-May-2012 08:38:47 com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
INFO:
C:/Dev/jdk/1.6/1.6.0_19injava
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here you can find how to set path to JDK for Glassfish: http://www.devdaily.com/blog/post/java/fixing-glassfish-jdk-path-problem-solved

Check

glassfishconfigasenv.bat

where java path is configured

REM set AS_JAVA=C:Program FilesJavajdk1.6.0_04jre/..
set AS_JAVA=C:Program FilesJavajdk1.5.0_16

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...