-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
System or security property
-
SE
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/
- csr of
-
JDK-8201279 javax.sound tests should not set java.home system property
-
- Resolved
-