Cannot get this to work with javac

131 views
Skip to first unread message

Gerard Davison

unread,
Sep 3, 2009, 9:32:16 AM9/3/09
to Project Lombok
Hi,

I have trying to this this project in JDeveloper; but even though
lombok is on the classpath nothing "special" is happening at compile
time.

So JDeveloper is using javac from jdk 1.6u11 and the command line it
uses is:

D:\installs\ps1_14Aug2009\jdk160_11\jre\lib\resources.jar;D:\installs
\ps1_14Aug2009\jdk160_11\jre\lib\rt.jar;D:\installs
\ps1_14Aug2009\jdk160_11\jre\lib\jsse.jar;D:\installs
\ps1_14Aug2009\jdk160_11\jre\lib\jce.jar;D:\installs
\ps1_14Aug2009\jdk160_11\jre\lib\charsets.jar;D:\temp\Lombok\Library
\classes;D:\temp\lombok.jar -sourcepath D:\temp\Lombok\Library\src -d
D:\temp\Lombok\Library\classes D:\temp\Lombok\Library\src\library
\DataExample.java

The output of javap is:

D:\temp\Lombok\Library\classes>d:\installs\jdk6_14\bin\javap -
classpath . library.DataExample
Compiled from "DataExample.java"
public class library.DataExample extends java.lang.Object{
public library.DataExample();
}

The file DataExample looks like:

package library;

import lombok.Data;

@Data
public class DataExample {


private final String name;
private double score;
private String tags[];

}

This looks like an interesting project but it seems hard to get
started! Specifically there could really be a getting started page on
the main site rather than the video!

Gerard

Reinier Zwitserloot

unread,
Sep 3, 2009, 12:35:54 PM9/3/09
to Project Lombok
JBuilder isn't javac.

Try running the actual 'javac'. Also make sure javac v1.6 is used;
lombok does not work in v1.5.

If JBuilder is calling javac under the hood (most IDEs have their own
compiler), then most likely it's disabling annotation processors.

Gerard Davison

unread,
Sep 4, 2009, 9:51:51 AM9/4/09
to Project Lombok


Please, as noted I am using JDeveloper which shares no code and only
vague history with JBuilder some time in the distant past. :-) There
is quite a difference.*

It turns out that whilst JDeveloper appeared to be invoking the javac
process, it was instead using the new compiler API. It turns out this
might no be connected up correctly so that apt is not run. The
workaround it in the project settings to make sure set the compile to
run "Out of Process".

Gerard


* Disclaimer I work on the JDeveloper project

hermeneut

unread,
Oct 31, 2009, 9:02:18 AM10/31/09
to Project Lombok
Hi,

for short, you need to tweak the compiler settings of the projevt
properties:

http://kingsfleet.blogspot.com/2009/09/project-lombok-interesting-bean.html

then it works with JDeveloper

cherz



On Sep 3, 2:32 pm, Gerard Davison <gerard.davi...@gmail.com> wrote:
> Hi,
>
> I have trying to this this project inJDeveloper; but even though
> lombok is on the classpath nothing "special" is happening at compile
> time.
>
> SoJDeveloperis using javac from jdk 1.6u11 and the command line it
Reply all
Reply to author
Forward
0 new messages