Announcement Announcement Module
No announcement yet.
Add Java system property Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add Java system property

    I need to have an additional Java system property property set as part of the SpringDM server startup. The easy way to do this is to go into startup scripts and add it there. But I guess this is not the most graceful way to do it and also I need to do it programatically, so it gets a little tricky. I tried to look through the config files and through the startup scripts, but it does not look like I can configure this anywhere else.

    Am I missing a better way to accomplish what I need?


  • #2
    What version of dm-server you are using?

    If v2.0 - you can easily do this by creating a script in the bin directory and add your properties there

    # *ix type os system
    	-Xmx512m \
    	-XX:PermSize=128m \
    	-Dbundles.configuration.location=$KERNEL_HOME/config/propsloader/ \ \
    	-Dsolr.solr.home=$KERNEL_HOME/solr/" picks up JAVA_OPTS and passes them to the java process.

    If you need to set something programmatically - your code will need to call
    System.setProperty(key, val); somewhere.


    • #3
      Thanks. At this point we are still on 1.x. Once we move to 2.0 I will take advantage of the approach you have suggested, it does look exactly like what I need.

      Unfortunately I cannot set the property in the code since I need it at startup time.

      Thanks again for the response.