Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 15, 2004, 02:32 PM   #1
TurboLag
macrumors member
 
Join Date: Feb 2004
BlueJ: cannot resolve symbol - class Scanner

Im trying to compile a simple program in BlueJ 2.01 and I get this error: cannot resolve symbol - class Scanner

//Program:
import java.util.Scanner;
import java.text.NumberFormat;

public class Deli
{
public static void main (String[] args)
{
final double OUNCES_PER_POUND = 16.0;

double pricePerPound;
double weightOunces;
double weight;
double totalPrice;

Scanner scan = new Scanner(System.in);

and so on...


Am I missing a library package?
TurboLag is offline   0 Reply With Quote
Old Oct 15, 2004, 09:44 PM   #2
iMeowbot
macrumors 601
 
iMeowbot's Avatar
 
Join Date: Aug 2003
Isn't Scanner a JDK 1.5 thing? Apple haven't made that version of the JDK available to the general public yet.
iMeowbot is offline   0 Reply With Quote
Old Oct 16, 2004, 11:51 AM   #3
TurboLag
Thread Starter
macrumors member
 
Join Date: Feb 2004
How could I implement this program with the currenct JDK?
TurboLag is offline   0 Reply With Quote
Old Oct 16, 2004, 11:59 AM   #4
stoid
macrumors 68040
 
stoid's Avatar
 
Join Date: Feb 2002
Location: So long, and thanks for all the fish!
Quote:
Originally Posted by TurboLag
How could I implement this program with the currenct JDK?
Code:
try{
    BufferedReader kbr = new BufferedReader( new InputStreamReader( System.in) );
    String userInput = kbr.readLine();
    //process userInput
} catch {(IOException e) {
    System.out.println("IO Error: " + e );
}
stoid is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: cannot connect to home wifi with iphone 4 :/ daniel-shi iPhone Tips, Help and Troubleshooting 8 Sep 26, 2011 02:23 PM
Resolved: File stuck in Sidebar - Cannot be dragged out puzzlemuse Mac Basics and Help 2 Sep 5, 2011 10:36 AM
Resolved: Solution to make scanner work with Canon Pixma MP568 and Mac OS X 10.6.7 Suketa Mac Peripherals 0 Jul 14, 2011 12:50 PM
Resolved: Non User Specific Symbolic Link rolandoislas Mac Programming 4 May 14, 2011 05:11 PM
Resolved: Scanner Scanning Bits and Pieces MATTtheSEAHAWK Mac Peripherals 0 May 12, 2011 09:37 PM


All times are GMT -5. The time now is 01:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC