How to solve java: not found problem with Glassfish

If you get an error when starting Glassfish similar to this:
[[email protected]]# 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:


Save the file and Glassfish service should start without problems.

You can find your Java path by:

which java

Featured Post

Updated Coupons / promo codes for Google Apps for Work / Business

To redeem: 1. Sign up for Google Apps   2. Go to your billing settings  3. Choose your payment plan  4. Enter your promo code ...