cancel
Showing results for 
Search instead for 
Did you mean: 

System.getProperty(string) with WAS 6.30?

Former Member
0 Kudos

Hi.

I want to set a system property, in order to get it with "System.getProperty(string)" inside my J2EE Web Application.

Where can I set it?

How exactly should I get it?

I'm using release 04 of NetWeaver (WAS ver 6.30), and programming java using the SAP NW Dev Studio 2.0.7

Thanks,

Nir Arazi

Accepted Solutions (1)

Accepted Solutions (1)

darrell_merryweather
Active Contributor
0 Kudos

You might be able to set this property in the config tool of the J2EE server, in the same place as the JVM settings for -Xmx. The you can get the using the System.getProperty("<my param>");

I hope this helps

Darrell

Former Member
0 Kudos

Hi Darrell,

thanks for the quick response.

Can you please specify the exact place I should put my variable in?

I'm new at these configurations (new to SAP NW WAS), and I'm drowning in all of the options in the config tool.

I looked for the place you've given me (JVM settings), but could not identify it for sure.

Thanks.

Former Member
0 Kudos

Hi Nir,

if you start the config tool, you see some nodes on the root level. There are two nodes named dispatcher_xxxx and server_xxxx where xxxx is a number. Interesting for you is the server_xxxx node. Clicking on it once, there's a property page on the right side, where the JVM properties mentioned before are listed. If you add a new property here (there's a button at the bottom), it should be accessible by System.getProperty().

But beware, if you are running multiple server nodes in a cluster, i'm not sure, if the property will be available for all server nodes or just for the one you changed it.

Hope that helps.

Regards

Stefan

darrell_merryweather
Active Contributor
0 Kudos

HI

Just to add the last post, if you have multiple servers then you will need to set this parameter in all server nodes in exactly the same method.

I also think that if you don't have the server set as an NT service (You can't get access to the parameters as they are greyed out), then you should change the cmdline.properties file

Just make sure that the parameter you are settings is not specific to any application you are writing (iView, webservice, etc) but specific to the JVM. If it is required for an application then perhaps this is not the best place to put the parameter.

Just something to keep in mind

D

Former Member
0 Kudos

Hi all,

and thanks for your answers.

I'm afraid none of the solutions works.

I can't seem to find any way to pass this Env. Var. to the JVM.

Any other suggestions?? anyone??

darrell_merryweather
Active Contributor
0 Kudos

Have you tried the following syntax in the configtool

-Dmyparam=myvalue

Darrell

Former Member
0 Kudos

Thanks a lot!

Now it works!

Answers (0)