Reputation: 1165
I am new to Java and am trying to run a program using Eclipse. But I have no idea how to get the command prompt running in with Eclipse...
I did some online research and couldn't get anything consolidated!
I'm not using an applet. It's a normal Java program trying to read a line from command prompt. I'm trying to do system programming.
Upvotes: 5
Views: 17140
Reputation: 1508
Check out this lesson plan on how to get started with Eclipse programs:
Specifically, see this image:
If the Console tab is not visible in your Eclipse, go to Window -> Show View -> Console in the menu bar.
Upvotes: 7
Reputation: 3052
Right Click on your project--->Run As--->Run Configurations...--->Select Arguments-->Enter the values---->Run
Upvotes: 0
Reputation: 32675
If you downloaded the Eclipse/Java package, and you wrote a Java program in Eclipse in a project, just click compile and run, it will run in the output window in Eclipse.
Upvotes: 0
Reputation: 105258
Try this:
import java.util.Scanner;
public class ReadFromPrompt{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String line = in.nextLine();
}
}
Upvotes: 0