If you are looking for something different; David Benn always provides a slightly different look at Java technologies, and this month won't disappoint - when David said he would present on the Java Compiler API at the last meeting, i don't think anyone expected "Java, assembly code, blinken lights.."; this presentation is actually a follow on from David's 2004 talk "Embedded Java: Down to the Metal" (slides and code available); where he shows how the Java Compiler API has made feasible what he hinted at in 2004.
Also if you are materialistic, we have a bit of swag to give away courtesy of the JUG Program coordinator, Aaron Houston; including t-shirts, books, duke squishies, and a Sun SPOT. To ensure the swag is put to good use, you must bring along a friend for you and your friend(s) to qualify for goodies; and the person with the most friends wins! I also have a DVD of all the JavaOne 2008 Hands-on labs if anyone is interested, please give me a buzz to get a copy made.
![[photo of swag]](http://us.i1.yimg.com/us.yimg.com/i/space.gif)
/derek
Monthy Meeting 19/05/2008: Java Compiler API on Bare Metal |David
Benn, ASTC
Meeting Details
- Date: Monday 19 May 2008. 6:00pm - 7:30pm
- Where: BreckNock Hotel, 401 King William Street
Adelaide map

- Agenda
- 6:00 Java News and Views (15 mins)
- 6:15 Presentation (60 mins)
- 7:15 Question and Answers (15 mins)
- 7:30 Counter meal and a drink at the BreckNock
Java Compiler API on Bare Metal
Overview:
New facilities were added to Java 6 to allow the Java compiler to be invoked programmatically and to generate and walk Abstract Syntax Trees (ASTs): the Java Compiler API and Compiler Tree APIs. Also added was the Pluggable Annotation Processing API.When taken together, these APIs make it possible to create useful and interesting tools for static analysis, refactoring, code generation and so on. As a motivating (and slightly off-the-wall) example for learning about these new APIs, I will present and explain a Java program that, for a small subset of the Java language, generates target code for a microcontroller. The generated code will then be assembled, flashed into, and run on that microcontroller.
This talk could also be entitled: "Embedded Java: Down to the Metal, part 2", or even "Bare Metal Java" after my 2004 AJUG down-to-the-metal talk in which I hinted at the possibility of doing something like the above. Java 5's annotations and Java 6's compiler-hacking features have made this more feasible.
Java, assembly code, blinkenlights. Oh my!
Presenter: David Benn, ASTC
David is a software engineer with ASTC where he develops
simulators (and related tools) for various hardware platforms. In his
spare time he enjoys stargazing with a computerised telescope, getting
low-resource microcontrollers to do amusing things, plumbing the depths
of functional programming, bike riding with his family, and generally
wondering where the time goes.
Links
-
JSR 199, the Java Compiler API http://www.jcp.org/en/jsr/detail?id=199
-
JSR 269: Pluggable Annotation Processing API http://www.jcp.org/en/jsr/detail?id=269
-
The OpenJDK Project's
javacsection: https://openjdk.dev.java.net/compiler/ -
The Kitchen Sink Language project: https://ksl.dev.java.net/
- David's Blog http://dbenn.wordpress.com/