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

-cp and Caller/Call example

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-4
    • 1.1-beta-1
    • class generator
    • None
    • Linux FC2/jdk 1.5 SUN

    Description

      The -cp example does not work http://groovy.codehaus.org/Scripts+and+Classes
      with jsr-04. It works fine with jsr03?

      //Callee.groovy
      class Callee {
      void hello()

      { println "hello, world" }

      }

      //Caller.groovy
      c = new Callee()
      c.hello()

      groovy -cp . Caller

      Caller.groovy: 2: unable to resolve class Callee
      @ line 2, column 8.
      Callee c = new Callee();
      ^
      Caller.groovy: 2: unable to resolve class Callee
      @ line 2, column 12.
      Callee c = new Callee();

      Also, there is a small bug in the example "groovy -cp . caller" should be "groovy -cp Caller"

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            cmadsen carsten madsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: