background preloader

Java

Facebook Twitter

JSF

Morphic. Squeak. Scratch. JNLP Support in the Next Generation Java™ Plug-In Technology (introduced in Java SE 6 update 10) Table of Contents Introduction The next-generation Java Plug-In technology (hereafter the "Java Plug-In") provides support for launching applets directly from JNLP files.

JNLP Support in the Next Generation Java™ Plug-In Technology (introduced in Java SE 6 update 10)

Previously, only Java Web Start utilized JNLP files, for the purpose of launching Java applications. Now Java applets can be described using the same meta-descriptor. This new functionality offers many benefits: Access to JNLP extensions in applets. This document highlights the slight semantic differences when using JNLP to describe Java applets in the browser, and provides examples of simple and advanced applet deployment via JNLP. Usage. Java ClassLoader – Part 2 – Write your own ClassLoader. This is the second part of series of articles about Java’s ClassLoader.

Java ClassLoader – Part 2 – Write your own ClassLoader

We will show here how you can write your own simple ClassLoader and “replace” the default system ClassLoader with your version. We have to extend the java.lang.ClassLoader class and implement some of its crucial methods, like loadClass(String name). This method is run every time somebody requests a class inside the code, and receives as a parameter the full name of the class to load. In our implementation we will print out this name, so to know when our method was called, and then load the class with our class loader if the class is in “javablogging” package.

ClassLoaders

RebelLabs All Reports Page - Free Technical Content for Geeks. Java - How to get the path of a running JAR file? Birt. Java8. Swing. JavaFX8. JDBC. JDBC. Why is Java I/O Slow? - Red-Green-Code. You can read a lot on Quora about the best language to use for competitive programming.

Why is Java I/O Slow? - Red-Green-Code

Here are some of the points covered by those questions: C and C++ execute quickly, and their macro support can reduce the amount of code that you end up typing in your solution.A language like Java can be useful for problems with some specific requirements (such as integers that don’t fit in 64 bits, or calendar problems).The main contributor to execution speed is the algorithm that you use, not the language that you choose to implement it. But the language can provide a performance edge at the margins.Choice of language is less important for more recent contests, since problem setters have made an effort to level the playing field (e.g., by testing Java solutions to ensure that the time limit is sufficient). One thing about the uHunt problems that I’m working through is that they draw from a database of contest problems going back to the 1990s. Output Tests System.out.println BufferedWriter Input Tests. From Runtime.exec() to ProcessBuilder - Java Tips.

Junit

Spreadsheets. Asprise Java OCR SDK - royalty-free API library with source code examples converting images to word or searchable PDF by extracting text. Asprise OCR for Java Installation¶ There are two options: add Asprise OCR as a maven/gradle dependency or manually download the SDK from asprise.com.

Asprise Java OCR SDK - royalty-free API library with source code examples converting images to word or searchable PDF by extracting text

Option 1: Add Asprise OCR as a Maven/Gradle Dependency¶ If you are using maven for your build, simply add the following dependency to your pom.xml (under element: /project/dependencies): Asprise OCR as a maven dependency¶ <dependency><groupId>com.asprise.ocr</groupId><artifactId>java-ocr-api</artifactId><version>[15,)</version></dependency> For gradle users, you need to add the following line to your build.gradle (under dependencies):

Codecity for Eclipse Visualises Source Code Metrics. During EclipseCon, Marcel Bruch released an alpha version of Codecity for Eclipse, which calculates source code metrics and presents them in a city block layout.

Codecity for Eclipse Visualises Source Code Metrics

After installing from the marketplace or the update site, a new option 'Show in → Codecity' will be enabled on project resources or source folder. After calculating a set of metrics, an external browser will be opened with a WebGL view that renders the results in a pannable and scrollable graphic. For example, the graphic below shows individual classes in Apache Log4J 1.2.17; the highest bar selected is LogBrokerMonitor, which contains 106 methods and 36 fields.

Regular Expressions

Annotations. JavaParser. Java Tutorial - Java Annotations. Annotations embeds supplemental information into a source file.

Java Tutorial - Java Annotations

An annotation does not change the semantics of a program. An annotation is created through a mechanism based on the interface. The following code declares an annotation called MyAnno: // A simple annotation type. @interface MyAnno { String str();/* w w w.j a v a 2s .co m*/ int val(); } Java Properties file examples. Normally, Java properties file is used to store project configuration data or settings.

Java Properties file examples

In this tutorial, we will show you how to read and write to/from a properties file. Java Properties File: How to Read config.properties Values in Java? Method to dynamically load java class files. Access properties file programatically with Spring? The Rise and Fall of Thinking Machines, Bankruptcy Article. Drools Expert User Guide. The Conditional Element from enables users to specify an arbitrary source for data to be matched by LHS patterns.

Drools Expert User Guide

This allows the engine to reason over data not in the Working Memory. The data source could be a sub-field on a bound variable or the results of a method call. It is a powerful construction that allows out of the box integration with other application components and frameworks. One common example is the integration with data retrieved on-demand from databases using hibernate named queries. The expression used to define the object source is any expression that follows regular MVEL syntax. Here is a simple example of reasoning and binding on another pattern sub-field: rule "validate zipcode" when Person( $personAddress : address ) Address( zipcode == "23920W") from $personAddress then // zip code is ok end With all the flexibility from the new expressiveness in the Drools engine you can slice and dice this problem many ways.

There are several ways to address this issue: