Problem Running Application on NetBeans 5.5 Problem!!

A

ajaywadhwani

Hi

I am a newbie to the NetBeans and have recently downloaded the NetBeans
5.5.

However, I am facing one problem.

For example: for calculating the lowest of a given set of numbers,
please go thru the code below


/**
*EXERCISE 5.11: WRITE AN APPLICATION THAT FINDS THE SMALLEST OF
SEVERAL
* INTEGERS. ASSUME THAT THE FIRST VALUE READ SPECIFIES
* THE NUMBER OF VALUES TO INPUT FROM THE USER.
* @author ajay
*/
import java.util.Scanner;
public class lowest {

public static void main(String[] args) {
int number;
int lowest = 1000;
int count;
Scanner input = new Scanner (System.in);

System.out.print("Enter the number of entries: ");
count = input.nextInt();

for (int i = 1; i <= count; i++) {
System.out.print("Enter the number: ");
number = input.nextInt();

if(number < lowest)
lowest = number;
}

System.out.printf("Lowest number among %d entries: %d", count,
lowest);
}

}


Building the project is fine... but when I run this program, it just
displays these lines...
init:
deps-jar:
compile:
run:

There is no display asking for the number of entries.

In which ever case where the input from the computer has to be given
first, it just shows this message and displays a "Building Message" at
the bottom
WHAT SHALL BE DONE???
 
R

RedGrittyBrick

Hi

I am a newbie to the NetBeans and have recently downloaded the NetBeans
5.5.

I am using Eclipse.
However, I am facing one problem.

For example: for calculating the lowest of a given set of numbers,
please go thru the code below


/**
*EXERCISE 5.11: WRITE AN APPLICATION THAT FINDS THE SMALLEST OF
SEVERAL
* INTEGERS. ASSUME THAT THE FIRST VALUE READ SPECIFIES
* THE NUMBER OF VALUES TO INPUT FROM THE USER.
* @author ajay
*/
import java.util.Scanner;
public class lowest {

public static void main(String[] args) {
int number;
int lowest = 1000;
int count;
Scanner input = new Scanner (System.in);

System.out.print("Enter the number of entries: ");
count = input.nextInt();

for (int i = 1; i <= count; i++) {
System.out.print("Enter the number: ");
number = input.nextInt();

if(number < lowest)
lowest = number;
}

System.out.printf("Lowest number among %d entries: %d", count,
lowest);
}

}


Building the project is fine... but when I run this program, it just
displays these lines...
init:
deps-jar:
compile:
run:

When I run this program, it just displays these lines ...

Enter the number of entries: 3
Enter the number: 1
Enter the number: 6
Enter the number: 2
Lowest number among 3 entries: 1
There is no display asking for the number of entries.

In which ever case where the input from the computer has to be given
first, it just shows this message and displays a "Building Message" at
the bottom
WHAT SHALL BE DONE???

Firstly please stop SHOUTING.

Since your program works in Eclipse, I imagine that you don't have
Netbeans installed correctly. Hopefully a Netbeans user will recognise
the symptoms and suggest something.
 
J

Juha Laiho

(e-mail address removed) said:
I am a newbie to the NetBeans and have recently downloaded the NetBeans
5.5.

However, I am facing one problem.

For example: for calculating the lowest of a given set of numbers,
please go thru the code below
....

Building the project is fine... but when I run this program, it just
displays these lines...
init:
deps-jar:
compile:
run:

There is no display asking for the number of entries.

NetBeans seems to have a problem with the System.out handling; note that
there is an "Input" box in the bottom of the screen (bottom of the Output
window), and you can feed numbers into this box (first the number of entries,
then each number you're feeding in for comparision, one at a time).

For some reason NetBeans will output your text prompts only when
printing out the result.
In which ever case where the input from the computer has to be given
first, it just shows this message and displays a "Building Message" at
the bottom
WHAT SHALL BE DONE???

Looks like filing a bug against NetBeans would be in order. Unless this
bug is already reported.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top