jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-474

Groovy forgets imports.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-6
  • Fix Version/s: 1.1-rc-3
  • Component/s: command line processing
  • Labels:
    None
  • Environment:
    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

Issue Links

is depended upon by

Task - A task that needs to be done. GROOVY-756 improve GroovyShell

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Guillaume Laforge added a comment - 02/Nov/07 5:47 AM

Jason fixed this in the new interactive shell.

Show
Guillaume Laforge added a comment - 02/Nov/07 5:47 AM Jason fixed this in the new interactive shell.

People

  • Assignee:
    Jason Dillon
    Reporter:
    Jiger Patel
Vote (3)
Watch (2)

Dates

  • Created:
    14/May/04 9:35 AM
    Updated:
    02/Nov/07 5:47 AM
    Resolved:
    02/Nov/07 5:47 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.