Eclipse and Classpath

I swear I'll go crazy.

JDeveloper runs my project without any complaint.

If I do "java -cp / usr / share / java / mysql.jar :. MAIN.java" it works like a charm.

But Eclipse says "[censored] you" and ignores my classpath settings.

I go to Run> Run ... and add the mysql byte in the classpath tab, but over and over again, I keep getting "No suitable driver found".

Now I don't need to add the jar to the build path. Otherwise how to use JDBC if I am going to rebuild if I want to change the engine. I also shouldn't be doing " Class.forName()

" which I don't need in other ways to run it.

Hand in this madness?

-1


source to share


3 answers


Of course, just install the JRE to the appropriate Java6 instead of relying on Eclipse autoconfig.



Yes, I am talking to myself.

+2


source


Try adding a command line argument to the command line in the Run dialog box.



0


source


This is not how I usually add jars to an eclipse project. Try following steps on Wiki .

0


source







All Articles