Lucee JVM

464 views
Skip to first unread message

Nando Breiter

unread,
May 20, 2015, 10:07:42 AM5/20/15
to lu...@googlegroups.com
How to determine which JVM / Java version Lucee is using?
How does one update the JVM?

From the output of startup.sh on my dev laptop, a Mac, I see
Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"

but I'm not sure how to check which version of Java is installed there, or how to point Lucee to another path with an updated JRE.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Mark Drew

unread,
May 20, 2015, 10:16:10 AM5/20/15
to lu...@googlegroups.com
in the command line you should be able to do this:

/usr/libexec/java_home -V


Which will give you the path of all the versions of java that are installed. From memory, the CurrentJDK folder is just a symlink to the correct folder. 

HTH


Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAGHrs%3D-2%2B0srJ4Ve1tQET02a%2B_9-bhmVqK_VAB%3DLRKE-UzRP6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Mark Drew

unread,
May 20, 2015, 10:19:21 AM5/20/15
to lu...@googlegroups.com
After that you can see where each version is, to see what version of java you are using do:

java -v

Marks-MBP:JavaVirtualMachines markdrew$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

On 20 May 2015, at 15:16, Mark Drew <mark...@gmail.com> wrote:

in the command line you should be able to do this:

/usr/libexec/java_home -V


Which will give you the path of all the versions of java that are installed. From memory, the CurrentJDK folder is just a symlink to the correct folder. 

HTH


Mark Drew

<cmd.png>

develop • deploy • deliver
http://charliemikedelta.com

Nando Breiter

unread,
May 20, 2015, 10:21:19 AM5/20/15
to lu...@googlegroups.com
Running /usr/libexec/java_home -V, I get:

Matching Java Virtual Machines (2):
    1.6.0_65-b14-462, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Nando Breiter

unread,
May 20, 2015, 10:22:12 AM5/20/15
to lu...@googlegroups.com
So is my Lucee install using 1.6.0_65?



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Mark Drew

unread,
May 20, 2015, 10:25:56 AM5/20/15
to lu...@googlegroups.com
When I start up lucee from the command line I get a whole bunch of startup stuff… one of the first few things you get is:

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home




Which is telling you exactly which JRE it using.

HTH


Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

Mark Drew

<cmd.png>

Julian Halliwell

unread,
May 20, 2015, 10:26:33 AM5/20/15
to lu...@googlegroups.com
Don't know about the CLI, Nando, but it's shown in my Lucee Server
admin Overview page under General Info:

Mark Drew

unread,
May 20, 2015, 10:32:09 AM5/20/15
to lu...@googlegroups.com
Or that :) 


Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Julian Halliwell

unread,
May 20, 2015, 10:39:33 AM5/20/15
to lu...@googlegroups.com
Or even dump( server.java.version );

On 20 May 2015 at 15:32, Mark Drew <mark...@gmail.com> wrote:
>
> Or that :)

Nando Breiter

unread,
May 20, 2015, 10:54:07 AM5/20/15
to lu...@googlegroups.com
I get:

Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

Which doesn't include the version in the path ... hence my doubt ...



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Nando Breiter

unread,
May 20, 2015, 10:56:37 AM5/20/15
to lu...@googlegroups.com
On Wed, May 20, 2015 at 4:26 PM, Julian Halliwell <julianh...@gmail.com> wrote:
Don't know about the CLI, Nando, but it's shown in my Lucee Server
admin Overview page under General Info:

Julian,

I've been hunting for this but don't find an Overview or General Info link searching carefully through the admin panel at lucee/admin/server.cfm

Is that what you mean?


 

On 20 May 2015 at 15:22, Nando Breiter <na...@aria-media.com> wrote:
>
> So is my Lucee install using 1.6.0_65?

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Mark Drew

unread,
May 20, 2015, 10:56:44 AM5/20/15
to lu...@googlegroups.com
Then do the following (as I did):

markdrew$ cd /System/Library/Frameworks/JavaVM.framework/Versions/
markdrew$ ls -lrt
total 64
lrwxr-xr-x  1 root  wheel   59 30 Jan 11:17 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
lrwxr-xr-x  1 root  wheel    1 30 Jan 11:17 Current -> A
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.6.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 30 Jan 11:17 1.4 -> CurrentJDK
drwxr-xr-x  8 root  wheel  272 30 Jan 11:17 A


Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

