cancel
Showing results for 
Search instead for 
Did you mean: 

Custom JVM property

Former Member
0 Kudos

I am trying to figure out how to add a custom jvm property that my Java application can read with code similar to the following:

String test= System.getProperty("test");

The only thing that I have found on http://help.sap.com is a reference to a instance.properties file located in \usr\sap\ET1\JC00\j2ee\cluster. Is that where I should add my property? If so is the format something like:

test=somevalue

Thanks,

Steve

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Steve,

change the servers JVM settings through the Config tool, see for http://help.sap.com/saphelp_nw04/helpdata/en/ef/61ca70718e4992befe589d9fb9d37b/frameset.htm details.

There, use the "-D" option, that it "-Dtest=testvalue", see for some discussion on this.

Hope it helps

Detlev

PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Former Member
0 Kudos

I ran the \usr\sap\ET1\JC00\j2ee\configtool\configtool.bat but I don't see where I can add my own JVM property.

detlev_beutner
Active Contributor
0 Kudos

Hi Steve,

I'll take you by your hand... and that after midnight...

Start the config tool (use DB defaults) -- cluster-data -- instance_... -- Server -- Tab: General -- Under "Java Parameters" add your setting (there are already some -D options set).

After that, push the disk symbol (apply changes). Restart the server as stated.

Hope it helps

Detlev

Former Member
0 Kudos

Thanks, that did it. The reason that I didn't see it was that I was expanding the nodes under managers and services instead of just selecting the server node.

Thanks again,

Steve

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Yes the format of property files are always "key-value pair". Represented as "variable=somevalue". It is a good practice to have individual property file for each user application.

Can you be specific, what value are you trying to set for JVM in the jvm.properties file?

Thank you,

Kannan