chaucoder / checker-plugin

Automatically exported from code.google.com/p/checker-plugin
0 stars 0 forks source link

CommandlineJavacRunner#javaVM() doesn't work on Windows #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install Eclipse plugin
2. Enable Automatic Checking on a project
3. Run Nullness checkers

What is the expected output? What do you see instead?
Expected: Output in the Checkers Plugin Console
Instead: Analysis exception in the Error Log

What version of the product are you using? On what operating system?
Eclipse Helios
Checker Framework Feature 1.1.2.1
Windows XP Pro 32bit

Please provide any additional information below.
The CommandlineJavacRunner#javaVM() method assumes the Java executable is named 
"java" but on Windows it is named "java.exe"

Original issue reported on code.google.com by andrew.p...@gmail.com on 19 Jun 2011 at 3:00

GoogleCodeExporter commented 8 years ago
My assumption regarding CommandlineJavacRunner#javaVM() may well be wrong. 
Here's the stack trace:

java.lang.RuntimeException: java.io.IOException: Cannot run program "C:\Program 
Files\Java\jdk1.6.0_16\bin\java": CreateProcess error=87, The parameter is 
incorrect
    at checkers.eclipse.util.Command.exec(Command.java:55)
    at checkers.eclipse.util.Command.exec(Command.java:38)
    at checkers.eclipse.javac.CommandlineJavacRunner.run(CommandlineJavacRunner.java:66)
    at checkers.eclipse.actions.CheckerWorker.runChecker(CheckerWorker.java:112)
    at checkers.eclipse.actions.CheckerWorker.work(CheckerWorker.java:96)
    at checkers.eclipse.actions.CheckerWorker.run(CheckerWorker.java:77)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: Cannot run program "C:\Program 
Files\Java\jdk1.6.0_16\bin\java": CreateProcess error=87, The parameter is 
incorrect
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at checkers.eclipse.util.Command.exec(Command.java:47)
    ... 6 more
Caused by: java.io.IOException: CreateProcess error=87, The parameter is 
incorrect
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 10 more

Original comment by andrew.p...@gmail.com on 19 Jun 2011 at 3:03