0

I'm a learner in Coursera learning Java. They provide us with some libraries to help in learning, and they work on BlueJ, but I love NetBeans, so I tried to add these jar files to it. I did the following.

  1. Create new project
  2. Go to tools>libraries
  3. Add a new section called "Coursera"
  4. Add a jar files in it
  5. Go to the main class
  6. Import some classes & add methods to test, but as you can see in the screenshot below, it gives me the error "package does not exist". What is wrong?

This is the screenshot from NetBeans:

NetBeans screenshot

https://i.ibb.co/4Kv6Kd1/Screenshot-20210323-163156.png

These are the jar files:

https://www.dukelearntoprogram.com/downloads/archives/courserajava.jar

https://www.dukelearntoprogram.com/downloads/archives/apache-csv.jar

I'm using NetBeans 12.3 on Archlinux.

skomisa
  • 16,436
  • 7
  • 61
  • 102
nenoeldeeb
  • 1
  • 1
  • 1
  • I think you use the wrong project type. I think you have to use an Ant project to manage the dependencies the way you want to. See https://netbeans.apache.org/kb/docs/java/javase-intro.html for more information. – chromanoid Mar 23 '21 at 16:56
  • I'm using java with maven > the first choice I don't know the differences – nenoeldeeb Mar 23 '21 at 17:13
  • Since you have a Maven project, see [Adding external JAR to Maven project in NetBeans](https://stackoverflow.com/q/17693040/2985643). – skomisa Mar 27 '21 at 06:10

0 Answers0