Results 1 to 7 of 7
  1. #1
    demonoid is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Question couldn't find main class

    guys i'm using eclipse and i'm not that new to java but i've never been able compile any of my programs.It says "couldn't find main class".After that i downloaded a couple of .jar files and they show the same error too.And java applets aren't working either.But i can run them on eclipse.Pls help.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    i've never been able compile any of my programs.It says "couldn't find main class"
    Are you compiling or executing?
    The error message looks like a problem when you try to execute a class.

    What do you do when you try to "compile" your program? I use the javac command when I compile and I use the java command when I execute a java program.

    However, I know nothing about your IDE, so perhaps it's not installed correctly.

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

    Default

    hang on are you lettting eclipse compile or are you compiling from command prompt?

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    hang on are you lettting eclipse compile or are you compiling from command prompt?

    The OP has yet to confirm that he or she *is* compiling, so the question of how they are compiling doesn't really arise. The poster talks about compiling but then goes on to half quote a message that contridicts that.

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    Many OPs using an IDE don't know compile from execute. The buttons they use say build and run.

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

    Default

    Quote Originally Posted by pbrockway2 View Post
    The OP has yet to confirm that he or she *is* compiling, so the question of how they are compiling doesn't really arise. The poster talks about compiling but then goes on to half quote a message that contridicts that.
    The OP clearly states that they have not being able to compile, so I would guesss they are trying to compile.

    from OP first post

    guys i'm using eclipse and i'm not that new to java but i've never been able compile

  7. #7
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Yes, I read the original post. It might be just me, but I don't find it a clear statement. And I won't guess.

    I think Norm's questions were good ones and deserving of an answer.

Similar Threads

  1. Could Not Find Main Class (again)
    By illjavathat in forum New To Java
    Replies: 25
    Last Post: 11-23-2010, 09:49 AM
  2. Could Not Find Main Class (AGAIN!)
    By illjavathat in forum New To Java
    Replies: 54
    Last Post: 10-22-2010, 03:22 AM
  3. could not find main class?
    By deathnote202 in forum New To Java
    Replies: 6
    Last Post: 05-10-2010, 08:57 PM
  4. Could not find main class
    By Andyj in forum New To Java
    Replies: 2
    Last Post: 10-06-2009, 12:47 AM
  5. Could not find main class - JDK 1.6
    By Syranno in forum New To Java
    Replies: 1
    Last Post: 07-25-2008, 04:07 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
  •