Bug 537445 - Runtime warning "Unknown module"
Summary: Runtime warning "Unknown module"
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 10
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-27 06:51 EDT by Donny Dumb CLA
Modified: 2022-08-01 19:11 EDT (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 Donny Dumb CLA 2018-07-27 06:51:26 EDT
happens in photon when

- in the buildpath config, jre's module encapsulation is modified via --add-exports 
- more than 1 packages are added

a sample .classpath file:

<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/10-64-plain">
		<attributes>
			<attribute name="module" value="true"/>
			<attribute name="add-exports" value="java.desktop/com.sun.beans.util=ALL-UNNAMED:java.desktop/com.sun.beans=ALL-UNNAMED"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="bin"/>

sample code:

package plainjava;

/**
 */
public class SimpleMain {

    public static void main(String[] args) {
        System.out.println("seeing ...");
    }
}

output:

WARNING: Unknown module: ALL-UNNAMED:java.desktop/com.sun.beans=ALL-UNNAMED specified to --add-exports
seeing ...

I can get rid off the warning by editing the default dependencies in the runtime configuration, the default is:

--add-exports java.desktop/com.sun.beans.util=ALL-UNNAMED:java.desktop/com.sun.beans=ALL-UNNAMED

edited to the format a commandline java expects:

--add-exports java.desktop/com.sun.beans.util=ALL-UNNAMED --add-exports java.desktop/com.sun.beans=ALL-UNNAMED
Comment 1 Eclipse Genie CLA 2020-08-02 12:19:27 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 2 Donny Dumb CLA 2020-08-03 06:57:29 EDT
looks fixed - now (Eclipse 2020-03) the default runtime dependencies are mapped as java expects (that instead of a single --add-exports with colon-separated list of exported packages now it's multiple --add-exports with a single package each)
Comment 3 Eclipse Genie CLA 2022-08-01 19:11: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.