Posted: Tue Dec 08, 2009 1:20 am Post subject: JRE command line options (need to add a -Dmyvariable= )
Novice
Joined: 02 Sep 2005 Posts: 19
Is there a way of adding a JRE OPTS line to the JRE launcher in MB 6.1 ?
I require to access a JAVA system property inside my java code.
Lets say, its called 'PID' (because it is!).
so, if it was a regular java program I'd execute it thus:
java -DPID=$$ myprog.class
So - how can I add the '-DPID=$$' to the MB JRE launcher so that the JRE knows about my java system variable ?
Note: I know I could setProperty in java, etc, etc... however this is not an option here because:
1) it would mean changing code depolyed - I am looking for a no code change fix.
2) Thw whole point of this is to pass the PID in - so it has to be on the command line (and yeh - I know I could access this from java - again - it has to be no code change fix)
To sort of answer my own question as it might help others:
It turns out that there are many system properties set internally by the DFE when it inits the JRE!
After deploying a node to print them all out, I found that each of the ESQL properties has a java property - even though the documentation states that in java they are only accessible from the MbNode API:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum