java - How to manage class you want use via Runtime.getRuntime().exec in a web app project with Maven? -
I have a web app developed with Maven, I have some classes that
Runtime.gatectum (). Exec.
[] command = {"java mainExternal .class "," test "}; What should be the path? I was lost enough ... Renewed:
You can insert a JR file created by Maven anywhere
You can insert a Maven project / source paste anywhere.
You must enter a jar file on the classpath, and the best way to do this is to
-cp You must specify the entry point by giving the class's fully qualified name ... No file name ".class" suffix is a mistake.
- Assuming that the
java command is on your path, the command array should look something like this:
string [] command = {"Java", "-CP", "/some/path/to/MyProject.jar", "com.acme.MainExternal", "test"};
UPDATE
Given that the square you are trying to run and the The dependencies of the file are in the file, you are better off except as it is, and use a square path like:
"/.../ classmotion tracer / web-nf / class: /. ../Classomix Tracer / Web-NF / Lib / * "
Where" /.../ClassOmicsTracer "is the full file path of your webpad. If you are in the window, change
: to a
.
Comments
Post a Comment