• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Glassfish installation grief

 
Bartender
Posts: 390
47
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Jesse Duncan
Bartender
Posts: 390
47
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic