Re: Lombok and GWT

1,006 views
Skip to first unread message

Reinier Zwitserloot

unread,
Dec 3, 2012, 11:43:13 AM12/3/12
to project...@googlegroups.com
What happens if you replace -javaagent:lombok.jar=ECJ with -javaagent:/path/to/lombok.jar=ECJ?

If that doesn't seem to work, try replacing -classpath pathTo/lombok.jar with -Xbootclasspath/p:pathTo/lombok.jar - but I don't think that's necessary.

On Monday, December 3, 2012 2:52:17 PM UTC+1, Lianna wrote:
I tried using Lombok in a GWT Eclipse project (with maven also).
When annotating a field at server side with @Getter the getter is generated, doing so at client side seems to work also, but..
when starting the application with the Eclipse Google Plugin I cannot open it in the browser: 

Eclipse says: 

Error opening zip file or JAR manifest missing : lombok.jar
Error occurred during initialization of VM
agent library failed to init: instrument

I have added -classpath <pathTo>/lombok.jar -javaagent:lombok.jar=ECJ as VM arguments in the run configuration of Eclipse Web Application.

Without it, I got the message : The method getHello() is undefined for the type MyClientData

source for MyClientData

package de.krm.client;

public class MyClientData {

@Getter 
private String hello = "Hi";

}

A solution with maven will please me at most, since I am planning to use delombok as well before starting the GWT compiler.

Jeremy Nimmer

unread,
Dec 5, 2012, 9:46:07 AM12/5/12
to project...@googlegroups.com
On Wednesday, December 5, 2012 3:45:30 AM UTC-5, Lianna wrote:
But I have got another question: does this also work, if I start the GWTCompiler for packaging my application in a war and starting it at a server ?

GWT's javascript compiler "gwtc" works just fine with only a -javaagent:${lombok}=ECJ added to its command-line invocation, though it embeds an older version of the eclipse compiler, which means old JDT bugs may still bite you.

Reinier Zwitserloot

unread,
Dec 5, 2012, 10:01:17 AM12/5/12
to project-lombok
Glad to hear our instructions on the site ( http://projectlombok.org/setup/gwt.html ) are still up to date - adding to bootclasspath NOT required.

 --Reinier Zwitserloot



--
 
 

Reply all
Reply to author
Forward
0 new messages