Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Oxygen.2 cannot find org.junit.Test(Cannot compile code with "import org.junit.Test;")
Oxygen.2 cannot find org.junit.Test [message #1779292] Thu, 04 January 2018 23:59 Go to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 9
Registered: November 2010
Location: Vancouver
Junior Member
After importing the project https://github.com/ConSol/java9-modules-maven-junit-example compilation fails when trying to import "org.junit.Test' et al. This project builds, tests, runs fine via Maven.

Looking at the classpath in the Package Explorer, I can clearly see that "org.junit.Test" et al are on the classpath via junit-4.12.jar, but in the editor, it complains "the import org cannot be resolved"

Has anyone else had problems like this with Oxygen.2?

Should I report this as a defect, or does anyone have any ideas on what else to check in the configuration?

I note that in the past I have often seen Eclipse complain about imports this way, but for the life of me, I cannot remember what the resolution was. As far as I am concerned, if a project builds fine via Maven, then Eclipse should also be able to import and build it without issues.
Re: Oxygen.2 cannot find org.junit.Test [message #1779424 is a reply to message #1779292] Sun, 07 January 2018 09:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
I'm not very familiar with all the Java 9 features, but perhaps you have to do something in your model-info.java to requires/uses something from the other model. Perhaps it's better to post on the JDT forum where the Java tools experts are more likely to see your question.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Extend Syntax Coloring
Next Topic:Having trouble in installing a plug-in
Goto Forum:
  


Current Time: Thu Apr 25 11:56:51 GMT 2024

Powered by FUDForum. Page generated in 0.02819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top