2

I added the jar jsqlparser-0.7.0 to my Netbeans IDE (right clic on libraries / Add Jar file) but i still can't use its packages. what could be the reason . The library is created on 2011 it could be it is not supported by JDK7?

enter image description here

Mikou
  • 99
  • 6

2 Answers2

3

The JAR file "jsqlparser-0.7.0.jar" is not a regular Java library. It is a simple zipped file containing several artifacts: a source and a documentation directory, some testfiles, and - what you need - another JAR called "jsqlparser.jar" in a lib directory.

This JAR is the "real library" that you must add to your project. Additionally, all packages inside this library start with "net.sf.jsqlparser".

Seelenvirtuose
  • 20,273
  • 6
  • 37
  • 66
  • And once you've got the library in per above, you'll probably want to shotgun some imports. I've pasted all of the 0.7 ones here for convenience: ` import net.sf.jsqlparser.*; import net.sf.jsqlparser.expression.*; import net.sf.jsqlparser.expression.operators.arithmetic.*; import net.sf.jsqlparser.expression.operators.conditional.*; import net.sf.jsqlparser.expression.operators.relational.*; import net.sf.jsqlparser.parser.*; import net.sf.jsqlparser.schema.*; import net.sf.jsqlparser.statement.*; import net.sf.jsqlparser.statement.create.table.*; ` – CrazyPyro Mar 19 '14 at 20:11
  • And: ` import net.sf.jsqlparser.statement.delete.*; import net.sf.jsqlparser.statement.drop.*; import net.sf.jsqlparser.statement.insert.*; import net.sf.jsqlparser.statement.replace.*; import net.sf.jsqlparser.statement.select.*; import net.sf.jsqlparser.statement.truncate.*; import net.sf.jsqlparser.statement.update.*; import net.sf.jsqlparser.util.deparser.*;` – CrazyPyro Mar 19 '14 at 20:13
-1

Just put this:

import jsqlparser.*;
ChrisF
  • 134,786
  • 31
  • 255
  • 325
Bob
  • 1