On 20 May 2015, at 15:54, Nando Breiter <na...@aria-media.com> wrote:

I get:

Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

Which doesn't include the version in the path ... hence my doubt ...



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

On Wed, May 20, 2015 at 4:25 PM, Mark Drew <mark...@gmail.com> wrote:
When I start up lucee from the command line I get a whole bunch of startup stuff… one of the first few things you get is:

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home




Which is telling you exactly which JRE it using.

HTH


Mark Drew

Julian Halliwell

unread,
May 20, 2015, 11:01:47 AM5/20/15
to lu...@googlegroups.com
It's the "home" page of the admin "site", so just click the Lucee logo
so you get:

/lucee/admin/server.cfm

Nando Breiter

unread,
May 20, 2015, 11:08:23 AM5/20/15
to lu...@googlegroups.com
On Wed, May 20, 2015 at 5:01 PM, Julian Halliwell <julianh...@gmail.com> wrote:
It's the "home" page of the admin "site", so just click the Lucee logo
so you get:

/lucee/admin/server.cfm

Oh, ok. Now I got it! Thanks

 

On 20 May 2015 at 15:56, Nando Breiter <na...@aria-media.com> wrote:
> I've been hunting for this but don't find an Overview or General Info link
> searching carefully through the admin panel at lucee/admin/server.cfm
>
> Is that what you mean?

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Nando Breiter

unread,
May 20, 2015, 11:10:09 AM5/20/15
to lu...@googlegroups.com
nando$ cd /System/Library/Frameworks/JavaVM.framework/Versions/
nando$ ls -lrt
total 64
lrwxr-xr-x  1 root  wheel   59 Oct 20  2013 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
lrwxr-xr-x  1 root  wheel    1 Oct 20  2013 Current -> A
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.6.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 20  2013 1.4 -> CurrentJDK
drwxr-xr-x  7 root  wheel  238 Oct 20  2013 A

Ok, so I don't get something. Using the above command, your CurrentJDK seems to be the same as mine, 
but on startup, your Lucee instance is using /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
which is in a completely different directory.

How to point Lucee at a different JVM?



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Julian Halliwell

unread,
May 20, 2015, 11:11:36 AM5/20/15
to lu...@googlegroups.com
I'll raise a ticket to include an explicit link to the overview in the
admin navigation. It's not obvious that you need to click the logo.

Nando Breiter

unread,
May 20, 2015, 11:12:33 AM5/20/15
to lu...@googlegroups.com
On Wed, May 20, 2015 at 5:11 PM, Julian Halliwell <julianh...@gmail.com> wrote:
I'll raise a ticket to include an explicit link to the overview in the
admin navigation. It's not obvious that you need to click the logo.

I was thinking the same. Thanks!

Julian Halliwell

unread,
May 20, 2015, 11:20:02 AM5/20/15
to lu...@googlegroups.com

Jonathan Brookins

unread,
May 20, 2015, 12:07:13 PM5/20/15
to lu...@googlegroups.com
How do you change JVM versions for Lucee?  is it just a matter of changing the java path?

Mark Drew

