Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Glassfish installation grief

 
Master Rancher
Posts: 112
20
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set up Glassfish 5 on my Xubuntu machine. I unzipped the downloaded archive to /opt/java/ . Now to set it up: That is all the output I get. I am pretty sure that means that it can't find java, but I don't know where the issue lies. I installed Java 11 at /opt/java/, so that I have /opt/java/jdk-11.0.4/. I set up the global environment variable JAVA_HOME to point to this directory in /etc/environment. Maven finds java correctly, and running "java --version" gives the correct output. Running "which java" prints out "/opt/java/jdk-11.0.4/bin//java".
The shell script "asadmin" I am trying to run is below:
It makes a note "Depends upon Java from ../config/asenv.conf", but I don't know enough bash to tell how it works.

How can I resolve this issue? It is probably something stupid from my side, but I would appreciate some help.
 
Saloon Keeper
Posts: 11488
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with GlassFish, but it's likely that it has a main configuration file somewhere where the JDK path is configured. You should look around in its installation directory.
 
Jj Roberts
Master Rancher
Posts: 112
20
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, finally found the issue. Glassfish uses the environment variable AS_JAVA. When trying to use jdk 11 I got


It appears Glassfish does not work with Java 9+, see relevant Stackoverflow post. I downloaded the jdk 8 and set the AS_JAVA environment variable to point to it. Try again:

Try again, just in case:

I finally got Glassfish working! Having the jdk 11 directory on the PATH was still wrecking things. Success at last!
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!