« February 15, 2008 | Main | February 25, 2008 »

February 21, 2008 Archives

February 21, 2008

Enabling User Input When Running Classes Inside JDeveloper

Let's suppose you wrote a piece of Java code that needs some user input - and you used something like

String text = stdin.readLine();

Now you want to run or debug it inside JDeveloper, but how do you get JDeveloper to prompt you for the input value?

Here is the "secret trick":

Go into the project properties and edit the current Run/Debug Configuration.
Under the tools settings node you'll see that the last item allows you to specify "Allow Program Input"

input1:

check this box and run your project.

Now when you hit the input request look at your log window - just below it you'll see a little input field ready for your input:


input2:

About February 2008

This page contains all entries posted to Shay Shmeltzer's Weblog in February 2008. They are listed from oldest to newest.

February 15, 2008 is the previous archive.

February 25, 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle