java - How to run a .class file that is in another directory -


my question how run .class java file in directory using exec() or processbuilder class. works if .class file in same directory (as java program).

problem solved guys replies... :)

solution i've used

string path = "d:\work"; //path program execute

string program = "test"; //my program name

processbuilder pb = new processbuilder("java","-classpath",path, program);


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -