Search:

Type: Posts; User: allisbs

Page 1 of 2 1 2

Search: Search took 0.20 seconds.

  1. Re: I need my java app to open a console base program and run a command

    Ok, how do I send input to the program via stream? Is there is a tutorial somewhere on input and output stream?
  2. Replies
    0
    Views
    151

    send a string to a terminal window

    I want to send a string to a terminal window

    Here is my code. What I want to send is in comments at the end of


    private void btnRunRelapActionPerformed(java.awt.event.ActionEvent evt) { ...
  3. Re: I need my java app to open a console base program and run a command

    So I have this:

    try{
    Desktop.getDesktop().open(new File("/Applications/Utilities/Terminal.app"));
    } catch (Exception ex) {
    ex.printStackTrace();
    }

    I can get...
  4. Replies
    9
    Views
    397

    Re: Add a console window to my Java GUI

    Ok, How do you add a console window to a Java GUI?
  5. Replies
    9
    Views
    397

    Re: Add a console window to my Java GUI

    I am asking if it is possible to add a console to a Java GUI that works like a terminal
  6. Replies
    9
    Views
    397

    Re: Add a console window to my Java GUI

    Did you not even read the information I want to know if you can add a console to a job a GUI that works like a terminal window.
  7. Replies
    9
    Views
    397

    Add a console window to my Java GUI

    At my company we have a program that has always been console oriented, meaning you run it by executing commands in a terminal window. The main OS that it runs on is Windows. So on windows when you...
  8. Re: I need my java app to open a console base program and run a command

    If i comment out the + in +rst + out, then the java app will open a cmd.exe window and run the command.

    String run = "c:\\rs34bil.exe\\relap5.exe"; //+ in + rst + out;
    //
    ...
  9. I need my java app to open a console base program and run a command

    I am struggling getting my java app to open a console window on either MacOS or windows and run a command. On windows I can get the cmd.exe program to open, but it won't execute the command. On...
  10. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    I am no longer getting the error for directory or file not found
    Now when I click the button, the variable contains what I want it to but no action happens.

    /usr/bin/open -a Terminal...
  11. Re: Specify the WD where the Java app is located

    It is an app that I created. It is designed to run another program with some arguments. In the coding of the Java app, there is a command line that runs the other program. In that command line it...
  12. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    When I'm running it and windows there are no spaces in the directory name and it still does not work
  13. Specify the WD where the Java app is located

    How do I specify the Working directory where the Java app is located? It may be different on different machines.
  14. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    OK I think that I may know what the problem is. The program runs from a terminal or command prompt window. I windows our program when ran open a openGL GUI with a command prompt window inside of...
  15. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    I tried that and I get the same error but the same command works from terminal.

    String wd = "\"" + System.getProperty("user.dir");
    String osver = System.getProperty("os.name");
    ...
  16. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    Ok so here is what I am getting
    /Users/issallisbsF/Documents/Java/RELAP5 GUI/issrs/dist/relap5.x

    The error is because of the space in the directory name. How can I encapsulate the WD in quotes?...
  17. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    I placed a break point at "private void btnRunRelapActionPerformed(java.awt.event.ActionEvent evt) {"
    When I click the Button is when I get the error. It does not even get to the break point and...
  18. Replies
    15
    Views
    288

    Re: Getting error=2, No Such filr or Directory

    The software we use has always been run from a command prompt.
    /WorkingDirectory/relap.x -i "input file" -o "Output file" -r "restart file"

    Here is the entire code.

    /*
    * To change this...
  19. Replies
    15
    Views
    288

    Getting error=2, No Such filr or Directory

    So i have this program that is supposed to execute a command when a button is clicked. I get an error:
    java.io.IOException: Cannot run program "/Users/brianallison/Documents/Java/RELAP5": error=2,...
  20. Make a jtextfield invisible on start of the GUI application

    I have a jtextfield that I want to make invisible on start. I do not see an option for that in the design side under properties. I am a VB programmer and in VB there is an option under properties...
  21. Re: Problem with using a button to run a executable with arguments.

    So I got the errors worked out, but now how do I take a string with the command in it and run it.
    so the string is
    String run = wd + exec + in + rst + out

    I want to execute "run"
  22. Problem with using a button to run a executable with arguments.

    I am having a problem with the section of my code where a button is supposed to run a executable with some arguments. I have marked the section with comments.


    package my.issrs;

    /**
    *
    *...
  23. Re: How to run a program from a button

    Look in the post above for the error message
  24. Re: How to run a program from a button

    private void btnChooseIntdtaActionPerformed(java.awt.event.ActionEvent evt) {
    jfcIntdta.showOpenDialog(null);
    String indta =...
  25. Re: How to run a program from a button

    Cannot find symbol
    symbol: method getText()
    Location: Class issrsUI

    Local variable hides a field
    I am trying to tell it to grab the text from a jtextField

    Next error
    Variable declaration...
Results 1 to 25 of 44
Page 1 of 2 1 2