Shop OBEX P1 Docs P2 Docs Learn Events
Java Import Error — Parallax Forums

Java Import Error

JaundiceJaundice Posts: 11
edited 2008-02-13 05:38 in General Discussion
when I try and run a program in the Javelin Stamp manual I get this message:

Warning The public type "Countdown" does not match the name of the containing file "C:/Program Files/Parallax Inc/Javelin·Stamp IDE/Projects/Import.java"
[noparse][[/noparse]Error JVM-0017] Unable to load class file import

Here is the code I'm trying to run

import stamp.core.*;

public class Countdown {

· static int myVar;

· public staic void main() {

· System.out.println("message");
· CPU.delay(10000);
· for(myVar = 10; myVar >= 1; myVar--) {
· CPU.delay(2000);
··System.out.println(myVar);
· }

· System.out.println("message");

··}
}

Comments

  • JaundiceJaundice Posts: 11
    edited 2008-02-13 04:57
    okay, the error is the JVM 0017 error,·can someone at least tell me what it means by check permissions
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-02-13 05:38
    Java is case sensitive.
    So if you saved the file using CountDown.java
    then you must use
    public class CountDown
    and not
    public class Countdown for example.
    Use windows explorer to see what the real name of the file is.

    Also check if there is a file Import.java and if so, rename it because import
    is a reserved word.

    regards peter

    Post Edited (Peter Verkaik) : 2/13/2008 6:04:47 AM GMT
Sign In or Register to comment.