Posts tagged netbeans
Being at JavaOne 2013 has inspired me to heed the call to option from the Java team at Oracle and give JDK 8 Early Adopter a spin. This article describes how to get from zero to running your first Lambda expression in a Java 8 program in about 10 minutes. It is definitely not a hard task. After going through these steps, you are ready to really start trying out Java SE 8 (including that long awaited new Data API).
The steps are simply:
- Download JDK 8 EA
- Download NetBeans 7.4RC1
- Install JDK 8 EA
- Install NetBeans 7.4RC1
- Run NetBeans and create a new Java project
In this article, I show how I have created a simple and fairly meaningless Java EE 7 application that uses a number of smart Java EE features:
- a stateless session bean has a scheduled method (that is triggered every 3 seconds)
- the stateless session bean publishes custom CDI events
- a class annotated as WebSocket EndPoint manages WebSocket channels with WS clients (in this case simple HTML browser applications) – echoing messages between the clients
- the WebSocket Endpoint also observes the CDI event and pushes the event payload to each of the WebSocket clients
Using NetBeans 7.3.1 and GlassFish 4.0 – as well as a number of blog-articles and sample applications – this turned out to be very simple to put together.
This next figure visualizes what I did:
The important steps to come to a running applications are:
- create new Java EE 7 project in NetBeans
- create class TimeEvent that will be used to publish as CDI event
- create class EventProducer – a stateless EJB session bean that is scheduled to trigger every 3 seconds; it publishes a TimeEvent whenever it is triggered
- create class SocketMediator – an annotated POJO that has the ServerEndpoint annotation (to More >
Last week saw the release of Java EE 7 – the new edition of the Java Enterprise platform. It is a substantial release – which advances the Java Enterprise Platform in many areas. What this release consists of really is the following
- the common understanding between major stakeholders in the Java community – laid down in formal specifications – about how the Java platform will support many aspects of implementing enterprise applications, including (fairly) recent developments such as RESTful services, JSON format, WebSockets communication, HTML 5 rendering, parallel batch processing.
- an example implementation of a Java EE container that will run Java EE applications that are built according to said specifications; this is GlassFish 4.0 Application Server.
- an important incentive to Java vendors to upgrade their Java EE containers (JBoss, Tomcat, IBM, Oracle, …) and a similar impetus for Java developers to upgrade their skill set and start leveraging new standards and facilities (although at this point most of us are still absorbing many of the Java EE 6 improvements)
- a fresh wave of energy, focus, enthusiasm, hope and expectation through the Java community; Java is alive and More >
While the double entendre of ‘SUNday’ no longer exists, this first day is still an important day. To set the stage, manage expectations, build on the atmosphere and layout the roadmap (starting that sometimes not even subtle massaging of the minds). The keynote sessions are the key events that define scope and themes for the conference.
Java is very much on the move again. After the virtual stand still just before and for a while after Oracle took over (from) Sun, last year saw a dramatic increase in the Java movement. This year that thread continues. Not with many spectacular announcement, but with a solid pursuit of earlier roadmaps and an apparently good collaboration between vendors in the Java space. The one big elephant in the room – that is actually not in the room at JavaOne – is Google. Otherwise for example, Oracle staff happily shared the stage for this keynote session with IBM.
This year’s overall slogan for JavaOne is: Make the future Java.
It is very much an invitation from Oracle to help bring the Java platform forward. In many ways: ideas, feedback, testing, propagating, creating code, joining JSR committees etc. Oracle and other vendors More >
Stand-alone Java Client for jWebSocket Server – communicating from Java Client to Web Clients and vice versa over WebSockets0
In a previous article, I have discussed the open source jWebSocket Server and a simple installation and configuration (http://technology.amis.nl/blog/14940/first-steps-with-jwebsocket-open-source-java-framework-for-websockets-installation-and-running-samples). Subsequently, I have shown the implementation of a web client for a synchronized Slideshow application, where WebSocket communication is used to perform Client 2 Client push (http://technology.amis.nl/blog/14949/push-based-synchronized-slideshow-web-application-implemented-using-websockets-and-jwebsocket-server-the-open-source-java-websocket-server). In a third article I have explained how jWebSocket server can be integrated with a Java application that can start the server and interact with it (http://technology.amis.nl/blog/14973/implementing-a-java-server-side-component-for-jwebsocket-server-for-websocket-interaction-with-web-clients). Finally in this article I demonstrate how a stand alone Java Client can connect to a ‘remote’ jWebSocket server and open WebSocket interactions with it.
The functionality realized in this article is a simple Java application that listens to slide selection events as pushed from the clients More >
Implementing a Java Server Side component for jWebSocket Server for WebSocket interaction with Web Clients4
This article will describe how a Java application can integrate with jWebSocket server – in fact: start the server from within the Java code -and subsequently register listeners that intercept WebSocket communication from other interaction partners such as Web clients. The Java application can also send messages to specific clients or broadcast to all clients. This article More >