Is this possible? I've tried
Runtime.getRuntime().exec("javaw.exe <COMMAND_ARGS> \"" + wu.getCurrentUserDesktopPath() + "/file.txt \"");
This is a personal learning experience for me. As I am a self-taught.
Is this possible? I've tried
Runtime.getRuntime().exec("javaw.exe <COMMAND_ARGS> \"" + wu.getCurrentUserDesktopPath() + "/file.txt \"");
This is a personal learning experience for me. As I am a self-taught.
You need a .class file or .jar file to run javaw, a .txt won't run. But in prinicple there's no problem running javaw from within Java.
ps Runtime.exec was superceeded by the ProcessBuilder class from Java 1.5
You'll find loads of examples on the web.
I was tired when I made that post. What I am actually trying to do is run a program with command arguments from Java. I only used Javaw as an example.
OK... ProcessBuilder is still the answer.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.