JDK-4873508 : Accept system properties via new mechanism
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-06-03
  • Updated: 2013-05-28
  • Resolved: 2013-05-28
Related Reports
Duplicate :  
Relates :  
Description
Name: gm110360			Date: 06/03/2003


A DESCRIPTION OF THE REQUEST :
Currently there is only one way to pass system properties into a Java application on startup - via the -D command line switch.

On some operating systems there is a command line length limit, which can retrict the use of this feature.

This is a request for a new mechanism to allow system properties to be specified on application startup.  For example a command line switch that allows the specification of a properties file.

JUSTIFICATION :
The only workaround available is to write a bespoke mechanism to be invoked within the application.  This may not always be possible, for example if the developed code runs within a third party application, like a web app in a web container.

Generally speaking this would be a feature useful to any java code that makes use of system properties.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a new command line switch, say -sp, might be used:

java -sp mysystem.properties com.mydomain.MyApp

where mysystem.properties is a properties file that contains properties to be added to the default system properties, overriding any defaults.
(Review ID: 187024) 
======================================================================

Comments
This is really duplicated by JDK-4326573
28-05-2013

EVALUATION Worthy of consideration. ###@###.### 2004-11-12 01:30:25 GMT
12-11-2004

SUGGESTED FIX ###@###.### 2003-06-04 The jar command accepts "@<filename>" on its command line to indicate that additional arguments are to be taken from the file named. This is a windows related style which is documented only in the windows docs for the jar command, but works on solaris as well. The java command could be adapted to use this feature as well.
11-06-2004