Forcing Servoy Server to run on a specific java version

Hi Guys,

I have a stupid problem which most probably have a very straightforward answer but I fail to find the answer. I have a windows machine running windows 7 64bit. The machine has got a few different versions of java installed on it. When I type java -version in the command prompt, I see the java version installed is java 1.8. I have a servoy server on this machine which sees java 1.8 on this machine. I need to force my server server to run on java 1.7 that is also installed on this machine instead of java 1.8. I know this can be done in the developer by modifying the servoy.ini file and pointing to the java version that you require the developer to run on, but I can’t find a way to do the same thing for the server?

Can anyone please tell me, how this can be done?

If you are running it as a windows service, you can do this by changing this line in application_server/service/wrapper.conf

wrapper.java.command=C:\Program Files\Java\jdk1.7.0_45\bin\java.exe

When running from servoy_server.bat, you can change this line:

if "%CMD_LINE_CHANGED%"=="" set CMD_LINE_START="C:\Program Files\Java\jdk1.7.0_45\bin\java" -server

Thanks Ruben,

I’ve got it working. I was setting the wrapper.java.command to one of my java installations and it was failing to start the service for some reason, tried it with another java installation and it worked.

Cheers,
Siavash