I just installed Ubuntu 8.04 and I'm taking a course in Java so I figured why not install a IDE while I am installing it. So I pick my IDE of choice, Eclipse, and I make a very simple program, Hello World, to make sure everything is running smoothly. When I go to use Scanner for user input I get a very odd error:
My code:
import java.util.Scanner;class test { public static void main (String [] args) { Scanner sc = new Scanner(System.in); System.out.println("hi"); } }
The output:
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 test.main(test.java:5)