Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3719

Script thinks it cannot be run

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7-beta-1
    • 1.6.5, 1.7-beta-2
    • Groovy Console
    • None

    Description

      Running the following script in GroovyConsole:

      println "YES I CAN!"
      Foo.getMethod("foo", null)
      

      yields:

      YES I CAN!
      Exception thrown: This script or class could not be run.
      It should either: 
      - have a main method, 
      - be a JUnit test, TestNG test or extend GroovyTestCase, 
      - or implement the Runnable interface.
      

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: