Installing Groovy and the corresponding Eclipse plugin was no problem. Running the first test script was straight forward also. But compiling a Java and a Groovy class inside the same project didn't work.
Therefore I did a test by hand.
- set JAVA_HOME and GROOVY_HOME
- compile the Groovy class inside projects src directory:
- groovyc PlayHttpHandler.groovy
- javac AjaxHttpHandler.java
- javac AjaxHttpServer.java
- start the server: java -cp /Volumes/Macintosh\ HD/Applications/groovy-1.6.3/embeddable/groovy-all-1.6.3.jar AjaxHttpServer
This worked. So try again in Eclipse.
First step was to clean the project. But it still doesn't work. All classes are build twice. In bin the Groovy class has an unresolved compile problem. To me it looks like the class was build with javac. In bin-groovy the Groovy class is OK. Unfortunately the Groovy class used during run time is the one from bin. Not sure how to fix this.
Keine Kommentare:
Kommentar veröffentlichen