Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Java program not running in command prompt

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    9
    My Mood
    Happy
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Unhappy Java program not running in command prompt

    Hi until February every code of java was compiling and running through cmd (Command Prompt) successfully
    But after that i can compile the code but I' am not able to run my any of the code.When i run my code it will show an error
    "Error: Could not find or load main class abc"
    At first my lecturers told it often happen some times but now its showing whenever i try to run my program.Because of that i'm using netbeans to run my program
    Please help to run my program through cmd


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java program not running in command prompt

    Can you copy the full contents of the console window from when you execute the program that shows the command you are entering and the full text of the error message? Also enter the dir command to show what files are in the folder.

    On Windows: To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 12
    Last Post: August 2nd, 2012, 10:13 PM
  2. Java command prompt
    By Tanmaysinha in forum Java Theory & Questions
    Replies: 2
    Last Post: August 30th, 2011, 09:30 AM
  3. Java command prompt
    By Tanmaysinha in forum Java Theory & Questions
    Replies: 1
    Last Post: August 29th, 2011, 03:05 PM
  4. Replies: 4
    Last Post: August 17th, 2011, 02:53 PM
  5. Java on command prompt
    By Tanmaysinha in forum What's Wrong With My Code?
    Replies: 12
    Last Post: August 17th, 2011, 06:45 AM