Search code examples
glassfishredhatjava-6glassfish-3

glassfish starts only from the netbeans IDE and not from the command prompt


i have installed the netbeans version 6.8 with glassfish version 3 on a redhat machine. the thing is that when i try starting/stopping the glassfish via the netbeans, it works fine, BUT when i try starting the glassfish via:

./asadmin stop-domain domain1

i get the error "GlassFish requires Java SE version 6. Your JDK is version 4"

i have got only one JDK instance installed

rpm -qa | grep jdk

will return "jdk-1.6.0_18-fcs"

any ideas ?


Solution

  • Set the environment variable AS_JAVA to point to your 1.6 JDK. (asadmin will use bin/java within that directory). AS_JAVA must be set in glassfish/config/asenv.conf