Bug 565141 - ECJ should read the environment variable to know where to look for java jmods
Summary: ECJ should read the environment variable to know where to look for java jmods
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-10 18:28 EDT by Alain Tavan CLA
Modified: 2022-11-16 03:16 EST (History)
2 users (show)

See Also:


Attachments
environment variable and setup directory (57.66 KB, image/png)
2020-07-10 18:29 EDT, Alain Tavan CLA
no flags Details
without passing the module path gives errors (60.95 KB, image/png)
2020-07-10 18:30 EDT, Alain Tavan CLA
no flags Details
with module path just a warning and the class got compiled (53.57 KB, image/png)
2020-07-10 18:30 EDT, Alain Tavan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Tavan CLA 2020-07-10 18:28:10 EDT
Hi All,
I hope I fill in this feature request correctly.

I work in a company where nearly all developers use Eclipse IDE
Some (myself inc.) are using IntelliJ.
Before my company migrated to java 11, we could all use Eclipse Compiler (which has some benefits compared to javac)

But since our company migrated to java 11 it became harder for us to use ECJ.
The main reason seems to be that the compiler needs to know where the jmods are located. And somehow intellij is ignoring this parameter (I opened a support case at IntelliJ here : https://youtrack.jetbrains.com/issue/IDEA-245707 )

Neverthless, I admit that the required parameter could be avoided. Doesn't it add more complexity or source of error to somehow force the user to tell were too look at ? Why not use the environement variable and makes things more easy :) 


Is it possible to add such feature so that using the ECJ jar is less complicated ?
Comment 1 Alain Tavan CLA 2020-07-10 18:29:27 EDT
Created attachment 283564 [details]
environment variable and setup directory
Comment 2 Alain Tavan CLA 2020-07-10 18:30:11 EDT
Created attachment 283565 [details]
without passing the module path gives errors
Comment 3 Alain Tavan CLA 2020-07-10 18:30:42 EDT
Created attachment 283566 [details]
with module path just a warning and the class got compiled
Comment 4 Alain Tavan CLA 2020-07-10 18:31:29 EDT
this is the content of my Test.java file

import javax.smartcardio.CardTerminal;
public class Test {
	
	private CardTerminal terminal;
	
	public Test(){
		this.terminal = null;
	}
	
	public static void main(String[] args) {
		new Test();
		
	}
}
Comment 5 Jay Arthanareeswaran CLA 2020-07-30 09:28:45 EDT
I have not used IntelliJ, so I have no idea how ECJ is being used/invoked by the IDE. Assuming the ECJ is invoked via command line compiler, the the eclipse compiler picks up the system libraries either from the Java that is used to run the compiler of from the java.home system property.

If either of these things is in line, things should work fine.
Comment 6 Eclipse Genie CLA 2022-11-16 03:16:50 EST
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.