Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

setting Java parameters on startup

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic