Results 1 to 2 of 2
  1. #1
    andrew is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default JPF (Java Pathfinder) - "no main"

    I have pathfinder working using the examples provided by JPF release.

    Problem is - when I try to run my own class - i get the error:
    [SEVERE] JPF exception, terminating: no main() method

    This would make sense... except that I get this error even if I try to run with ONLY THE MAIN METHOD in the class.

    Ie - my class is just this:

    import gov.nasa.jpf.jvm.Verify;
    public class Test {
    // public static void main (String[] args) {
    public void main() {
    //Verify.beginAtomic();
    }
    }

    And JPF still shows an error saying it can't find main....

    I placed this test file in the JPF examples directory - where the example classes from JPF are working fine.

    Any ideas?


    Full error is this:
    [SEVERE] JPF exception, terminating: no main() method in Test
    ---------------------- JPF error stack trace ---------------------
    gov.nasa.jpf.JPFException: no main() method in Test
    at gov.nasa.jpf.jvm.JVM.pushMain(JVM.java:445)
    at gov.nasa.jpf.jvm.JVM.initialize(JVM.java:253)
    at gov.nasa.jpf.JPF.run(JPF.java:523)
    at gov.nasa.jpf.JPF.main(JPF.java:158)

  2. #2
    andrew is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default

    i figured out how to solve my own problem the "eclipse way".
    I deleted the class and made a new file and made sure to click create a main stub in the class creation wizard.

    I didn't think it would make any difference if i told the wizard my class had main in it or not.... ???

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  2. Replies: 6
    Last Post: 08-18-2008, 06:44 AM
  3. Replies: 5
    Last Post: 05-14-2008, 01:43 PM
  4. Replies: 1
    Last Post: 08-07-2007, 07:10 AM
  5. Replies: 1
    Last Post: 07-25-2007, 10:55 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
  •