Jelastic — Top Java Host, Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing. From JavaCC Grammar to NetBeans Code Editor. You can get pretty far without much coding, if you start off with a JavaCC grammar file and want to end up with an editor for your language, as these two new tutorials show: These tutorials are based on some notes in the Wiki, created by various NetBeans Platform developers.
That document should now be considered obsolete and the above two documents replace them. More features will be described and the features described so far will be expanded. An ANTLR version of these tutorials is also in the works, though the majority of the above two tutorials, i.e., the parts describing integration with NetBeans editor features, is the same regardless of the parser/lexer generator you choose to use. Though some parts are a bit basic, a lot of it has never been documented before. Update: Here's a YouTube movie to help you get started with the above! It is what it is » Blog Archive » JSON to Java with JDK6. There are multiple frameworks for transforming a JSON expression to a Java object tree, but the Java Platform does not come out of the box with some javax.json package (I heard there are plans for that).
Today I will show that you can easily transform a JSON expression to a simple Java object tree (map, arrays, primitive wrappers and string) with Java 6 and no additional framework. Obviously, it may not be the best way to proceed, specially when it comes to speed, security or java mapping. However this solution is appropriate if those are not a concern and you don’t want to add a dependency to an external library for parsing JSON expressions. The solution relies on the javax.script package and its Javascript binding. Indeed what’s best than Javascript to parse JavaScript Object Notation ? The scripting API provides evaluation of any Javascript which is nice, unfortunately native Javascript objects are not usable from Java, but the magic of Javascript will come to the rescue!
353. Status: Active JCP version in use: 2.8 Java Specification Participation Agreement version in use: 2.0 Description: The Java API for JSON Processing (JSON-P) JSR will develop a Java API to process (for e.g. parse, generate, transform and query) JSON.
Expert Group Transparency: Public Communications Issue Tracking Updates to the Original JSR The following information has been updated from the original proposal on the dates shown. 2.18 Please provide a description of the business terms for the Specification, RI and TCK that will apply when this JSR is final.
Specification licenseRI license Commercial use The RI will be available for commercial use under the CDDL 1.1 open source license, the GPLv2 with Classpath Exception open source license, or this RI license. Original Java Specification Request (JSR) Identification | Request | Contributions Section 1. Wicket Tabbed Application with Guest Book. I took the "Tabbed Application" sample provided by the NetBeans Wicket plugin and integrated Jeff Schwartz's GuestBook (see yesterday's blog entry for details on that) into it (click to enlarge the images below): The application now looks like this, i.e., note the new panels package and the TabbedPanelPage class (from the abovementioned sample), which hooks everything together: Without a doubt the most difficult thing was figuring out how to display static resources, i.e., the image in the first tab.
In the end, I set up a specific location for all static resources, i.e., within the 'web' folder: When you build the project, the 'static' folder is now right at the top (though it could be anywhere, depending on how the 'ignorePaths' parameter is set below): And then in the web.xml file, take note of the "ignorePaths" parameter: That was not fun to figure out. Loosely Coupled Wicket. The next step in the Wicket example I've been looking at, which currently looks as follows... ...is to make the panels "Welcome Page", "About Page", and "Guest Book" loosely coupled from the web application.
I.e., each tab in the web application now comes from a different JAR: There are great benefits to this structure. First of all, the application is now more cleanly organized since each archive (whether it be JAR or WAR) is dedicated to a specific task. You could have a different group of developers working on each JAR, which would be especially useful when the web application becomes very large, where you'll find that each tab (or page) in the application becomes more specialized and distinct from the rest of the application.
(Having NetBeans projects on the classpath, as opposed to JARs, means that they're going to automatically be cleaned and built together with the web application that contains them. From zero to load-balanced GlassFish cluster (The Aquarium)