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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -