Problems with Java Scanner on Eclipse.. [message #508112] |
Sat, 16 January 2010 00:41 |
|
Hello! I'm new in here.
My problem is the Scanner in Java, Eclipse canot resolve it. I am using JRE 1.5 on Eclipse but i have Java 1.6 installed on my system. Somehow eclipse dont seem to find it, at least it is not on the list at the settings.
Im having my Java exam in two weeks so i should really get this thing working.. What could be wrong? Since i'm new to eclipse i could have left something unnoticed..?
|
|
|
|
Re: Problems with Java Scanner on Eclipse.. [message #508126 is a reply to message #508112] |
Sat, 16 January 2010 10:30 |
|
oh yes, sorry about not posting this code.
import java.util.Scanner;
public class testi
{
public static void main(String[] args)
{
int luku;
Scanner lukija = new Scanner(System.in);
System.out.println("Anna luku: ");
luku = lukija.nextInt();
System.out.println("\n"+luku);
}
}
Error:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Scanner cannot be resolved to a type
Scanner cannot be resolved to a type
at testi.main(testi.java:7)
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02798 seconds