Page 1 of 1

specify properties at start up developer

PostPosted: Fri Jan 08, 2016 5:20 pm
by siemon.geeroms
Hi,

Can you specify the desired properties file with which you want to start your developer via for example cmd? I have different properties files that refer to other DB connections and I would like to start different workspaces with those different connections.

Kr,

Siemon

Re: specify properties at start up developer

PostPosted: Fri Jan 08, 2016 6:02 pm
by ROCLASI
Hi Siemon,

I see this is your first post. Welcome to the forum. :)

As for your question. You might want to check out this thread.

Hope this helps.

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 10:26 am
by siemon.geeroms
Hi,

Thanks for your quick reply, unfortunately the parameter "-Dproperty-file" is only working if I add it to the .ini file. If I add it as a parameter when executing the servoy.exe like this "C:\Servoy\developer\servoy.exe -Dproperty-file=test.properties" it is still taking the default "servoy.properties".

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 10:51 am
by Andrei Costescu
I think you need more something like:

Code: Select all
"C:\Servoy\developer\servoy.exe --launcher.ini <path_to_one_servoy.ini_file>"
and then you can make multiple copies of the .ini file that declare the -Dproperty-file

or

Code: Select all
"C:\Servoy\developer\servoy.exe -vmargs -Dproperty-file=test.properties"
but I don't know in this case if it just merges these -vmargs with the ones in your .ini file or not. Maybe you have to put all those from the ini here as well if it doesn't.

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 10:58 am
by Andrei Costescu
You can find an example of using directly -vmargs here viewtopic.php?f=13&t=13814#p72262.
For more info about startup arguments http://www.java-tutorial.ch/eclipse/ecl ... -arguments

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 12:06 pm
by siemon.geeroms
Andrei Costescu wrote:I think you need more something like:

Code: Select all
"C:\Servoy\developer\servoy.exe --launcher.ini <path_to_one_servoy.ini_file>"
and then you can make multiple copies of the .ini file that declare the -Dproperty-file


Thanks Andrei Costescu,

This worked, I've created a separate ini file and added this a argument to my shortcut!

Kind regards,

Siemon

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 2:27 pm
by Andrei Costescu
You are welcome! :)

Re: specify properties at start up developer

PostPosted: Tue Jan 12, 2016 5:05 pm
by Ruben79
I'm using separate batch files to start my Servoy projects, which works great:

Code: Select all
"<path_to>\servoy.exe" -data "<path_to>\project_workspace" eclipse -showlocation -vmargs -Xms40m -Xmx2048m -XX:MaxPermSize=512M -Dproperty-file=<project>.properties