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

[launcher] java tools requires the whole argument containing spaces to be quoted

    XMLWordPrintable

Details

    • x86
    • windows_7

    Description

      in 1.8.0-ea javac no longer works when typing c:\"Program Files"\Java\jdk1.8.0\bin\javac or even c:\"Progra~1"\Java\jdk1.8.0\bin\javac (they find javac but then javac is doing strange things looking at the entire command line instead of just following the javac command).

      javac does not work correctly with the incorrect messages:

      c:\Temp\test>C:\"Program Files"\Java\jdk1.8.0\bin\javac *.java
      javac: file not found: Files\Java\jdk1.8.0\bin\javac *.java

      Usage: javac <options> <source files>
      use -help for a list of possible options

       

      c:\Temp\test>C:\"Progra~1"\Java\jdk1.8.0\bin\javac *.java
      Usage: javac <options> <source files>

      where possible options include:
        -g Generate all debugging info
        -g:none Generate no debugging info
        -g:{lines,vars,source} Generate only some debugging info
        -nowarn Generate no warnings
        -verbose Output messages about what the compiler is doing
        -deprecation Output source locations where deprecated APIs are used

      In the two examples above it is saying that the usage is incorrect, which it is not, and in fact depending on the command line both of which are calling javac *.java it gives two different messages of which both are incorrect.

      Have been using java for about 16 years and never seen this problem before. Need change my path to include the java bin directory and use javac by itself to get it to work.


      Attachments

        Issue Links

          Activity

            People

              ksrini Kumar Srinivasan
              tyao Ting-Yun Ingrid Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: