问题
How do I add the JDBC driver to the class path on a java program I have on my raspberry pi? The class should compile correctly when I go to compile it on the raspberry pi board it just gives the error like it would when there is no driver present. My class is called checker.java and it uses jdbc!
回答1:
For example, if you are in folder, where you have both your .java and .jar files:
javac -cp “jdbcdriver.jar” checker.java
By the way, class names must start with uppercase letter.
UPD: You should run your program the same way
java -cp “jdbcdriver.jar” checker
来源:https://stackoverflow.com/questions/32443125/adding-jdbc-driver-to-classpath-on-raspberry-pi