2

I have a Java App that runs on my Windows terminal. it uses scanner for inputs and System.out.println() to display outputs.

When I compile my aplication into a .jar file, I need to write a .bat file in order to run my app, because there's no UI. I wonder if I can 'emulate' the windows terminal in a .jar file, directly. Without needing to create a batch. Just double click and play the game. Input and Output.

Something that might help visualization is the server.jar, from Minecraft. In the right corner, there is a console with the logs and so on... But I don't need to create a .run batch to run the jar and, if I create one, the outputs will be the exact same of the .jar file, when I double click. One thing that I dont know for sure is that inputs, in the server.jar are allowed.

I've done some tests with JFrame and System.setOutputStream(), but I'm lost and don't know what to use or what to do. I'm using netbeans because I think it's easier to implement JFrames and so on... But don't know what elements I should use or where to start.

Arthur Brenno
  • 51
  • 1
  • 6
  • 1
    Would this help you? https://stackoverflow.com/questions/342990/create-java-console-inside-a-gui-panel – teapot418 Apr 13 '23 at 16:38

0 Answers0