Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Glassfish installation grief

 
Bartender
Posts: 337
42
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: 12994
281
  • 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.
 
Jj Roberts
Bartender
Posts: 337
42
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!
 
I knew that guy would be trouble! Thanks tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic