Good Day,
I'm having a problem calling a java function from Qt
This is what I have in Qt
program = "./java";
arg << "-jar";
arg << "D:/Visual.jar";
arg << "UniqueFilter "; //name of function within Visual.jar
arg << "D:/inputImage.bmp"; //input image
arg << "D:/result.txt"; //output file
arg << "D:/resultImage.png"; //output image
myProcess->start(program, arg);
QString program;
program = "./java";
QStringList arg;
arg << "-jar";
arg << "D:/Visual.jar";
arg << "UniqueFilter "; //name of function within Visual.jar
arg << "D:/inputImage.bmp"; //input image
arg << "D:/result.txt"; //output file
arg << "D:/resultImage.png"; //output image
QProcess *myProcess = new QProcess(this);
myProcess->start(program, arg);
To copy to clipboard, switch view to plain text mode
This is the actual function call from Command prompt (cmd) works
//in cmd
java -jar D:/Visual.jar UniqueFilter D:/inputImage.bmp D:/result.txt D:/resultImage.png
//in cmd
java -jar D:/Visual.jar UniqueFilter D:/inputImage.bmp D:/result.txt D:/resultImage.png
To copy to clipboard, switch view to plain text mode
So Basically I'm using Java as my program name
and all other inputs as arguments.
It does not work
What is the easiest way of calling java from Qt
This java call is just needed for its resulting Image and Qt will process the rest
Your help is much appreciated
Kind Regards
Bookmarks