Results 1 to 12 of 12

Thread: [SOLVED] QProcess Java Application Not Working

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2013
    Posts
    46
    Thanks
    24
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Arrow [SOLVED] QProcess Java Application Not Working

    Good Day,

    I'm having a problem calling a java function from Qt

    This is what I have in Qt
    Qt Code:
    1. QString program;
    2. program = "./java";
    3.  
    4. arg << "-jar";
    5. arg << "D:/Visual.jar";
    6. arg << "UniqueFilter "; //name of function within Visual.jar
    7. arg << "D:/inputImage.bmp"; //input image
    8. arg << "D:/result.txt"; //output file
    9. arg << "D:/resultImage.png"; //output image
    10.  
    11. QProcess *myProcess = new QProcess(this);
    12. 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
    Qt Code:
    1. //in cmd
    2. 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
    Last edited by 2lights; 3rd December 2013 at 14:38.

Similar Threads

  1. QProcess not working correctly
    By m_bishop in forum Qt Programming
    Replies: 2
    Last Post: 28th May 2013, 16:36
  2. Replies: 3
    Last Post: 28th October 2011, 23:24
  3. Qt+QWebKit+Java+Flash not working
    By progDes in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2009, 16:49
  4. Qprocess not working
    By bruccutler in forum Newbie
    Replies: 3
    Last Post: 15th February 2007, 04:48
  5. QProcess not working in some cases
    By munna in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2006, 09:58

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.