Bug 538186 - extensionpoint org.eclipse.jdt.launching.runtimeClasspathEntryResolvers is broken with Java 9 and above
Summary: extensionpoint org.eclipse.jdt.launching.runtimeClasspathEntryResolvers is b...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-23 00:44 EDT by Vimil Saju CLA
Modified: 2023-04-23 11:37 EDT (History)
2 users (show)

See Also:


Attachments
PluginProject which implments runtimeclasspathresolver extension (1.06 MB, application/octet-stream)
2018-08-23 02:37 EDT, Vimil Saju CLA
no flags Details
project that uses the test runtimeclasspath container provided by plugin project (2.99 KB, application/octet-stream)
2018-08-23 02:39 EDT, Vimil Saju CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vimil Saju CLA 2018-08-23 00:44:08 EDT
When using any JRE abouve 1.8 to launch an java main application from with eclipse extensions implementing the extension point org.eclipse.jdt.launching.runtimeClasspathEntryResolvers is never invoked.

This causes the application to fail with ClassNotFounException because the necessary libraries don't get included in the classpath.
Comment 1 Andrey Loskutov CLA 2018-08-23 00:45:48 EDT
Would be nice to get an example project demonstrating the problem.
Comment 2 Vimil Saju CLA 2018-08-23 02:37:33 EDT
Created attachment 275496 [details]
PluginProject which implments runtimeclasspathresolver extension

This is the plugin project that implements the runtimeclasspathresolver extension
Comment 3 Vimil Saju CLA 2018-08-23 02:39:35 EDT
Created attachment 275497 [details]
project that uses the test runtimeclasspath container provided by plugin project

This is the test project that uses the test runtimeclasspath container provided by the plugin project in the previous attachment
Comment 4 Vimil Saju CLA 2018-08-23 02:44:38 EDT
(In reply to Andrey Loskutov from comment #1)
> Would be nice to get an example project demonstrating the problem.

I have attached two zip files to this bug
The first zip file is an eclipse plugin project that provides test runtime classpath container

The second zip file contains a java project that uses the the test runtime classpath container.
This project has a Test.java class with a main method in it.

If this class is run using JRE 8 then the class runs successfully printing out the name of a class that was loaded from the jar file provided by the test runtime classpath container at runtime.

class org.boon.Boon


If the class is run using any JRE higher than JRE 1.8 then the class terminates with a classnotfound exception 

Exception in thread "main" java.lang.ClassNotFoundException: org.boon.Boon
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:291)
	at TestClass.main(TestClass.java:4)
Comment 5 Eclipse Genie CLA 2020-09-14 10:12:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Eclipse Genie CLA 2023-04-23 11:37:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.