File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Adding entry to default system property. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Adding entry to default system property." Watch "Adding entry to default system property." New topic
Author

Adding entry to default system property.

Chitra Arjunan
Greenhorn

Joined: Mar 03, 2011
Posts: 2
Hi All,

I need to include the system property (as a part of default system property. not in a new property file) that can be accessed across application?
Is it possible?

- Chitra
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10489
    
    9

Welcome to the Ranch.
Have you tried System#setProperty(String key,String value)?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Chitra Arjunan
Greenhorn

Joined: Mar 03, 2011
Posts: 2
Thank.. .yeah i tried that, but the property cannot be shared by other applications, until the other application knows the name of the property file
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10489
    
    9

A system property is a global variable. You do not need the properties file. All your application needs is the name of the property.
PS. Do your applications share the same JVM?
 
jQuery in Action, 2nd edition
 
subject: Adding entry to default system property.