Results 1 to 4 of 4
  1. #1
    BenH is offline Member
    Join Date
    Dec 2011
    Posts
    48
    Rep Power
    0

    Default Please help! Cannot find or load main class error

    Hi there.

    I just started my java programming class with my college. My teacher says I can avoid annoying errors if I use the windows terminal. However, I have run into so many problems using it. The first problem I ran into is this error:

    'javac' is not reconized as an internal or external command, operable program or batch file.

    I tried updating the path variable and it still shows that error message. What am I doing wrong?

    I found a way around that error but it is highly annoying to type. So the program compiles. However, I get the error cannot find or load main class MyFirstJavaProgram.java the thing is the compiler created the .class file. I have done everything correctly! What is going on? How can I fix this?

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default Re: Please help! Cannot find or load main class error

    What are you typing at the command prompt
    Last edited by al_Marshy_1981; 12-08-2011 at 11:15 PM. Reason: never was spelling bee champ :(

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default Re: Please help! Cannot find or load main class error

    You need to open a new command prompt after the path is updated.

  4. #4
    BenH is offline Member
    Join Date
    Dec 2011
    Posts
    48
    Rep Power
    0

    Default Re: Please help! Cannot find or load main class error

    Hi there.

    I restarted my computer and I restarted the command prompt and still having trouble. I have followed all the steps and it still does not work. Maybe I did the path wrong? Why do I get that class error? Can someone tell me how to do the path? I am thinking I may have done it wrong.

Similar Threads

  1. Replies: 10
    Last Post: 02-02-2012, 09:26 PM
  2. Replies: 29
    Last Post: 02-02-2012, 09:23 PM
  3. Error: Could not find or load main class Ops.java
    By Javasubbu in forum New To Java
    Replies: 4
    Last Post: 10-05-2011, 11:52 PM
  4. Error: Could not find or load main class
    By ITSlave in forum New To Java
    Replies: 4
    Last Post: 09-15-2011, 10:47 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

Posting Permissions

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