Results 1 to 5 of 5

Thread: Run Time Error : "Couldn't find the main class : program Will Exit".

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Answers
    6

    Run Time Error : "Couldn't find the main class : program Will Exit".

    Hi Guys

    Scenario : After successfully compiling the program and creating ".class" files which includes ".class" for main class - while trying to run the program from "Windows Command Prompt" shell getting the message "Couldn't find the main class : program will exit" .
    [ JDK & JRE : 1.6.0_13 Standard Edition ].

    Expecting solution from you geeks ???

    By
    Venky

    Last edited by star3v; 04-11-2009 at 09:39 AM. Reason: Added the source from where the program was given a try to run : (i.e) from "windows cmd"

  2. #2
    Junior Member
    Join Date
    Apr 2009
    Answers
    3

    Re: Run Time Error : "Couldn't find the main class : program Will Exit".

    There could be 3 reasons why the program is not running:
    1) Check your classpath first where in the lib folder should contain the exact path of your JDK1.6.0_13/bin folder
    2) Check in which folder you have kept the file and try running the file from there.
    3) check if it has come package name-- if yes then go to the class folder of that particular package and run it from the classes folder.

    I guess it should work.


  3. #3
    Junior Member
    Join Date
    Mar 2009
    Answers
    6

    Re: Run Time Error : "Couldn't find the main class : program Will Exit".

    Hi bchimulkar

    I am thankful for your reply and I appreciate it,even though the problem has been fixed way back.

    Details of it given below.

    Before posting the question,I have set environment path for the "\bin" but I wasn't interested to set environment "classpath", since it affects/modifies all other java applications.

    So the solution is running the java application individually using the "-cp & relevant dir path" in windows cmd.

    Which I have done it and the program works fine.

    By
    Venky


  4. #4
    Junior Member
    Join Date
    Aug 2012
    Answers
    1

    Re: Run Time Error : "Couldn't find the main class : program Will Exit".

    Hi people,
    Please suggest me how to run the Launcher in a step by step procedure; as I'm completely unaware about how to use Java through cmd.
    Please help.
    Thanks


  5. #5
    Junior Member
    Join Date
    Aug 2012
    Answers
    6

    Re: Run Time Error : "Couldn't find the main class : program Will Exit".

    JVM could not find the main class. In your program you had not written main method


  6.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact