Frage

I have the JAR files in Netbeans as follows:

enter image description here

However, when I check in the Properties section after right clicking on the Netbeans Project, my sqljdbc4.jar is some what different from the other JAR files, I mean it's path is different, since I added it afterwards as shown in the image below:

enter image description here

1) I have got a feeling that, since the path is different, I am not able to connect to SQL Server.

2) Also, when I would have to send the whole project to someone, this relative path won't work I believe. Is there a way, I can insert sqljdbc4.jar inside the src/bundle_includes folder just like the other ones? Please advise. I am using Netbeans 7.4

War es hilfreich?

Lösung

It seems that when you have added the sqljdbc4.jar it was on the desktop, so Netbeans linked it letting your source code compile, but this don't include the jar into your src/bundle_includes.

You should:

  1. manually copy sqljdbc4.jar into src/bundle_includes
  2. removing the sqljdbc4.jar with bad path from the Compile panel
  3. click Add JAR/Folder and choose src/bundle_includes/sqljdbc4.jar
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top