Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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
-
GROOVY-756
improve GroovyShell
-
Jason fixed this in the new interactive shell.