This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218863 - GlassFish is using a JDK version different from the IDE
Summary: GlassFish is using a JDK version different from the IDE
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-23 17:11 UTC by bht
Modified: 2012-09-24 07:04 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2012-09-23 17:11:59 UTC
The JavaHelp for the server properties reads:

"Java. The Java tab enables you to specify the following options:
Java Executable.
Enables you to specify the Java Platform the server will use.
If no Java executable is specified, the server will use the same Java Platform as is used by the IDE."

In my server properties, the Java Executable is blank.

I have 2 JDKs: 1.7 and 1.6 (which I installed before 1.7)

I don't know why, but GlassFish is using JDK 1.6 even if I start it from the command line.

The IDE uses JDK 1.7

I don't know what the supported method is to change the JDK for GlassFish. I found two files:

C:\Program Files\glassfish-3.1.2.2\glassfish\config\asenv.conf
C:\Program Files\glassfish-3.1.2.2\glassfish\config\asenv.bat

Both contain the same comment:

"Yet, this file is also where users of earlier versions have sometimes added a definition of AS_JAVA to control which version of Java GlassFish should use."

So I added in asenv.bat:

set AS_JAVA=C:\Program Files\Java\jdk1.7.0_07

I felt a bit unsure to set the "Java Executable" in the server properties, because I thought that it is not the executable e.g. somepath\java.exe that I would want to set but the java platform directory. So I did not do it.
Comment 1 bht 2012-09-24 07:04:18 UTC
This was based on an invalid assumption. Sorry.