#Console Window In Java?

41 messages · Page 1 of 1 (latest)

karmic relic
#

I am new to Java after coming from using C#/.NET and i'm trying to make my first Java projects in Intellij Idea to practice the language but it seems that all console apps only show output in the IDE itself and won't make a console window popup?

Anyone know how I can get around this? It just doesn't feel right as someone coming from Visual Studio.

cyan pilotBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I am new to Java after coming from using C#/.NET and i'm trying to make my first Java projects in Intellij Idea to practice the language but it seems that all console apps only show output in the IDE itself and won't make a console window popup? Anyone kn

In Java, console applications typically run inside the IDE's integrated console window (like IntelliJ IDEA's Run window). This is different from some environments in C#/.NET where you might be used to a separate console window popping up.

Why does this happen?
When you run a Java program in IntelliJ, the output streams (System.out, System.err) are captured and redirected to the IDE's built-in console for convenience, debugging, and easy access to logs. The console window is part of the IDE, not a separate OS-level terminal window.

How to run a Java console app outside the IDE?

  • Compile and run from a command prompt or terminal manually using javac YourClass.java and then java YourClass. This opens output in the OS console window.
  • Build a runnable JAR and execute it via command line: java -jar YourApp.jar.
  • You can configure IntelliJ to open an external terminal, but that’s less common.

This setup is intended for user convenience during development, but the actual program behaves the same — it writes to stdout and stderr streams, which IntelliJ captures and displays internally.


Useful links:

fallow mesa
#

ur talking about running jar files?

#

use javaw then

#

can u elaborate?

#

what are u doing exactly, where are u missing ur console window?

craggy marsh
#

On windows I think this is what javaw is for

#

Try launching your program with that

hidden halo
karmic relic
fallow mesa
#

there is no need for a separate popup

#

u can configure intellij to do it though

#

if desired

fallow mesa
craggy marsh
#

Yeah it should be under run configurations

fallow mesa
#

for example as someone double clicking jar files

karmic relic
fallow mesa
#

what do u think would that improve or solve?

craggy marsh
#

And you can also make that console window in the ide it's own window

#

Just drag it out

fallow mesa
#

i believe u might just be asking the wrong questions metalkon

#

hence im poking

hidden halo
fallow mesa
#

im specifically asking not bc of ur personal preference but bc u maybe ran into some other issue and think this would be the solution to it?

#

such as sharing a jar file with a friend and they not having a console

#

or u otherwise trying to run the program outside the IDE and needing a console for that?

karmic relic
#

I am brand new to Java as i'm trying to learn it as my second language, was thinking of making a menu helper class or something as my first project, and having it not popup as a console window as what im used to hits my ocd and makes me wonder if my learning project would be valid/possible inside the ide output.

fallow mesa
#

its just embedded into the IDE bc thats what most people prefer

#

but it is the normal ordinary windows CMD console u have in VS as well

#

just not as "popup"

#

intellij just decided to (by default) show it inside the UI directly

#

theres no disadvantage to it or anything. u retain all the full capabilities of having a console

#

if u still prefer it to be a popup or elsewhere in ur IDE, u can just drag around the window

#

its part of intellijs ui layout management system

#

u can also tell intellij to use a different console underneath, for example bash instead of cmd and so on

knotty wraith
#

Go into settings, there is a search box, type "terminal". You find the terminal settings. IF you read the cmd.exe /? you can maybe figure out how to start a new shell that pops to it's own window ( it's like /c or /S). Reading documentation is a super power.