Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java I/O and Argument Passing Inside Eclipse(Oxygen/Neon - Java - I/O - Arguments - Terminal Emulation )
Java I/O and Argument Passing Inside Eclipse [message #1778988] Wed, 27 December 2017 18:44 Go to next message
J K is currently offline J KFriend
Messages: 2
Registered: December 2017
Junior Member
Hi Eclipse Experts:
(If you've spent more than 3-days on it, then you're an expert in my book).

I'm new to Eclipse. I've been doing some Java Programming using Windows Textpad and a bit using VI on linux.

I've installed Eclipse on Win 7 machine.

How do I pass

(a) how do I do "stdin". When I run on terminal, it's easy.
what output I get, I just type in a response and hit enter (win/linux).
How do I do this in eclipse?

(b) args that would normally at the command line?
- e.g. java my a b c
- i would strongly prefer not to edit a config file each time I need
to pass different variables.

(c) I'm running Oxygen but will be moving to Neon. So if there is a difference, please note any difference in answer.

Thank you in advance!!
Re: Java I/O and Argument Passing Inside Eclipse [message #1778998 is a reply to message #1778988] Thu, 28 December 2017 05:52 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31254
Registered: July 2009
Senior Member
When you run an Java application, the Console view will be connected to your application. Output will be written to this view and also will also be connected to that view so if you type a line of text and hit enter, that line will be read from Whenever you run, a Launch Configuration will be created or reused if one already exists. Via the Run or Debug toolbar button or the Run menu bar item you can use Debug Configurations... or Run Configurations... to manage those. Each Launch Configuration has an Arguments tab with Program Arguments (and VM Arguments) where you can enter you arguments that will be passed to main(String[]). You can have multiple Launch Configurations (each with a different name) with different arguments to easily manage this.
Previous Topic:how to hidden eclipse toolbar?
Next Topic:Find my message
Goto Forum:

Current Time: Sun Jul 12 15:25:59 GMT 2020

Powered by FUDForum. Page generated in 0.03196 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top