How to solve Java: not found problem with Glassfish

If you get an error when starting Glassfish similar to this:
[supperman@i88.ca]# service glassfish3 start
Starting Glassfish Service java
glassfish/bin/asadmin: line 54: exec: java: not found

You need to re-configure your Java path in your Glassfissh configuration file:

Open glassfish/config/asenv.conf in your editor of choice and add path similar to the following line:

AS_JAVA="/usr/java/jdk1.8.0"

Save the file and Glassfish service should start without problems.

You can find your Java path by:

which java

Popular posts from this blog

How to delete / clear queue of PowerMTA