Allow user input in Jdeveloper for Java applications, Using Java Scanner Class to take input from console

Sharing is Caring

Sometimes we have to take input from Keyboard when we use Scanner or BufferedReader class.
and to take input from JDeveloper we have to change a setting to allow user input in JDeveloper.

Let’s take an example of java.util.Scanner class-

package client;

import java.util.Scanner;

public class UserInput {
public UserInput() {
super();
}

public static void main(String[] args) {
System.out.println(“Please Enter your Name-“);
Scanner sc = new Scanner(System.in);
String name = sc.next();
System.out.println(“Your Name is “ + name);
}

}

This code requires user to input his name , now to enable user input follow these steps in Jdeveloper IDE

    • Go to “Application” tab and select “Project Properties” in Jdeveloper Menu

 

 

    • Go to “Run/Debug profile” and edit default Run Configuration

 

 

    • Go to “Tool Setting” and check the box “Allow Program Input” and All Done 🙂

 

  • Now run this program and check an additional input box appears on the console
user input in Jdeveloper

 

Cheers 🙂 Happy Learning

Related Posts

I’m an Oracle ACE, Blogger, Reviewer,
Technical Lead working on Oracle ADF

0 thoughts on “Allow user input in Jdeveloper for Java applications, Using Java Scanner Class to take input from console”

  1. Hi, nice manual, it will be usefull for me, because I recently began to study java. Using a lot of sources I read a lot of information, and sought many tutorials. One of them, which I can highlight is the most informative https://explainjava.com/hibernate-interview-questions/ blog which I use almost always for my projects. This is very convenient, because sometimes I can ask questions to the author and get a direct answer to my question. And the rest of the emerging questions, there are answers in the articles.

Leave a Reply

Your email address will not be published. Required fields are marked *