Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to input data from keyboard using jdeveloper 10g for a java application.

 
Nancy Antony
Ranch Hand
Posts: 145
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote a java program which inputs a byte from keyboard. I tried to execute this program in jDeveloper 10g. I'm not able to input data from the keyboard in Jdeveloper 10G. Can anyone help?

Regards,
nancy
 
Agador Paloi
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any code to show? Are you using BufferedReader?
 
Nancy Antony
Ranch Hand
Posts: 145
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote a program like this:

import java.io.*;
public class UseRead {
public static void main(String args[]){
do{
c=(char)System.in.read();
System.out.println(c);
} while(c!='q');
System.out.println();
} }

I put this code in a file UseRead.java.
I put it in a Jdeveloper project and execute. I can see the console window, but I cannot input any characters. I wanna know how can I input data in Jdeveloper 10G console window.

Thanks.
Nancy
 
Zandis Murāns
Ranch Hand
Posts: 174
Java Java ME Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go to project properties, click on Run/Debug settings, select your Run configuration (Default) and Click Edit. Locate "Tool settings" and check "Allow program input" in Additional Runner Options. Save settings and run your program again. Now you will see under the console input field for your inputs.
 
Nancy Antony
Ranch Hand
Posts: 145
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. It worked

Regards,
Nancy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic