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

Groovy forgets imports.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-6
    • 1.1-rc-3
    • None
    • jdk 1.4.2, windows XP.

    Description

      Groovy does not seem to find imports in a scriting environment. I ran the below commands via BSF and groovysh and this is the output.

      >groovysh
      Lets get Groovy!
      ================
      Version: 1.0-beta-6-SNAPSHOT JVM: 1.4.2_03-b02
      Type 'exit' to terminate the shell
      Type 'help' for command help

      1> Button
      2> go

      1> print Button
      2> go
      null
      (...this was just to cross verify that Button was not already imported...Now starts the main code)
      1> import java.awt.*;
      2> go

      1> btn = new Button();
      2> go
      General error during class generation: No such class: Button in constructor call for class: CommandLine4. At [1:7] CommandLine4.groovy

      1> btn = new java.awt.Button();
      2> go

      As you can see, using "Button" does not work(when it shud) but using Full Qualified package name works.

      -Jiger

      Attachments

        Issue Links

          Activity

            People

              user57 Jason Dillon
              jigerjava Jiger Patel
              Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: