Re: Cannot resolve symbol class Scanner



Hi,

I installed the jdk1.5.0_08 and I still get the same error message???

How come?

Thanks
Roy

"Petterson Mikael" <mikael.petterson@xxxxxxxxxxxxxxx> wrote in message
news:451BC192.1070906@xxxxxxxxxxxxxxxxxx
Roy Gourgi wrote:

Hi,

If you download and install jdk1.5.0_08 you will have them both.

http://java.sun.com/j2se/1.5.0/docs/api/index.html

Unless you have a specific reson to use Mustang java6.

cheers,

//mikael


Hi,

It is version 1.6.0-beta2

I tried uninstalling java and now when I try to compile it I get the
error message:

'javac' is not recognized as an internal or external command, operable
program or batch file.

I guess I must have uninstalled the JDK?

How do I re-install it with all the API library classes included.

Thanks
Roy


"Petterson Mikael" <mikael.petterson@xxxxxxxxxxxxxxx> wrote in message
news:451B7C64.3040006@xxxxxxxxxxxxxxxxxx

Hi,

Do 'java -version'

Besides can you post the error message.

cheers,

//mikael

Roy Gourgi wrote:

Hi Oliver,

Maybe I do not have the latest API classes. I think that for Scanner and
the InputMatchingException you need the 1.5 API. Where can I download
just the API classes?

Thanks
Roy

"Roy Gourgi" <royng@xxxxxxxxxxxx> wrote in message
news:urzSg.100429$LH3.994898@xxxxxxxxxxxxxxxxxxxxxx


Hi,

I am trying to compile this program but I get the error message that it
cannot resolve this symbol Scanner. I downloaded the JDK6 and in my
PATH statement I put C:\Program Files\Java\jdk1.6.0\bin. The code is
below. What am I doing wrong.

TIA
Roy

import java.util.Scanner;

public class GetInteger

{

static Scanner sc = new Scanner(System.in);

public static void main(String[] args)

{

System.out.print("Enter an integer: ");

int i = GetInteger();

System.out.println("You entered "+i);

}

public static int GetInteger()

{

while (true)

{

try

{

return sc.nextInt();

}

catch (InputMismatchException e)

{

sc.next();

System.out.print("Thast not an integer. " + "try again");

}

}

}

}







.



Relevant Pages

  • Re: Home page change to res://lszah.dll/index.html#96676
    ... that the scanner from isp missed. ... scanner, install this ... it is recommended you download the ... :>> Altrus ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: driver update - source ok grayed out
    ... There is also a .pdf file on the same site page as the download for this file that clearly states the scanner be disconnected before installing the driver. ... If the files are in an install exe No Windows can see them. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: SCSI problems - Nikon LS-30 on XP with IWill/Advansys 2930U+
    ... > Are you pretty sure that the scanner is not malfunctioning? ... > Is there more that one SCSI controller showing in Device Manager? ... XP will install the correct driver for the card. ... See below for download link. ...
    (comp.periphs.scanners)
  • Re: microsoft.com website will not load on my Win 2000 server
    ... Please download, install and update the following software... ... I suggest scanning the system in Safe Mode. ... needed for each scanner you want to use, you should reboot the PC into Safe Mode [F8 key ...
    (microsoft.public.win2000.general)
  • Re: Outlook redundant downloading
    ... No scanner (this was a fresh restoration of previous ... > | aren't deleted upon download, they are available for download later ... > | since I transfered my settings over to a new install it has been doing ... > | restart outlook. ...
    (microsoft.public.outlook.general)