Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

error when trying to read integer with JCreator

807600Oct 1 2007 — edited Oct 1 2007
*********CODE:

import corejava.*;
class Reverse {
public static void main(String[] args) {
int number;
number = Console.readint("Please enter an integer: ");
}
}

***********ERROR:

--------------------Configuration: TEST - j2sdk1.4.2_15 <Default> - <Default>--------------------
C:\Documents and Settings\mik\My Documents\JCreator Pro\MyProjects\a\TEST\src\TEST.java:6: cannot access corejava.Console
bad class file: C:\j2sdk1.4.2_15\jre\lib\ext\corejava.jar(corejava/Console.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
number = Console.readint("Please enter an integer: ");
^
1 error

Process completed.
************************

Why is this happening ?
i just cant seem to read an integer from the user no matter what i try :-(

Edited by: miki85 on Oct 1, 2007 5:37 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2007
Added on Oct 1 2007
17 comments
1,131 views