-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
14, 15
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
openjdk full version "14+36-1461"
A DESCRIPTION OF THE PROBLEM :
When quoting the class path inside an argument file, the class path doesn't seem to be parsed correctly, and the main class isn't found
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In any folder X:
* create a subfolder "test", which contains the file "Issue.java" as given below
* run: javac test\Issue.java
* create a file "argfile" with the following content: -cp "C:\Users\XX\Desktop"
* run: java @argfile test.Issue
* notice the actual vs expected result. Now if you remove the quotes in "argfile" & run java command again, the result will be as expected
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Hello world
ACTUAL -
Error: Could not find or load main class test.Issue
Caused by: java.lang.ClassNotFoundException: test.Issue
---------- BEGIN SOURCE ----------
package test;
class Issue {
public static void main(String... args) {
System.out.println("Hello world");
}
}
---------- END SOURCE ----------
openjdk full version "14+36-1461"
A DESCRIPTION OF THE PROBLEM :
When quoting the class path inside an argument file, the class path doesn't seem to be parsed correctly, and the main class isn't found
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In any folder X:
* create a subfolder "test", which contains the file "Issue.java" as given below
* run: javac test\Issue.java
* create a file "argfile" with the following content: -cp "C:\Users\XX\Desktop"
* run: java @argfile test.Issue
* notice the actual vs expected result. Now if you remove the quotes in "argfile" & run java command again, the result will be as expected
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Hello world
ACTUAL -
Error: Could not find or load main class test.Issue
Caused by: java.lang.ClassNotFoundException: test.Issue
---------- BEGIN SOURCE ----------
package test;
class Issue {
public static void main(String... args) {
System.out.println("Hello world");
}
}
---------- END SOURCE ----------