0

I need to add classpath in NetBeans. I'm reading book "Thinking in Java 4th Edition".

From doc:

"In the Projects window, right-click the project node and choose Properties. Click Libraries in the left panel of the Project Properties dialog box. Adding library path in the right panel."

I did that, but when I wrote : import static net.mindview.util.print.* I see next:package net does not exist

Help. Why package does not exist?

3
  • What exactly did you add to the project libraries? Commented Jul 29, 2012 at 10:09
  • This is a possible duplicate of How to use .jar files in NetBeans?, which has some helpful illustrations. Commented Jul 29, 2012 at 10:27
  • And when i add this folder i see that in my project - library. I see folder and if i press "+" . I will see many yellow boxes. Example: " net.mindview.util" , "net", ... Commented Jul 29, 2012 at 16:30

1 Answer 1

1

I recently added a classpath for Java mysql-connector in Netbeans. This may help someone who has been struggling to do it like me

  1. have the connector in your computer downloaded, for my case I downloaded from https://dev.mysql.com/downloads/connector/j/

  2. Right click on your project in the projects window as shown here image for right click

  3. On the dialog window click on Libraries, then click Add jar/folder. Make sure the check box (Build projects on class path) is checked.

  4. Select your connector/ jar file you want in your case. Then Click open.
  5. It will be appended in the dialog box as shown below. image for dialog box

click OK

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.