GroovyInAction | Source code of the book Groovy in Action , 2nd edition | Runtime Evironment library
kandi X-RAY | GroovyInAction Summary
kandi X-RAY | GroovyInAction Summary
Source code of the book Groovy in Action, 2nd edition
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GroovyInAction
GroovyInAction Key Features
GroovyInAction Examples and Code Snippets
Community Discussions
Trending Discussions on GroovyInAction
QUESTION
I am not able to compile and run Groovy-scripts. I take a very first example Gold.groovy
. I can compile it with
groovyc Gold.groovy
when I try to start it thereafter with: java Gold
I get the error message
"Fehler: Hauptklasse Gold konnte nicht gefunden oder geladen werden" - which means in english ~ "Main class not found"
Has anybody a hint what I could try or where to find the error?
Thanks in forehand
source
...ANSWER
Answered 2017-Jun-08 at 07:41You should use groovy Gold.groovy
Java actually does not know about groovy scripts. A script is always compiled into a class. The Groovy compiler will compile the class for you, with the body of the script copied into a run()
method.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GroovyInAction
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page