Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System property

 
Ann Sebastian
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to set a property other than System.java properties and get them.Can this be done using System.getProperty and System.setProperty
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Ann Sebastian
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff,
I guess the previous code sets the property related to java.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I'm confused. Are you asking how to set shell-level environment variables?

ps. If you are using the current version of Java, Sytem has a method that
let's you access environment variables:
[ November 14, 2005: Message edited by: Jeff Albrechtsen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic