Page 3 of 3 FirstFirst 123
Results 41 to 42 of 42
Like Tree1Likes

Thread: Java Could not find main class...

  1. #41
    noobplus's Avatar
    noobplus is offline Senior Member
    Join Date
    Feb 2012
    Location
    chennai,south of India(south east of asia)
    Posts
    232
    Rep Power
    3

    Default Re: Java Could not find main class...

    Quote Originally Posted by JosAH View Post
    Before you do so: check the signature of your main( ... ) method. It isn't what the JVM wants it to be to be an entry point of your program.

    kind regards,

    Jos
    yup i made a mistake , i defined new class within the main.., now its working tyvm

  2. #42
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,508
    Blog Entries
    7
    Rep Power
    20

    Default Re: Java Could not find main class...

    1: yes; 2: you have to declare static variables outside of a method; 3) ditto.

    kind regards,

    Jos
    noobplus likes this.
    cenosillicaphobia: the fear for an empty beer glass

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 10
    Last Post: 02-02-2012, 08:26 PM
  2. Could not find the main class: java. Program will exit
    By thewonkits in forum New To Java
    Replies: 3
    Last Post: 01-11-2012, 11:56 AM
  3. Replies: 7
    Last Post: 01-01-2012, 12:29 PM
  4. Error: Could not find or load main class Ops.java
    By Javasubbu in forum New To Java
    Replies: 4
    Last Post: 10-05-2011, 10:52 PM
  5. Replies: 4
    Last Post: 08-22-2011, 03:42 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
  •