I'm trying out NetBeans for editing Groovy code. (I'm new to Groovy, and it's been a long time since I did any Java development).
At some point I installed the Groovy plugin via the "plugins" tool. But it does not have the green checkmark under "active", and choosing the Groovy plugin does not make the Activate/Deactivate/Uninstall buttons available. Oh well...
So let's create a project...
- Choose "new project". I'm choosing "Java with Maven" just because it's the first one.
- Hit "Finish"...and voila, I have a project.
Let's create a file...
- Right click the project package in the left pane, choose "new"
- Choose "Groovy Script" for a type, hit "finish"
- Hey, I have a very simple script. Looks like it should say "Hello chris!" when done.
- Hit the "play" button on the toolbar....things appear in the output window.
But wait a minute...the output is "Hello World!", and it should be "Hello chris!" It looks like "HelloWorld" is coming out of "Mavenproject1.java".
How can I (or can I) just run my script from within NetBeans?
UPDATE: per @andrewJames suggestion, I tried working that tutorial. (It looks like the tutorial may be a bit out of date.)
- I created a "Java Ant" project, as that was the only one that offered me the option of not creating a "Main Class File".
- I created the Java form, and the Groovy class, as directed.
- When I run the project, I get an error message saying "Error running forked groovyc".
I get that same error whether I'm running on a machine with a groovyc executable or not, so I suspect that there's something about the configuration that I need to change in order to point to the groovyc executable.
Probably something to do with the build.xml file...but I can't seem to figure out how to edit that to change the search path for the groovyc step.