Reputation: 5
I've got code that requires the use of the Desktop import on Netbeans, I've downloaded the jar folder ae-awt.jar that contains the import to use. When i've added the import
import ae.awt.java.Desktop
the program allows me to use it and gives the suggested code after each period, however when I run the program I'm presented with the error "error: package ae.java.awt does not exist import ae.java.awt.Desktop;"
I don't understand why this is not working as I have added the package to my libraries folder. Does anyone know how to fix this?
Thank you
Upvotes: 0
Views: 1939
Reputation: 196
Maybe the jar is not in your classpath. Check if you have the jar in project properties > Libraries > Compile tab. Check also if the jar is specified in the classpath (click on the "Run Ant target" button under the "Repeate Run" button")
Upvotes: 1