Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Default could not find or load main class | cannot manually locate class file

    Hello everyone,

    I am a beginner to Java (and to programming as a whole).

    I have installed JDK onto my computer and typed up code.
    JDK compiles my program without any problem, but I cannot find the class file anywhere on the computer.

    When I try to run my program, JDK/JRE says the class cannot be found.

    Current directory is C:\Users\MyName\java

    But when I look into this folder, I cannot find my class file!

    So where could it be? Is it really being saved anywhere?

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: could not find or load main class | cannot manually locate class file

    How did you compile your code?
    What directory were you in?
    What is the contents of that directory?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Could not find or load main class
    By kkid in forum New To Java
    Replies: 4
    Last Post: 10-15-2012, 05:47 AM
  2. Error: could not find or load main class
    By sloppygecko in forum New To Java
    Replies: 3
    Last Post: 08-08-2012, 04:11 PM
  3. Error: Could not find or load main class
    By Tybald in forum Eclipse
    Replies: 5
    Last Post: 05-28-2012, 12:22 PM
  4. Replies: 3
    Last Post: 12-09-2011, 04:51 AM
  5. Could not find or load main class BubbleSort.class
    By blaqkout in forum New To Java
    Replies: 5
    Last Post: 09-12-2011, 08:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •