Some weeks ago, I finished reading Compilers : Principles, Techniques & Tools, by Afred V. Aho, Monica S. Lam, Ravi Sethi and Jeffrey D. Ullman. This book is also called the Dragon Book due to the cover.
This book is a reference about compiler construction and design. If you are interested in this subject, this book is for you, it’s a must-have. However, I have to …
Posts Tagged ‘Java’
Five years after Java 6, Oracle has just released Java 7!
This is the first release of Java since Oracle bought Sun Microsystems.
This new version of Java introduces a lot of new features, but some of the languages new features will be introduced in Java 8 as stated by the “Plan B”.
In this version, there some great new language features, as stated by the JSR …
For a project at school, I needed to refactor an old code parsing almost 30 command line arguments. I needed to add some more arguments and change some old args, but the old code was not maintainable at all. So I decided to use a library to make the parsing. of the args.
I chose Apache Commons CLI. This is a really simple library …
When we develop Swing applications, SwingWorker are very helpful. But there is a big disadvantage using this class. if you don’t call get() in the done method, you will lose all the exceptions that the computation in the doInBackground() has thrown. And you action can stop and you will never see why. In 95% of my actions using SwingWorker, the doInBackground() return nothing.
Jonathan Giles …
I was presenting the Plan B of JDK 7 the last week and apparently, this plan has been approved.
The JDK 7 Features page has been updated on the site of Oracle.
So here are the (definitive ?) list of features for JDK 7 :
JSR 292: Support for dynamically-typed languages (InvokeDynamic)
Languages update of the project Coin
Concurrency and collections updates (jsr166y)
ionet JSR 203: More new I/O APIs for …
Hi,
It’s my pleasure to announce the release of a new version of JTheque Utils, the 1.1.5.
There is a lot of changes in this version. First of all, the library is now OSGi Ready, you can use it with no problem in an OSGi application. Here are the main changes of this version :
The main classes have been made thread safe and all the classes …
Let’s start with a new post in the Java concurrency series.
This time we’ll learn how to start cleanly new threads and to manage thread pools. In Java, if you have a Runnable like this :
Runnable runnable = new Runnable(){
public void run(){
System.out.println("Run");
}
}
You can easily run it in a new thread :
new Thread(runnable).start();
This is …
Mark Reinhold has posted a message about the planning of Java 7. In this message, he explains that the current schedule of the JDK 7 is completely unrealistic. This delay is due to the add of new projects (lambda, Coin, Jigsaw) and the acquisition of Sun by Oracle.
The current estimate by the team is that the JDK7 can be complete for a release …
When a data (typically a variable) can be accessed by several threads, you must synchronize the access to the data to ensure visibility and correctness.
By example, if you have a simple counter (yes, once again) :
public class Counter {
private int value;
public int getValue(){
return value;
…
After seeing how to synchronize code using semaphores, we’ll see how to do that using monitors.
Monitors are an other mechanism of concurrent programming. It’s a higher level mechanism than semaphores and also more powerful. A monitor is an instance of a class that can be used safely by several threads. All the methods of a monitor are executed with mutual exclusion. So at most …
