Reputation: 1
I am trying to execute a simple Java program in newly setup Eclipse IDE, but cannot see any output in console. Below is my program
/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}
Have checked build paths for JRE and JDK is added to environment variables as well. I am missing some configuration settings but not able to figure that out. Any leads will be helpful.
Compilation is working perfectly file and .classes work as expected via cmd. Added a breakpoint in the main method. When I did debug As -> application, error is thrown, its not able to launch the class.
Error Thrown --> Cannot connect to VM Socket operation on nonsocket: configureBlocking
Upvotes: 0
Views: 472
Reputation: 33
There is a small pull-down icon on the right of the console that lets you select which console you want to see. Maybe you accidentally selected a different console.
If this doesn't work try next.
Go to run
and choose Run Configurations -> Common
and in the Standard Input and Output configuration see if Allocate Console
is selected.
Upvotes: 1