Lucee on Ubuntu 18.04 - How to change Java

I have Lucee set up on Ubuntu 18.04 LTS with Tomcat 8 and Nginx. I want to replace the current java it uses with AdoptOpenJDK 8 but I can’t seem to figure out how to do that. Anyone have a simple/clear set of instructions on how to do this? Thanks

Need more information about your setup. How did you install?

If you installed using the installer the JRE is defined in your “lucee_ctl” start script (JRE_HOME and JAVA_HOME), you can change those to whatever JRE you want - like a system-based JRE. If you’re doing something else, then it will depend on how you installed.

Jordan,

I did not use the Lucee installer. I initially used the ubuntu/nginx/lucee script from foundeo. I had used it last year for testing on a 16.04 VM and it is still working great so I wanted to see what it would take to work on 18.04 LTS. Using it without any changes got everything done successfully except one line in the server.xml needed to be un-commented. However if I tried to change any of the original options (Lucee version, java, etc) it would fail so I gave up on doing that. It appears the script uses whatever java is already present or if there is none it installs the oracle java. I discovered that if I adjusted the numbered scripts a bit I could get it to install the java I wanted along with tomcat 9 (on Ubuntu 18.04 LTS) so everything would be up to date once the Lucee install gets updated. I have not quite worked everything out yet as I am getting a Lucee error ( java.io.FileNotFoundException: /var/lib/tomcat9/lucee-server/patches/5.2.9.31.lco (Read-only file system)) even though everything completes correctly. Tomcat and Nginx are both working fine. Once that is fixed I am going to be back to my original issue of how to change the java version should the need arise. We don’t change the java very often on production VMs but I want to know what is involved before I go much farther with it.

I looked in /opt/lucee but there is no lucee_ctl so I would assume the foundeo script is doing something different than the installer. Any idea where I would look instead?

Thanks

Hi Robert,

I’m not too familiar with that project but Pete is a friend of mine. Looking over that project, you can see this script (ubuntu-nginx-lucee/300-tomcat.sh at master · foundeo/ubuntu-nginx-lucee · GitHub) doing a JVM edit to the /etc/default/tomcat8 file, so I’m guessing that’s where your JVM config will be.

Hope this helps!