classpath - Java: Adding included Jar files to a created Jar file in linux -
i need including imported jar files java program in linux. here program: import java.sql.*; public class createcoffees { public static void main(string args[]) { try { class.forname("com.ibm.db2.jcc.db2driver"); } catch(java.lang.classnotfoundexception e) { system.err.print("classnotfoundexception: "); system.err.println(e.getmessage()); system.exit(1); } } } in order execute class.forname("com.ibm.db2.jcc.db2driver"); need 2 .jar files added classpath: db2jcc_license_cu.jar db2jcc4.jar i put these jar files same directory createcoffees.java file, compile , run this: javac createcoffees.java java createcoffees but got error classnotfoundexception: com.ibm.db2.jcc.db2driver then tried "-classpath" option javac -classpath ./db2jcc_license_cu.jar:./db2jcc4.jar createcoffees.java java -classpath ./db2jcc_license_cu.jar:./db2jcc4.j