How to switch Java Version used by Servoy Developer

Questions and answers for all installation-related topics for Servoy products

How to switch Java Version used by Servoy Developer

Postby Bernd.N » Wed Oct 26, 2016 7:05 pm

On a new Win10 machine, we installed several Java Versions, as an iReport 5.5 we still use needed a quite old Java version (1.6.25 when I remember it right).
As a consequence, that machine has now three Java installed like this.
How can I tell Servoy to use Java 111?

java_infos.png
java_infos.png (17.22 KiB) Viewed 949 times


A bit strange is that when I open DOS and type "java -version", it answers with "java version 1.8.0_66", although the 111 is activated in the picture above.

In the Servoy Application Server I can see it uses Java 66.
So I guess that is used also by the Servoy Developer, right?

app_server_infos.png
app_server_infos.png (59.42 KiB) Viewed 949 times
Last edited by Bernd.N on Thu Oct 27, 2016 11:42 am, edited 4 times in total.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Which Java is used by my Servoy Developer?

Postby Peter de Groot » Thu Oct 27, 2016 7:39 am

Hi,

Open the servoy admin via the help menu,

2016-10-27_0735.png
2016-10-27_0735.png (19.86 KiB) Viewed 927 times


There you'll find the JAVA version

sv_admin.png
sv_admin.png (56.71 KiB) Viewed 927 times


Regards,

Peter
Servoy 7.3.x || 7.4.x

NEM ENERGY BV
Peter de Groot
 
Posts: 207
Joined: Thu Jan 10, 2008 8:38 pm
Location: Has been compromised :-/

How to switch Java Version used by Servoy Developer

Postby Bernd.N » Thu Oct 27, 2016 9:49 am

Sorry, Peter, my topic header wasn't choosen very good, I changed it now. :)
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: How to switch Java Version used by Servoy Developer

Postby Andrei Costescu » Wed Nov 02, 2016 8:27 pm

You don't need to change the active installed java.
Developer can be configured to run using any Java by adding this:

Code: Select all
-vm
c:\Program Files\Java\jdk1.7.0_51\bin\java.exe

in the developer/servoy.ini file. Make sure you add it somewhere before -vmargs (you can add it right above that) so that it's not interpreted as a vm arg.
Also you can use there javaw.exe instead of java.exe to avoid the backgound console window.

For the stand-alone app. server you know how to do it right?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 902
Joined: Tue Jun 26, 2007 3:14 pm

Re: How to switch Java Version used by Servoy Developer

Postby Bernd.N » Wed Nov 02, 2016 10:23 pm

Thank you, that worked well!

I added in my case
Code: Select all
-vm
C:\Program Files\Java\jdk1.8.0_111\bin\javaw.exe

And I have the feeling that the solution is more snappy now. In any case it is a good feeling to use the latest java.

Andrei Costescu wrote:For the stand-alone app. server you know how to do it right?

Not really, although I looked through the docs, though I could have missed that section:
https://wiki.servoy.com/display/Serv7/Application+Server
Could you please tell me?
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: How to switch Java Version used by Servoy Developer

Postby Andrei Costescu » Thu Nov 03, 2016 3:12 pm

You are welcome.

When using servoy application server stand-alone install as a service:
- change this configuration option in "[...]\application_server\service\wrapper.conf": wrapper.java.command . I am not sure if the service needs to be reinstalled or not but I think not.
(see http://wrapper.tanukisoftware.com/doc/e ... s-jvm.html or http://wrapper.tanukisoftware.com/doc/e ... rties.html for all kinds of other service wrapper config options)

When using servoy application server stand-alone install started using the bat/sh scripts:
- you could manually edit the script files and replace "$CMD_LINE_START"/"%CMD_LINE_START%" in the line which starts app. server with the java executable that you want
- you can set CMD_LINE_START env. variable to point to the java.exe that you want (for windows you also have to set CMD_LINE_CHANGED=yes)

If you are using war deployment check your container documentation on how to specify the java version that it is using. For example Tomcat looks at JAVA_HOME and JRE_HOME which can be globally specified or, depending on your OS, you can also put it in setenv.bat or some other config file to make it not affect the whole system; if you are using it as a service then you need to configure the service and so on. If you are not the one hosting that container just ask the hosting ppl. about that.

I will see if this can be added in wiki.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 902
Joined: Tue Jun 26, 2007 3:14 pm

Re: How to switch Java Version used by Servoy Developer

Postby Bernd.N » Thu Nov 03, 2016 4:02 pm

Ok, thanks again!
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany


Return to Installation

Who is online

Users browsing this forum: Bing [Bot] and 1 guest