JDK-8202680 : javax.sound tests should not set java.home system property
  • Type: CSR
  • Component: client-libs
  • Sub-Component: javax.sound
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2018-05-05
  • Updated: 2018-05-29
  • Resolved: 2018-05-29
Related Reports
CSR :  
Description
Summary
-------

Default configuration of JavaSound cannot be customized.

Problem
-------

There is no way to provide location of "sound.properties", which is by default located in the jdk/conf folder. For the similar purpose for logging the next property is used: "java.util.logging.config.file" which points to "logging.properties"

Solution
--------

The new optional "javax.sound.config.file" system property can be added, which specified default location of the  "sound.properties".

Specification
-------------

     src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java

      * Properties can be used to specify default MIDI devices. Both system
      * properties and a properties file are considered. The "sound.properties"
      * properties file is read from an implementation-specific location (typically
    - * it is the {@code conf} directory in the Java installation directory). If a
    + * it is the {@code conf} directory in the Java installation directory).
    + * The optional "javax.sound.config.file" system property can be used to specify
    + * the properties file that will be read as the initial configuration. If a
      * property exists both as a system property and in the properties file, the
   
======

    src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java

      * Both system properties and a properties file are considered. The
      * "sound.properties" properties file is read from an implementation-specific
      * location (typically it is the {@code conf} directory in the Java installation
    - * directory). If a property exists both as a system property and in the
    + * directory). The optional "javax.sound.config.file" system property can be
    + * used to specify the properties file that will be read as the initial
    + * configuration. If a property exists both as a system property and in the
      * properties file, the system property takes precedence. If none is specified,


Reference for convenience
http://cr.openjdk.java.net/~serb/8201279/webrev.02/
Comments
Moving to Approved.
29-05-2018