How to add external jar without Eclipse build path option?
问题 My java file jdbc11.java was compiled successfully with javac jdbc11.java command in cmd, after that when I tried to to run java jdbc11 I got this exception: java.lang.ClassNotFoundException: com.mysql.jdbc:Driver refering to this code in the file Class.forName("com.mysql.jdbc.Driver"); , when I tried it in eclipse ,I added to "Java Build Path" the external jar : mysql-connector-java-5.1.20-bin.jar and it run successfully . in case I didn't fix it with eclipse what should I done in the first