Skip to main content



      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 13:44 Go to next message
Eclipse UserFriend
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!!
Joe
Re: Java I/O and Argument Passing Inside Eclipse [message #1778998 is a reply to message #1778988] Thu, 28 December 2017 00:52 Go to previous message
Eclipse UserFriend
When you run an Java application, the Console view will be connected to your application. Output will be written to this view and also System.in will also be connected to that view so if you type a line of text and hit enter, that line will be read from System.in. 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: Mon Jun 16 20:37:47 EDT 2025

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

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

Back to the top