Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Maven, Eclipse access to classes from dependency(Can't access classes from Maven)
Maven, Eclipse access to classes from dependency [message #1815849] Sat, 12 October 2019 19:02 Go to next message
Brian Jones is currently offline Brian JonesFriend
Messages: 1
Registered: October 2019
Junior Member
Hi,

It's my first go-around with Eclipse, Maven, and Java.

I've built a Maven Project with a dependency, which results in "BUILD SUCCESS" (right-click Project --> Run As --> Maven install). The POM shows the dependency, the dependency appears in the Package Explorer, and Maven Dependencies appear as a Library.

However, I can't seem to figure out how to use the classes from the dependency in my Java code.

I've tried "import com.aparapi.*" and various other import statements in my code, but Eclispse states that the import "cannot be resolved".

I've also tried Clean, Refresh, "Maven --> Update Project", and deleting the Project then re-importing as an existing Maven project.

I imagine this is a simple case of the import statement being incorrect, but I just can't figure out the correct one.

Thanks in advance for any help!

Best,
Brian.
Re: Maven, Eclipse access to classes from dependency [message #1815856 is a reply to message #1815849] Sun, 13 October 2019 06:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Are you using this?

https://www.eclipse.org/m2e/

Those tools help to configure the classpath used by the Maven project such that Eclipse's (JDT's) incremental compiler also knows the classpath as derived from the pom.xml dependencies.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:edi for assembler
Next Topic:Problem occured while invoking director
Goto Forum:
  


Current Time: Thu Apr 25 02:08:16 GMT 2024

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

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

Back to the top