Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 40853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:05:19+00:00 2026-05-10T15:05:19+00:00

I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World

  • 0

I just installed Ubuntu 8.04 and Eclipse.

I made a very simple Hello World program in order to ensure that everything is running smoothly. When I attempted to use the Scanner class for acquiring some user input I got 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");     } } 

Error message

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) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:05:19+00:00Added an answer on May 10, 2026 at 3:05 pm

    The Scanner class is new in Java 5. I do not know what Hardy’s default Java environment is, but it is not Sun’s and therefore may be outdated.

    I recommend installing the package sun-java6-jdk to get the most up-to-date version, then telling Eclipse to use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed Ubuntu and tried making the famed Hello World program to make
Just installed Jenkins in Ubuntu 12.04 and I wanted to create a simple build
I just installed Glassfish on my Ubuntu server (No GUI) using THIS tutorial. Everything
I just installed eclipse on ubuntu OS . I was going to install android
I've just configured Eclipse Indigo(for RCP) in Ubuntu 11 and everything is fine with
i just installed eclipse 3.5.2 on my ubuntu 10.04 and also the ADT and
I recently just installed Eclipse onto a Ubuntu 10.04 machine. Now, I'm reading Getting
I just installed everything needed for Ruby on Rails on my Ubuntu system. But,
I just installed eclipse indigo on Ubuntu. After, I went to install new software
I installed ubuntu 11.04 by wubi on win7. I notice that default eclipse on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.