• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM Arguments  RSS feed

 
Lozza Luton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the correct way to provide JVM arguments when starting an application. On JBOSS i am providing them in my standalone.conf file as below;



but when in my java application i call the following



it is always null.

Thanks
 
Paweł Baczyński
Bartender
Posts: 2083
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Tmp -Denvironment=value

This prints:
value
 
Lozza Luton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paweł Baczyński wrote:java Tmp -Denvironment=value

This prints:
value


hmmmm - i really don't know what to investigate next :|
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of Java application is that? Is it running in the same JVM instance as the one you launched with those system properties? How exactly are you starting the server and which exact version of AS7/WildFly is this?
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use "ps" to print the command line arguments used to start JBoss AS - look at all of the java processes, one of them will be it. Verify that the -D values you set in standalone.conf are set. (By the way, I assume you are not running Windows...)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!