java - add external jar to classpath -


i have added external jar file classpath , application don't use class in ,any idea , code:

code :

string java = system.getproperty("java.home") + "/bin/java"; string classpath=system.getproperty("java.class.path"); string mainclasspath=system.getproperty("sun.java.command"); string file = "c:\path file \file.jar";  final stringbuffer command = new stringbuffer("\"" + java + "\" "); command.append("-cp \""+""+classpath+";"+file+"\" "+ mainclasspath); runtime.getruntime().addshutdownhook(new thread() { @override public void run() { try {           runtime.getruntime().exec(command.tostring());  } catch (ioexception e) {   e.printstacktrace(); } } });  system.exit(0);  


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -