Wednesday, May 20, 2009



Very simple error ‘package system does not exist’- most probably you have used ‘err’ or ‘in’ or ‘out’ field of the ‘System’ class of ‘java.lang’ package but you have given lower case "s" instead of upper case "S" in the class name System. Remember Java is case sensitive.

See the below code:

system.out.println("package system does not exist error"); // here s is in lower case


But in the following code:

System.out.println("package system does not exist error solved");//S is in upper case

Though System is not a package, as you have written system.out.println – three parts here (system, out and println) a package like statement, Java compiler considers it as package but as this package doesn’t exist, the error message is shown.

So the solution is just change the lower case "s" of system to upper case "S".


If the above solutions do not work for you. Please comment below giving your code. I'll try to respond.

17 comments:

  1. this answer is a great help!...how do I post questions here?

    I am having trouble with putting a do..while inside a short while program to test it...and have been coming up with different answers... it is ok when it is in seperate programs...but getting 2 different answers when it tests inside the same program

    ReplyDelete
  2. You can write your code and the desired output here...I'll try to help

    ReplyDelete
  3. thanks for your offer!... i forgot check this today as I was working on it...finally found out it was i did not re-set the total and counter...

    I will remember your offer and come back again if I have more problems... sometimes it takes hours as I am just learning!

    ReplyDelete
  4. thank you for sharing. i was unable to continue learning java only because of that capital S... thank you..

    ReplyDelete
  5. m compiling and executing the program but m not getting any errors and even i m not getting the output also.......just the command prompt escaping to taskbar and i m getting my notepad program again........please help me..

    ReplyDelete
  6. @sowjanya : Does it happen just for this program or all other programs? Can you post the code here?

    ReplyDelete
  7. Thanks a lot brother for your kind help over here for the new learners.

    ReplyDelete
  8. Dude, I could kiss you but you probably wouldn't want that. Thanks for your help!!!

    ReplyDelete
  9. Why can terminal not read "."?

    jonas-jrgensens-macbook-pro:Java Jonas J.$ javac Begynd.java
    Begynd.java:4: cannot find symbol
    symbol : method printIn(java.lang.String)
    location: class java.io.PrintStream
    {System.out.printIn("DU ksla krybe før du kan gå");
    ^
    1 error

    ReplyDelete
  10. @Stump: The method is println not printIn

    ReplyDelete
  11. import java.util.Scanner;
    class Student
    {
    String name;
    int rno;
    void get()
    {
    Scanner sc=new Scanner(System.in);
    Sysetm.out.println("name");
    name=sc.nextLine();
    System.out.println("rno");
    rno=sc.nextInt();
    }
    void display()
    {
    System.out.println("name"+name);
    System.out.println("rno"+rno);
    }
    }
    class Simple
    {
    public static void main(String args[])
    {
    Student s=new Student();
    s.get();
    s.display();
    }
    }

    ReplyDelete
  12. and the error is package System does not exist

    ReplyDelete
  13. In the above code, you have written:
    Sysetm.out.println("name");

    Correct the wrong spelling "Sysetm" and it should be:
    System.out.println("name");

    ReplyDelete