Bug 559552 - Run configuration/Debug Configuration in 2019/12 release
Summary: Run configuration/Debug Configuration in 2019/12 release
Status: CLOSED DUPLICATE of bug 558495
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.14   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: core, vm
Depends on:
Blocks:
 
Reported: 2020-01-26 17:23 EST by Michael McCollough CLA
Modified: 2020-01-26 17:27 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael McCollough CLA 2020-01-26 17:23:05 EST
I upgraded from 2019/06 to 2019/12 and OpenJDK 10 latest version. My existing project test classes and even plain java classes will not execute. I will get class not found even with a simple default package public static void main(String[] args) { System.out.println("Test"); } I noted on the run config if I do show command line it is using the @drive:\path syntax to execute. I tried using this with -verbose and do not see that jdk is actuall setting the classpath at all (first time using -verbose but I assume it should show something there).

I was able to get the simple test class I wrote to work by adding -cp fakepathhere

In doing that, it seems to then change command line to use -classpath argument and things work now. 

Command line copy original (with simple test class):
C:\Development\64-bit-JVMs\openjdk-11\bin\javaw.exe -Dfile.encoding=UTF-8 "@C:\Development\Code\OT-Git\d2-addons\xxxx\D2SingleTaskWorkflow\.temp-DeleteMe-classpath-arg-1580075596075.txt" DeleteMe
Result:
Error: Could not find or load main class DeleteMe
Caused by: java.lang.ClassNotFoundException: DeleteMe


By adding -cp blahblahblah argument with a fake/non-existing path:
C:\Development\64-bit-JVMs\openjdk-11\bin\javaw.exe "@C:\Development\Code\OT-Git\d2-addons\xxxxxx\D2SingleTaskWorkflow\.temp-DeleteMe-classpath-arg-1580075684631.txt" -Dfile.encoding=UTF-8 -classpath "C:\Development\Code\OT-Git\d2-addons\xxxxxx\D2SingleTaskWorkflow\bin\all-eclipse;C:\Development\Code\OT-Git\d2-addons\xxxxxx\DTWO-Commons\bin;C:\Development\Code\OT-Git\d2-addons\xxxxxx\Distributions\16.4-Libs\RPS\DmcPolicyEngine.jar........" There are 301 items in the classpath


The added blahblahblah is not in the classpath args that get passed to the run configuration but given the change in what eclipse does for launching, it works. Results:
Output: Testing

If I try debug this way, it will not work at all with -cp (I get same class not found without -cp). With -cp I get:
Exception occurred executing command line.
Cannot run program "C:\Development\64-bit-JVMs\openjdk-11\bin\javaw.exe" (in directory "C:\Development\Code\OT-Git\d2-addons\xxxxxx\D2SingleTaskWorkflow"): CreateProcess error=206, The filename or extension is too long



-- Configuration Details --
Product: Eclipse IDE 4.14.0.20191212-1200 (org.eclipse.epp.package.jee.product)Installed Features:
 org.eclipse.jdt 3.18.200.v20191210-0610
Versioning Plugin:
 org.eclipse.platform 4.14.0.v20191210-0610
Comment 1 Andrey Loskutov CLA 2020-01-26 17:27:25 EST
Please try 4.15 M1.

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