Adam Bien's Weblog

Monday Oct 20, 2014

JavaFX: A Composite View with WYSIWYG

Creating a composite view in JavaFX with Scene Builder and Dependency Injection:

See also: http://afterburner.adam-bien.com and see you at http://workshops.adam-bien.com/javaee-ui.htm.


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Saturday Oct 18, 2014

Setting The Classpath For Nashorn Script in jjs / Java 8

The Java 8 jjs interpreter accepts the -cp / -classpath argument. After setting the classpath, all the classes become available from within the executable script.

A utility class com.airhacks.naslib.Inspector in the naslib.jar (this is an sample jar) becomes available for Nashorn after setting the jjs classpath:


#!/usr/bin/jjs -cp ./naslib/target/naslib.jar -fv
//built-in variable
var args = $ARG;

var Inspector = com.airhacks.naslib.Inspector;
//class from jar, calling a static method
Inspector.inspect(args);

In case this post looks a bit crazy to you, you should join the Java 8 / Java EE 7 "More Power with Less Code" workshop :-).


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Friday Oct 17, 2014

Java 8, Nashorn, Nanoservices, JavaFX On-Stage Hacking and Airhacks -- End Of Year Events

See also the the Java EE Microservices workshop in January 2014.


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Wednesday Oct 15, 2014

Star 7 feat. James Gosling: The Origins of Java ...and iPhone?

Connected and portable touch devices and color screens in ...1992. Java's origins and probably the first appearance of the duke:


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Tuesday Oct 14, 2014

Named Parameters in Java 8

With Java 8 and the compiler flag: javac -parameters method parameter names are available via reflection. For example: the parameter names of the method hello:


public class Boundary {

    public void hello(String name, int age) {

    }
}

become accessible to the following code:


    public static void main(String[] args) {
        Method[] methods = Boundary.class.getMethods();
        for (Method method : methods) {
            System.out.print(method.getName() + "(");
            Parameter[] parameters = method.getParameters();
            for (Parameter parameter : parameters) {
                System.out.print(parameter.getType().getName() + " " + parameter.getName() + " ");
            }
            System.out.println(")");
        }
    }
}

Compilation with javac -parameters produces the following output:


hello(java.lang.String name int age )

Without the -parameters flag the names are not available:


hello(java.lang.String arg0 int arg1 )


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Sunday Oct 12, 2014

Java Mission Control--Development / Pricing and Unlocking

Java Mission Control is free for development (see: Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX ("B. SOFTWARE INTERNAL USE FOR DEVELOPMENT LICENSE GRANT").

For development you can use the: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder flag to unlock the Flight Recorder.

If you would like to use Java Mission Control in production, you will have to buy the Java SE Advanced (Desktop / Advanced / Suite) license: http://www.oracle.com/us/corporate/pricing/technology-price-list-070617.pdf


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Friday Oct 10, 2014

7th Airhacks Q & A Uploaded--JavaOne, Microservices, Scopes and JPA

Thanks for watching live--we got a new live audience record: >100 attendees. We discussed all the prepared questions in addition to many more from the IRC #airhacks channel and twitter.

Any questions left? Then join the conversation at each first Monday of the month at 6 P.M. live, comment / ask on github or this blog.

Also checkout: "Timisoara JUG Session: Hacking Opinionated JavaFX / Java 8 Apps" at 16th October, 5.30 P.M CET and Nashorn ...In Enterprise Applications (JavaDayKiev), 18th October, 10.10 AM CET: http://www.ustream.tv/channel/adambien.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Tuesday Oct 07, 2014

JavaOne 2014 Afterglow and Feedback

This year JavaOne officially started with a technical keynote in the Moscone center. There were no great, breaking news, but in an open ecosystem it is hard to keep anything secret.The keynote was a bit too formal and the most interesting part was postponed to the community keynote at Thursday.

Unofficially JavaOne started with the NetBeans Party at Saturday which was crowded and a perfect place to ask NetBeans questions or give feedback to the engineers.

The technical content was excellent. I spent 14h at the first both days (8 A.M - 10 P.M.) and really enjoyed all sessions. There was appreciation event at Wednesday (which I did not attended and preferred hacking in hotel). No BOFs were delivered at Wednesday or Thursday.

The community keynote at Thursday was excellent:

  1. James Weaver @JavaFXpert was a great moderator. Professional, funny and engaging.
  2. Intel joins OpenJDK
  3. @johanvos ports JavaFX on android and wins Duke Choice Award
  4. RoboVM presents JavaFX on iOS
  5. Johan Vos and RoboVM will join forces and deliver Java 8 (JavaFX) with Lambdas on both platforms. http://javafxports.org
  6. http://dukescript.com (a Java -> JavaScript bridge) also wins the Duke Choice awards
  7. James Gosling explains the early days of Java.
  8. There was a twitter Q&A with top engineers. #1qa was top 7 trending hashtag in USA.
  9. The JavaOne video is nice.

Also the JavaFX related sessions were very popular. The session Productive JavaFX was very well attended. I got lots of specific questions from the project, so JavaFX seems to gain momentum on desktop. I got the same feedback from other speakers.

JavaOne was really good, there was no dead time, content was compressed and the attendees very passionated. There were also more attendees than last year. I got lots of questions between the sessions. The organization was good, the food was better than last and in Parc 55 there was always enough coffee. Only the Starbucks at Hilton was constantly overloaded...

Check my twitter account for pictures: https://twitter.com/AdamBien.

The only suggestion: BoFs at Wednesday would be nice as an option for the appreciation event. Also I missed more sessions delivered by Oracle speakers--I would like to hear more from the core Java / JavaEE committers.

In case my sessions get accepted -- see you next year!


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Saturday Oct 04, 2014

JavaOne News, EntityManagers, SessionScoped Stateful or 7th AIrhacks Q & A

  1. JavaOne news and coverage
  2. Different ways to reference an EntityManager from an Entity
  3. What are @SessionScoped @Stateful Beans?
  4. @RequestScoped EntityManager and web frameworks
  5. Should @OneToMany JPA relationships be avoided?
  6. Storing JPA entities and persistence by reachability
  7. Is Jenkins a microservice?
  8. "...how many SLSB that can be added in my application, can i create as many as possible SSLB, like let say, one for each entity class..." [tejo]

The questions above are going to be answered during the next "Airhacks Q & A" http://airhacks.io live. You can subscribe to the channel and / or for the next event: http://www.ustream.tv/channel/adambien (both is optional, no registration required to watch this event live).

If you miss a question, comment this post, tweet your question with the hashtag "#airhacks" or mention @AdamBien on twitter.

The best of all: you can ask the questions live using twitter (hashtag "#airhacks") or (the best option): using channel ##airhacks on http://freenode.net.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

Tuesday Sep 30, 2014

JavaOne and Overnight Rockstars--The Official Soundtrack

Had some conversations with the performers. They were not aware of the video until the JavaOne keynote--a nice surprise.


NEW workshop: Microservices with Java EE 7 and Java 8, January 26th, 2015, Airport Munich

A book about rethinking Java EE Patterns

realworldpatterns.com
...the last 150 posts
...the last 10 comments
License