Adding JDBC driver to classpath on Raspberry pi

不想你离开。 提交于 2019-12-12 05:53:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!