Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best way to set System.property  RSS feed

 
kumaran dhakshna
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,

Where can I specify JVM system properties for a servlet container?

I need these properties need to be set before the application starts.

eg: System.setProperty("tempdir","\myapplication\mypack\classDir");

thanks in advance
 
Jay King
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can specify the system properties on the command line when you start your application:

java -Dtempdir=myapplication\mypack\classDir MyApp

If you are running Tomcat, you can just set the JAVA_OPTS. http://jakarta.apache.org/tomcat/faq/misc.html#properties

~Jay
JavaRSS.com, Java News, Java Articles and Java Blogs, Just one Bookmark.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!