Results 1 to 15 of 15
Like Tree4Likes
  • 4 Post By jim829

Thread: Is there any way to direct program output to an external window?

  1. #1
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Is there any way to direct program output to an external window?

    When you run a Java program (Console programming) is there any way, or is there a specific IDE that you know of that will allow you set it up so your program runs in an external window?

    I would prefer seeing my output (and getting user input for an interactive program) in an external window, like C++ or C# can do.

    I don't think there is judging from my personal experiments, but if you know anything please post.

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: Is there any way to direct program output to an external window?

    Start learning Swing/JavaFX. You can create a UI shown in a new window.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Is there any way to direct program output to an external window?

    What do you mean by "external window"?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Re: Is there any way to direct program output to an external window?

    Running the program in an external black window. Not the window pane at the bottom of the IDE. Java really needs to be updated.

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there any way to direct program output to an external window?

    Quote Originally Posted by 357mag View Post
    Running the program in an external black window. Not the window pane at the bottom of the IDE. Java really needs to be updated.
    You can run a program in a console window using the JDK tools. But what do you mean, "Java really needs to be updated?"

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Is there any way to direct program output to an external window?

    Are you asking about features for any OS or only for one?
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Re: Is there any way to direct program output to an external window?

    Quote Originally Posted by jim829 View Post
    You can run a program in a console window using the JDK tools. But what do you mean, "Java really needs to be updated?"

    Regards,
    Jim
    Okay tell me how I would run my Java program in a separate window using this JDK toolset. I would like to learn this.

    Or if you mean by console window using the common output window which is at the bottom of all these IDE's that's not what I'm referring to.

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Is there any way to direct program output to an external window?

    run my Java program in a separate window
    Can you define what "run in window" means?
    Are you referring to where the system's standard output is displayed?

    The Runtime class can be used to execute a program in its own environment. But it doesn't have a window.

    a specific IDE that you know of that will allow you set it up so your program runs in an external window?
    Are you complaining about how your IDE works?

    Open a command prompt, change to the folder with the class files and use the java command to execute the class.
    Last edited by Norm; 04-01-2017 at 07:24 PM.
    If you don't understand my response, don't ignore it, ask a question.

  9. #9
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there any way to direct program output to an external window?

    to compile a program, use the javac.exe command. It has options you need to learn.
    To run a compiled program, use the java.exe command. It also has options.

    javac.exe MyProg.java creates a MyProg.class file.
    Then use
    java.exe MyProg to execute the program.

    Check out the tutorials to see more on this here -> Lesson: The "Hello World!" Application (The Java Tutorials > Getting Started)

    You will see the IDE, Windows, and *nix versions on how to create a program. The latter two are what you want.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  10. #10
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Re: Is there any way to direct program output to an external window?

    Quote Originally Posted by 357mag View Post
    When you run a Java program (Console programming) is there any way, or is there a specific IDE that you know of that will allow you set it up so your program runs in an external window?

    I would prefer seeing my output (and getting user input for an interactive program) in an external window, like C++ or C# can do.

    I don't think there is judging from my personal experiments, but if you know anything please post.
    This is a separate window guys. I would think you would know this. C++ does it. C# too. Java knows not how to do this. They should fix it:

    Is there any way to direct program output to an external window?-run-program-window.png

  11. #11
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Is there any way to direct program output to an external window?

    Is that a feature of the IDE?
    It doesn't have anything to do with java.

    What happens when you execute that program outside of the IDE? Say by double clicking on the exe file? Does it create a window?
    Last edited by Norm; 04-01-2017 at 08:27 PM.
    If you don't understand my response, don't ignore it, ask a question.

  12. #12
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there any way to direct program output to an external window?

    Quote Originally Posted by 357mag View Post
    This is a separate window guys. I would think you would know this. C++ does it. C# too. Java knows not how to do this. They should fix it:
    If you really want help, then stop with the snide remarks and the attitude.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  13. #13
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Re: Is there any way to direct program output to an external window?

    Geez...I go to these forums and quite clearly explain what I'm looking for. I was quite clear in my post. If you have ever used C++ or C# and most people have spent a few minutes in it you would know that when you run a simple console program the output you see is what my picture show.

    Pardon me for my exasperation.

  14. #14
    357mag is offline Member
    Join Date
    May 2010
    Posts
    38
    Rep Power
    0

    Default Re: Is there any way to direct program output to an external window?

    I would be interested in learning how to do that. You mean I can run my console program code and it's output would show in a new window?

  15. #15
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Is there any way to direct program output to an external window?

    What happens when you execute that program outside of the IDE? Say by double clicking on the exe file? Does it create a window?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Sending Output to External Process
    By Pluto in forum Advanced Java
    Replies: 0
    Last Post: 07-25-2013, 08:35 PM
  2. Open external file with external program
    By Wietse de Vries in forum New To Java
    Replies: 1
    Last Post: 12-31-2011, 04:52 PM
  3. Direct CMD output to a file
    By yahyaaa in forum New To Java
    Replies: 9
    Last Post: 01-31-2011, 11:19 AM
  4. Compiler Output Window Issue
    By sweetpea123 in forum New To Java
    Replies: 2
    Last Post: 04-10-2010, 05:56 PM
  5. Replies: 0
    Last Post: 12-03-2009, 06:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •