Bug 256584 - Error Executing java class with main-method and long classpath
Summary: Error Executing java class with main-method and long classpath
Status: CLOSED DUPLICATE of bug 327193
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-26 04:48 EST by insane CLA
Modified: 2012-02-23 13:17 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description insane CLA 2008-11-26 04:48:34 EST
I try to execute a java main class with right-click, run as java program. Then the following exception occurs

-- Error Details --
Date: Wed Nov 26 10:39:50 CET 2008
Message: Exception occurred executing command line.
Severity: Error
Plugin: org.eclipse.debug.core
Exception Stack Trace:
java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.5.0_16\bin\javaw.exe" (in directory "D:\workspaces\workspace-trunk\trunk\runtime\init\runtime-init-server"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:798)
at org.eclipse.jdt.launching.AbstractVMRunner.exec(AbstractVMRunner.java:70)
at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:317)
at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:101)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1083)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
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)
... 11 more
Comment 1 Andrew Eisenberg CLA 2008-11-26 12:14:13 EST
Is the class that you are running pure Java, or does it have some AspectJ entities in it?

Are you doing "Run As Java Application" or "Run As AspectJ/Java Application"?
Comment 2 insane CLA 2008-11-27 03:01:44 EST
It is a pure java class. Maybe i placed this bug in the wrong category... AJDT and JDT is awfully the same..
Comment 3 Andrew Eisenberg CLA 2008-11-27 12:56:18 EST
Moving this over to JDT.

Would be good if you could provide more information such as the classpath.
Comment 4 Michael Rennie CLA 2008-11-28 09:45:10 EST
As well as the class path could you supply:

1. the example java file that demonstrates the problem
2. any VM arguments / parameters you are passing in to the program
Comment 5 Darin Wright CLA 2009-06-17 11:32:31 EDT
We need more information to consider this bug report. Can an example be provided? Does the problem still exist? Does the problem ocurr on 3.5?
Comment 6 Warren Paul CLA 2010-01-22 16:37:15 EST
This appears to be a general problem on Windows when the class path gets too long or contains spaces.  I'm poking around Bugzilla to see if I can find a better solution, but from what I've found so far, those would be the only known workarounds.
Comment 7 George Bloggs CLA 2012-02-22 12:08:55 EST
BUG #327193 is a duplicate of this, but has more votes.

Also, this line issue is seen on Windows 7 too.
Comment 8 Michael Rennie CLA 2012-02-23 13:15:53 EST
*** Bug 327193 has been marked as a duplicate of this bug. ***
Comment 9 Michael Rennie CLA 2012-02-23 13:17:28 EST
Marking as a dupe of bug 327193 as there is more discussion and potential patches on that bug.

*** This bug has been marked as a duplicate of bug 327193 ***