unread,
May 20, 2015, 12:10:55 PM5/20/15
to lu...@googlegroups.com
on OS X yes since lucee express (usually is simply a call to java -jar catalina.jar

The main way is to change your JAVA_HOME env var. 

Regards

Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

On 20 May 2015, at 17:07, Jonathan Brookins <jon.br...@gmail.com> wrote:

How do you change JVM versions for Lucee?  is it just a matter of changing the java path?

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Nando Breiter

unread,
May 20, 2015, 12:11:40 PM5/20/15
to lu...@googlegroups.com
On Wed, May 20, 2015 at 6:07 PM, Jonathan Brookins <jon.br...@gmail.com> wrote:
How do you change JVM versions for Lucee?  is it just a matter of changing the java path?

I hunted around a bit in server.xml, catalina.properties and every other file in /tomcat/conf/ but didn't find a java path setting.

Chris Blackwell

unread,
May 20, 2015, 12:16:44 PM5/20/15
to lu...@googlegroups.com

Igal @ Lucee.org

unread,
May 20, 2015, 12:21:33 PM5/20/15
to lu...@googlegroups.com
the files you were looking at, server.xml, catalina.properties, etc. are loaded by Java after the process is already started, so it can not be there (the path must be known before the Java process is launched in order to launch it).

there is a .bat and/or .sh script that launches the JVM, and that is where you have something like (try catalina.sh):

    %JRE_HOME%/bin/java <args>

or

    $JRE_HOME/bin/java <args>

JRE_HOME defaults to $JAVA_HOME/jre if it is not defined.

so if you want to change the launch script (which you really shouldn't) you can change it there.

the right way is to set the path in the ENVIRONMENT variables, JRE_HOME or JAVA_HOME

on Windows when running as a service you can do it in the Java tab of the configuration applet.

Igal Sapir
Lucee Core Developer
Lucee.org

Igal @ Lucee.org

unread,
May 20, 2015, 12:31:02 PM5/20/15
to lu...@googlegroups.com

Nando Breiter

unread,
May 20, 2015, 12:34:30 PM5/20/15
to lu...@googlegroups.com
Thanks everyone. Changing environment variables it is, then!



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Mark Drew

unread,
May 20, 2015, 12:40:31 PM5/20/15
to lu...@googlegroups.com
Yeah, never change the code in catalina.sh, it just points to your Environment variables. 


Mark Drew


develop • deploy • deliver
http://charliemikedelta.com

AJ Mercer

unread,
May 20, 2015, 9:48:35 PM5/20/15
to lu...@googlegroups.com
on the server web admin you will see details
/lucee/admin/server.cfm

General Info

VersionLucee 4.5.1.012 final
Version NameNeo
Release date28/04/2015
ColdFusion® compatibilty version10.0.0.0

Configuration File/opt/railo/lib/lucee-server/context/lucee-server.xml
OSLinux (3.4.0) 32bit
Remote IP127.0.0.1
Host Namewebonix.net
Servlet Container
Java1.7.0_25 (Oracle Corporation) 32bit
Architecture32bit

On 20 May 2015 at 22:07, Nando Breiter <na...@aria-media.com> wrote:
How to determine which JVM / Java version Lucee is using?
How does one update the JVM?

From the output of startup.sh on my dev laptop, a Mac, I see
Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"

but I'm not sure how to check which version of Java is installed there, or how to point Lucee to another path with an updated JRE.
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nando Breiter

unread,
May 21, 2015, 10:08:44 AM5/21/15
to lu...@googlegroups.com
To review, I've been trying to get Lucee to use a more recent JVM on my Mac dev machine. Right now, it's using 1.6.0_65. 

Here's what I've done.

2) installed the dmg file
3) ran /usr/libexec/java_home -V   to find the installation path, here's the output:

Matching Java Virtual Machines (3):
    1.7.0_79, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
    1.6.0_65-b14-462, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Lovely.

Following the instructions here:


4) I created a .profile file in my home directory and added the following line to it:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

Restarted just to make sure the changes were picked up

5) ran env on the command line, and bummer, the environment variable was not set.

6) As per a comment in the above, I moved the export statement to the existing .bash_profile file in my home directory

Restarted

7) ran env and now I see

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

Brilliant.

So I start Lucee and check which version of Java it's using ....

1.6.0_65

Bummer.

As has been mentioned before in this thread, the Java paths are set in catalina.sh. Here's some relevant info from catalina.sh:

#   JAVA_HOME       Must point at your Java Development Kit installation.
#                   Required to run the with the "debug" argument.
#
#   JRE_HOME        Must point at your Java Runtime installation.
#                   Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
#                   are both set, JRE_HOME is used. 

Oh, ok. So 

8) I add export JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home to the .bash_profile file in my home directory, log out and back in. Then

9) I ran env, and now I also see JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home in the output. Now we're getting somewhere!

Restart Lucee and check which version of ... sigh ... still 1.6.0_65

Noting that at startup it says 

Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"

I google "change currentjdk mac"

Find the following link:


Feeling hopeful, 

10) I change the symlink, log out and back in to make sure the changes are picked up

Restart Lucee and check which version of Java is being used in the Overview admin panel by clicking on the Lucee logo,

and wala! Lucee is now using 1.7.0_79 


Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Igal @ Lucee.org

unread,
May 21, 2015, 12:20:59 PM5/21/15
to lu...@googlegroups.com
great!  now you can easily update it to Java 8u45 ;)


Igal Sapir
Lucee Core Developer
Lucee.org

Reply all
Reply to author
Forward
0 new messages