Use a java GUI through QProcess
-
Hello, I apologize in advance for my bad English.
I'm trying to write a program that read from stdout of "serialforwarder" that is a tool implemented by "tinyOS" for mote serial communication.
This tool usually runs from linux shell by command:
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java:$TOSROOT/support/sdk/java/tinyos.jar
java net.tinyos.sf.SerialForwarder -comm network@localhost:2390That open a GUI for mote listening, when some data is received from mote, this tool write it to stdout.
I'd like to use Qprocess for read those data in my program, but I'm not able to use arguments, i tried this:@private:
Ui::MicaZLed *ui;
QProcess *Process; // in header file@@Process = new QProcess(this);
QString program = "java";
QStringList arguments;
arguments << "net.tinyos.sf.SerialForwarder" << "-comm" << "network@localhost:2390";
Process->start(program,arguments);
qDebug() << "SF started!";@But when I execute this part of code, even if "SF started" is written in the qt creator console, the GUI of serial forwarder doesn't appear.
What I have to do?