JDK-4165411 : java.lang.System: Forbid the modification of read-only system properties
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.1.6,1.2.0,1.3.0,1.4.0,6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic,windows_nt
  • CPU: generic,x86
  • Submitted: 1998-08-11
  • Updated: 2019-09-23
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Though many system properties are read-only, the VM and the runtime system
allow them to be set, sometimes with unpredictable if not disastrous results.
We should identify precisely which system properties are read-only and disallow
them from being set either on the command line or via the methods in the
java.lang.System class.  -- mr@eng 8/11/1998

Comments
21 years later and this is still a good idea ;-) Maybe something for JDK 14? As discussed in JDK-8231354, JVMCI already implements a version of the proposed API for the benefit and security of Graal. Both the Truffle framework and Truffle language implementations would benefit from being able to use system properties that are guaranteed not to have been modified by user code.
23-09-2019

EVALUATION This should be done, but careful thought and possibly some API changes are required. It's too late for 1.2. -- mr@eng 9/3/1998
03-09-1998