Trying the prototype

maurizio cimadamore maurizio.cimadamore at oracle.com
Fri Aug 6 12:54:29 PDT 2010


On 06/08/2010 20:36, Collin Fagan wrote:
>> Brian Goetz
>> There is, however, tremendous value in you actually *trying* the
>>      
> prototype.
>    
>> Have you done that?
>>      
> I sir have not and would very much like to. Should I just get the latest
> openjdk build (103?) or does Project Lambda have it's own branch? Is there a
> page that walks me through compiling from source?
>
> thanks,
>
> Collin
>
>    
Hi Collin
thanks for your interest in project lambda. The easiest way to try the 
prototype is to have a JDK binary snapshot available (b103 or greater); 
you then need to do the following:

1) clone the 'langtools' repository of the lambda branch:

hg clone http://hg.openjdk.java.net/lambda/lambda/langtools

[this will create a new 'langtools' folder in your current folder]

2) build the compiler

cd langtools/make

ant -Dboot.java.home=<PATH_TO_JDK6> -Dtarget.java.home=<PATH_TO_JDK7> 
build-all-tools

This should compile all tools (javac/javap/javah/javadoc/apt) and should 
result in a new folder called 'dist' under the 'langtools' folder. 
Inside 'dist' there is a subfolder named 'bin' - inside, you will find 
the executables for java/javac that should allow you to compile and 
execute code containing lambda expressions.

[If you like NetBeans, there's a NB project under langtools/make - the 
project name is 'langtools' - once the project has been opened in the 
IDE, you can simply build everything by pressing F-11, or by selecting 
'Build' from the project contexual menu... however ant options 
(-Dboot.java.home and -Dtarget.java.home) still need to be specified 
manually --- this can be done by accessing the menu under 
Tools->Options->Misc->Ant and by inserting the appropriate value in the 
text field at the bottom of the tab].

Maurizio




More information about the lambda-dev mailing list