简体   繁体   中英

NetBeans Java OpenGL Library not being found

I'm trying to setup Java OpenGL in NetBeans. I have the library imported, and the ones that I'm trying to include in the file are located at:

HelloWorldJOGL > Libraries > JOGL - jogl-java-src.zip > javax.media.opengl >

All of the libraries being included are there (I can search through them and open them in the project tree in NetBeans), but NetBeans is saying it can't find it. I'm not sure how to tell it specifically to look in the Libraries folder, which seems redundant to me, anyway.

The program files are located at:

HelloWorldJOGL > Source Packages > helloworldjogl > HelloWorldJOGL.class

HelloWorldJOGL > Source Packages > helloworldjogl > HelloWorldJOGL.java

I'm not sure how to let it know the libraries are included, like I included them. Again, to me it seems like it's being really stupid, but I really would like to solve it.

The specific error is called, "package javax.media.opengl does not exist."

It's really easy, just go to projects Tab and then in your project right click on Libraries and click on either Add Library or you can click on Add JAR/Folder. I think this will resolve your problem.

Netbeans allow us to install plugins, these can be really helpful some time,
like here for using OpenGL here is a plugin for it.
And if you want to know how to install plugins, it's very simple,
Steps for installing plugin,

  1. Goto 'Tools' menu tab
  2. click on 'Plugins'
  3. Goto 'Downloaded' Tab
  4. Click on 'Add Plugins'
  5. Browse for the actual jar file of the plugin, or select all NBM files from the zip file you downloaded
  6. Click on 'Install'

You have to extract the zip archive into a folder! If that doesn't work then you may need the natives for your OS.

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