Community
Participate
Working Groups
Created attachment 282572 [details] import not found example After migrating from Java 8 to Java 11, I got a lot of odd compiling issues. For example, in ReapService.java, there is an import error: The import xxx.framework.utility.interprocessUtil.JniEnvironmentException cannot be resolved. But actually JniEnvironmentException.java is well compiled and I can see the JniEnvironmentException.class file. The way to solve the compiling issue is to edit ReapService.java (e.g.: add a new blank line which will not introduce new compiling error) and Save (Build Automatically) and the compiling issue disappears. After all the import errors are resolved in this way, then the application could be started normally. But sometimes if trigger a build (or clean project), these errors occur again. I also tried to use maven to build the project and the build is successful.
Note that we have hundreds of java source files and every time we got the same compiling files.
I tried the eclipse 4.10 and this issue never occurs.
please provide a zipped project for reproducing the issue, thanks. Please also check if any related exceptions were logged to the Errors view / <workspace>/.log file.
Created attachment 282607 [details] Error "Cannot resolve type" for correctly compiled class
This error occurs for https://github.com/adempiere/adempiere project which can be downloaded from GitHub. This project have some what circular dependecies, but it seems that class CompiereColor can not be resolved, even if it is correctly compiled and in classpath. This project contains subproject which can complicate things. Use only "adempiere" project when importing from Eclipse.
Thanks for mentioning adempiere. We had several issues with that project before, see bug 543070. The bottom line was: that project is (was?) not yet ready for JPMS, in particular it listed several dependencies that created illegal clashes with modules from the System library. Please check if you also see problems of the kind: The package javax.xml is accessible from more than one module: <unnamed>, java.xml Please note that javac (and thus a regular maven build) illegally keeps silent about this error, more info on this: * https://stackoverflow.com/questions/51094274/eclipse-cant-find-xml-related-classes-after-switching-build-path-to-jdk-10/53824670#53824670 * https://bugs.openjdk.java.net/browse/JDK-8215739 Also see bug 543070 comment 8 for steps that helped one user to compile that broken project with Eclipse.
Yo are right. It seems that there is somewhere already this package and this causes this problem.
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.