File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting Java parameters on startup

 
Bret Waldow
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JBoss on GNU/Linux is started by /usr/share/jboss/bin/run.sh

In this script is a line that calls the Java JVM with parameters, and loads JBoss. I want to include set some Java parameters that our server uses when it loads. I know how to set command line parameters - -DparameterName=value.

What I want to know is how to set them without modifying the run.sh script that starts JBoss. Each time I upgrade the installed JBoss package, this script file will be overwritten, and would need to be edited and patched again. No, I don't expect to do this a lot, but I can't help but wonder if there is some canonical way JBoss intended for such parameters to be set, and if I don't ask, I'll never know. Setting the JAVA_OPTS environment variable doesn't do it - the run.sh script does not read the environment.

Cheers,
Bret
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic