简体   繁体   中英

Import / Dependency Cannot be Resolved in Maven

I'm using a program that relies on the following two imports:

import org.lwjgl.opencl.CLDevice;
import org.lwjgl.opencl.CLPlatform;

Eclipse is reporting that the "import cannot be resolved" even though I've added LWJGL OpenCL as a dependency to my project.

Here's a snapshot of my POM file:

<dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opencl</artifactId>
    <version>3.1.6</version>
</dependency>

I've read somewhere that these classes only exist in an earlier version so I tried changing the version to all of the versions found here ( from 3.1.0 to 3.1.6) but none of them resolved the issue.

Is there an earlier/different version that is not on the Maven repository page? If not where could I find the said class?

Thanks

It seems that you are using the abandoned lwjgl v2 library. It can be found in another Maven repository:

<dependency>
    <groupId>org.lwjgl.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <version>2.9.3</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM