First Groovy Project failed with compile errors - code paste is slightly wrong

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

First Groovy Project failed with compile errors - code paste is slightly wrong

Val Huber
Hello from a Groovy Newbie

On an up-to-date Mac running 10.6.4, I installed Eclipse Helios using Mac's default JRE ("JVM 1.6.0 (MacOS X Default)").

I then installed Groovy as below:



After pasting the supplied code (step 7), I get compile errors as shown below.


Turns out you need to include some brackets in the paste, like this:
static void main(def args) {
  def mygreeting = "Hello World"
println mygreeting;
}


Thanks in advance,
Val
Reply | Threaded
Open this post in threaded view
|

Re: First Groovy Project failed with compile errors - code paste is slightly wrong

Roshan Dawrani
Hi there.

Of-course the main method needs to have its body in {....}.

I have updated the documentation at http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project.

Braces probably got lost among wiki formatting earlier. :-)

--
rgds,
Roshan
http://roshandawrani.wordpress.com/
http://twitter.com/roshandawrani



On Thu, Sep 30, 2010 at 5:28 AM, Val Huber <[hidden email]> wrote:
Hello from a Groovy Newbie

On an up-to-date Mac running 10.6.4, I installed Eclipse Helios using Mac's default JRE ("JVM 1.6.0 (MacOS X Default)").

I then installed Groovy as below:



After pasting the supplied code (step 7), I get compile errors as shown below.


Turns out you need to include some brackets in the paste, like this:
static void main(def args) {
  def mygreeting = "Hello World"
println mygreeting;
}


Thanks in advance,
Val

Reply | Threaded
Open this post in threaded view
|

Re: First Groovy Project failed with compile errors - code paste is slightly wrong

Andrew Eisenberg
Thanks, Roshan.  :)

On Wed, Sep 29, 2010 at 8:12 PM, Roshan Dawrani <[hidden email]> wrote:
Hi there.

Of-course the main method needs to have its body in {....}.

I have updated the documentation at http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project.

Braces probably got lost among wiki formatting earlier. :-)

--
rgds,
Roshan
http://roshandawrani.wordpress.com/
http://twitter.com/roshandawrani




On Thu, Sep 30, 2010 at 5:28 AM, Val Huber <[hidden email]> wrote:
Hello from a Groovy Newbie

On an up-to-date Mac running 10.6.4, I installed Eclipse Helios using Mac's default JRE ("JVM 1.6.0 (MacOS X Default)").

I then installed Groovy as below:



After pasting the supplied code (step 7), I get compile errors as shown below.


Turns out you need to include some brackets in the paste, like this:
static void main(def args) {
  def mygreeting = "Hello World"
println mygreeting;
}


Thanks in advance,
Val


Reply | Threaded
Open this post in threaded view
|

Re: First Groovy Project failed with compile errors - code paste is slightly wrong

Matthew Passell
Oops!  I just fixed too, but slightly differently (with a few more escaped brace characters). :)

--Matt


On Wed, Sep 29, 2010 at 11:16 PM, Andrew Eisenberg <[hidden email]> wrote:
Thanks, Roshan.  :)


On Wed, Sep 29, 2010 at 8:12 PM, Roshan Dawrani <[hidden email]> wrote:
Hi there.

Of-course the main method needs to have its body in {....}.

I have updated the documentation at http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project.

Braces probably got lost among wiki formatting earlier. :-)

--
rgds,
Roshan
http://roshandawrani.wordpress.com/
http://twitter.com/roshandawrani




On Thu, Sep 30, 2010 at 5:28 AM, Val Huber <[hidden email]> wrote:
Hello from a Groovy Newbie

On an up-to-date Mac running 10.6.4, I installed Eclipse Helios using Mac's default JRE ("JVM 1.6.0 (MacOS X Default)").

I then installed Groovy as below:



After pasting the supplied code (step 7), I get compile errors as shown below.


Turns out you need to include some brackets in the paste, like this:
static void main(def args) {
  def mygreeting = "Hello World"
println mygreeting;
}


Thanks in advance,
Val
Reply | Threaded
Open this post in threaded view
|

Re: First Groovy Project failed with compile errors - code paste is slightly wrong

Val Huber
In reply to this post by Roshan Dawrani
Yep!  Was just dropping you an FYI hoping you'd fix it... Thanks!

On Wednesday, September 29, 2010, Roshan Dawrani
<[hidden email]> wrote:

> Hi there.
>
> Of-course the main method needs to have its body in {....}.
>
> I have updated the documentation at http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project.
>
> Braces probably got lost among wiki formatting earlier. :-)
>
> --
> rgds,
> Roshan
> http://roshandawrani.wordpress.com/
> http://twitter.com/roshandawrani
>
>
>
> On Thu, Sep 30, 2010 at 5:28 AM, Val Huber <[hidden email]> wrote:
>
> Hello from a Groovy Newbie
> On an up-to-date Mac running 10.6.4, I installed Eclipse Helios using Mac's default JRE ("JVM 1.6.0 (MacOS X Default)").
>
> I then installed Groovy as below:
> </mail/s/?view=att&th=12b60a03f3708dec&attid=0.1&disp=emb&realattid=8e08fb6cbfa84103_0.1.1&zw>
> I then follow the instructions in http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project.
>
> After pasting the supplied code (step 7), I get compile errors as shown below.
> </mail/s/?view=att&th=12b60a03f3708dec&attid=0.2&disp=emb&realattid=8e08fb6cbfa84103_0.1.2&zw>
>
> Turns out you need to include some brackets in the paste, like this: static void main(def args) {
>   def mygreeting = "Hello World"
> println mygreeting; }
>
>
> Thanks in advance,Val
>

--
Thanks,
Val

510-703-5909  valhuber on skype

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email