It's not a secret anymore!
The moose likes Websphere and the fly likes passing -Darg=val while starting WebSphere (AppServer) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "passing -Darg=val while starting WebSphere (AppServer)" Watch "passing -Darg=val while starting WebSphere (AppServer)" New topic

passing -Darg=val while starting WebSphere (AppServer)

Venkata Ramba

Joined: Jan 18, 2013
Posts: 4
I'm trying to find a way to pass a custom (name, value) pair as part of server start. I know it works fine when we pass some thing like:
java -Darg=something Test

for a stand-alone application, and inside Test, we can get access to arg as:

But, how to achieve this kind of thing in the WebSphere environment. I tried to pass -Dprop=something, in the startServer.bat, but could not get it's value in a CmdImpl class, after the start of the App Server.
Is there a way to pass a custom property and value to WebSphere Commerce environment. Thanks for your thoughts.

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3322
Howdy !

You can't do this in command line.

You need to use ISC for this, please refer this technote


Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz
Rambabu Balla

Joined: Aug 25, 2013
Posts: 4
Thanks a lot. It works.
I agree. Here's the link:
subject: passing -Darg=val while starting WebSphere (AppServer)
It's not a secret anymore!