Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202680

javax.sound tests should not set java.home system property

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 11
    • client-libs
    • None
    • behavioral
    • minimal
    • System or security property
    • SE

    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/

      Attachments

        Issue Links

          Activity

            People

              serb Sergey Bylokhov
              rriggs Roger Riggs
              Philip Race, Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: