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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 9990
    
    7

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: 9990
    
    7

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding entry to default system property.
 
Similar Threads
DriverManager class
javax.xml.parsers.DocumentBuilderFactory,static newInstance's concrete implementation.
Path for Temporary Directory
System.initProperties and setting default properties
How To: Path of JBoss Server deployment folder !