Page 1 of 1

Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 12:31 pm
by swingman
Hi all,

I have just upgraded a server to Mac OS 10.11.2 with Java 8u66.
Servoy Server 7.4.4 runs fine, but still wants legacy Java 1.6.
Is there any way of running servoy server on a Mac with a more modern Java?

Thanks,

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 12:38 pm
by ROCLASI
Hi Christian,

Does it really use Java 6? Can you open up the servoy admin page and check the top info on the home page?

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 12:42 pm
by swingman
Code: Select all
JVM Information
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.version=1.6.0_65
java.vm.info=mixed mode
java.vm.vendor=Apple Inc.

Operating System Information
os.name=Mac OS X
os.version=10.11.2
os.arch=x86_64


and

Code: Select all
java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)


Although I have Java 8u66 installed.

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 1:01 pm
by ROCLASI
Hi Christian,

What is the output of the following command?
Code: Select all
/usr/libexec/java_home -V

Is Java 8 in that list?

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 1:06 pm
by swingman
Code: Select all
Servoy-7-Server:JavaVirtualMachines username$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    1.6.0_65-b14-468, x86_64:   "Java SE 6"   /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386:   "Java SE 6"   /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

No, so this looks like a Java install issue on my Mac...

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 1:11 pm
by swingman
Getting the Java 8jdk...

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 1:13 pm
by swingman
Code: Select all
Matching Java Virtual Machines (3):
    1.8.0_65, x86_64:   "Java SE 8"   /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
    1.6.0_65-b14-468, x86_64:   "Java SE 6"   /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386:   "Java SE 6"   /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

That did the trick. Will restart server tonight to see what happens... Do I need to get rid of the 1.6.0jdk?

Re: Servoy Server Java on Mac OS X

PostPosted: Wed Jan 06, 2016 1:17 pm
by ROCLASI
Hi Christian,

No need to get rid of any of your JVM's. Just switch between them to make 8 the default JVM.
You can download a little GUI (java) tool here to switch between your installed JVM's.

After this you need to reopen your terminal to see the new mapping.

Hope this helps.

Re: Servoy Server Java on Mac OS X

PostPosted: Thu Jan 07, 2016 12:28 pm
by swingman
Hi Robert,

In the end I modified the wrapper.conf in the 'application server/service' directory to start like this:
Code: Select all
#********************************************************************
# Wrapper Properties
#********************************************************************

# Java Application
wrapper.java.command=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java

# Java Main class
...


otherwise it picks up the /usr/bin/java which is the old Java 1.6.

Apart from the first 2-3 minutes when it 'warms up' the server runs noticeably faster.

The GUI tool you mentioned will probably not work on El Capitan because of SIP protection.

Re: Servoy Server Java on Mac OS X

PostPosted: Thu Jan 07, 2016 12:46 pm
by ROCLASI
swingman wrote:The GUI tool you mentioned will probably not work on El Capitan because of SIP protection.

Works for me :)
(I am on Mac OS X 10.11.2)