Sergey
Sergey

Reputation: 37

Adding CLASSPATH in NetBeans

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?

Upvotes: 0

Views: 4489

Answers (1)

kimoduor
kimoduor

Reputation: 614

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

Upvotes: 1

Related Questions