Skip to content

Java JDK 8 and Commercial Features

There is an interesting presentation to be found on SlideShare by Oracle employee and Java Evangelist Simon Ritter.

The presentation (slide 36) lists some of the proposed contents of of the upcoming JDK 8. Among the suggested contents is:

“Oracle JVM Convergence

Complete migration of performance and serviceability features from JRockit, including Mission Control and the Flight Recorder”

As explained in my previous post Mission Control and Flight Recorder are presently so-called Commercial Features which are subject the SUPPLEMENTAL LICENSE TERMS in the Java SE License Agreement (full title “Oracle Binary Code License Agreement for the Java SE Platform Products”), and may not be used for production purposes unless separately licensed.

It is going to be very interesting to see how Oracle will approach the migration of what is presently Commercial Features from a licensing perspective into the Java 8 JDK.

Perhaps the warning in slide 13 of the presentation contains a hint. It reads:

Caveat emptor

Caveat emptor is latin and means “Let the buyer beware”.

Categories: Uncategorized.

Tags: , , , ,

cljs-template with Clojure/ClojureScript REPLs from Emacs

This post outlines how to create a dev environment for Noir webapps based on the excellent cljs-template. Aside from the multiple compilation modes provided out-of-the-box by cljs-template, it provides both a Clojure and a ClojureScript REPL from Emacs.

The below assumes a basic Leinigen install (Leinigen 1.7 assumed) and clojure-mode installed in Emacs (available from elpa). You also need to have swank-clojure installed by adding [lein-swank "1.4.3"] to the :plugins section of either project.clj or your user profile.

First install cljs-template as per instructions on the projects github page here.

Run

lein new cljs-template "project-name"

where project-name is whatever you want to call your project. Enter the “project-name” dir created and uncomment this line (13) in /src/project-name/client/main.cljs:

(repl/connect "http://localhost:9000/repl")

This will the page call back to the REPL when loaded.

You also need to add a dependency on the cljs-build plug-in to the project.clj file, by adding this line:

:plugins [[lein-cljsbuild "0.1.2"]]

Remember to run:

lein deps

to pull down the cljsbuild jar.

Then evaluate the following function in your *scratch* buffer (add it to your .emacs, .init file if you want it permanently available):

(defun clojurescript-repl ()
 (interactive)
 (run-lisp "lein trampoline cljsbuild repl-listen"))

Next make sure the Emacs working directory is set correctly by evaluating the following function in your *scratch* buffer (where pwd is the path to your cljs-template directory:

(cd "pwd")

Now start serving the cljs-template app with this command issued from the cmd-line in the cljs-template directory:

lein run

From Emacs you should now be able to call clojure-jack-in (part of clojure-mode) which will give you a Clojure REPL into the cljs-template project and calling clojurescript-repl will give you a ClojureScript REPL hooked into the browser Javascript VM. The page defined by main.cljs is available at localhost:8090 by default. You might have to reload the page to establish the connection. Remember to add the callback to the REPL to other pages you want to hook into the ClojureScript REPL.

Thanks to #bsteuber on the #clojure IRC channel for help in hooking up to the browser VM using inferior-lisp.

Feedback is very welcome.

Categories: Uncategorized.

Tags: , , , ,

SAS vs. World Programming – Opinion of the Advocate General

So the Advocate General to the ECJ has submitted its opinion to the Court on the questions submitted by the High Court of Justice of England and Wales in the SAS vs World Programming case that i wrote about here and here.

The Advocate concludes the following:

(1)

Article 1(2) of Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs is to be interpreted as meaning that the functionalities of a computer program and the programming language are not eligible, as such, for copyright protection. It will be for the national court to examine whether, in reproducing these functionalities in its computer program, the author of the program has reproduced a substantial part of the elements of the first program which are the expression of the author’s own intellectual creation.

(2)

Articles 1(2) and 6 of Directive 91/250 are to be interpreted as meaning that it is not regarded as an act subject to authorisation for a licensee to reproduce a code or to translate the form of the code of a data file format so as to be able to write, in his own computer program, a source code which reads and writes that file format, provided that that act is absolutely indispensable for the purposes of obtaining the information necessary to achieve interoperability between the elements of different programs. That act must not have the effect of enabling the licensee to recopy the code of the computer program in his own program, a question which will be for the national court to determine.

(3)

Article 5(3) of Directive 91/250, read in conjunction with Articles 4(a) and (b) and 5(1) thereof, is to be interpreted as meaning that the expression ‘any of the acts of loading, displaying, running, transmitting or storing the computer program [which the person having the right] is entitled to do’ relates to the acts for which that person has obtained authorisation from the rightholder and to the acts of loading and running necessary in order to use the computer program in accordance with its intended purpose. Acts of observing, studying or testing the functioning of a computer program which are performed in accordance with that provision must not have the effect of enabling the person having a right to use a copy of the program to access information which is protected by copyright, such as the source code or the object code.

(4)

Article 2(a) of Directive 2001/29/EC of the European Parliament and of the Council of 22 May 2001 on the harmonisation of certain aspects of copyright and related rights in the information society is to be interpreted as meaning that the reproduction, in a computer program or a user manual, of certain elements described in the manual for another computer program may constitute an infringement of the copyright in the latter manual if – a question which will be for the national court to determine – the elements reproduced in this way are the expression of their author’s own intellectual creation.

The opinion is pretty much a slam dunk for World Programming. The only hiccup is the issue related to the copying of parts of SAS’ manuals, but that is a minor issue compared to a situation where World Programming would have been restricted in their ability to produce a product compatible with SAS’ product. Now we just have to hope that the Court agrees with the Advocate General.

Categories: Uncategorized.

Tags: , , ,

Off-topic: Restaurant in Alcudia, Mallorca

If you ever find yourself in Alcudia, Mallorca around dinner time try out Sa Portassa. Basic but good Mallorcan food, especially the pa amb olí is very good.

Categories: Uncategorized.

Oracle Java 7 and “Commercial Features”

Oracle has just announced the general availability of Java 7 SE including Java SE Advanced and Java SE Suite.

Being a software license nerd I of course skimmed the Java SE License Agreement (full title “Oracle Binary Code License Agreement for the Java SE Platform Products”).

The license contains some interesting wording regarding “Commercial Features” in section 1, 2 and SUPPLEMENTAL LICENSE TERMS section A and G. The “Commercial Features” are defined in this document (PDF version with better layout here). Please note that the specification of “Commercial Features” is not part of the license as such and therefor subject to change at Oracle’s discretion.

Table 1-1 – Commercial Features in Java SE Product Editions

Feature

Java SE

Advanced

Java SE

Suite

Java SE

Suite

Profiling and Diagnostics

JRockit Flight Recorder (1)

Y

Y

JRockit JDK R28.1.3

JRockit Mission Control Console observability (1)

Y

Y

JRockit JDK R28.1.3
JRockit Real Time 3.1.2
JRockit Mission Control 3.1.2

JRockit Mission Control Memory Leak Detector observability (1)

Y

Y

JRockit JDK R28.1.3
JRockit Real Time 3.1.2
JRockit Mission Control 3.1.2

JRE Usage Tracking

Y

Y

Java for Business JRE 6u25
Java for Business JRE 6u26
Java for Business JRE 7

Extreme Low Latency

JRockit Real Time, Deterministic GC

N

Y

JRockit JDK R28.1.3
JRockit Real Time 3.1.2
JRockit Mission Control 3.1.2

Desktop

JRE Installer Auto-Update Off

Y

Y

Java for Business JRE 6u25
Java for Business JRE 6u26
Java for Business JRE 7

It turns out the “Commercial Features” are subject to rather draconian restrictions (SUPPLEMENTAL LICENSE TERMS section A):

A.  COMMERCIAL FEATURES.  You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production  purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms.  If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle.

As you can tell any meaningful business use of the “Commercial Features” are subject to a separate license.

So does the regular Java 7 SE download contain any of these “Commercial Features”? It does not look like it and the Java Se Advance and Java SE Suite packages doesn’t either, because they do not exist. From below two sections that appear at end of this document, it is clear that the Java SE Advanced and Java SE Suite “products” are a combination of the Java 7 SE and a number of separate packages.

Installation of Java SE Product Editions

Oracle does not provide installation programs that correspond directly to Java SE, Oracle Java SE Advanced and Oracle Java SE Suite. Depending on the features licensed, one or more of the following individual packages must be downloaded:

JRE JDK

JRockit JDK

JRockit Mission Control

Java for Business JRE

Java for Business JDK

Licensing Considerations and Restricted-Use Licensing

Some of the packages described in Installation of Java SE Product Editions install commercial features that are restricted to Oracle Java SE Advanced or Oracle Java SE Suite. For example, the JRockit JDK comes with a deterministic garbage collector that requires a Oracle Java SE Suite license.

If you download (which you can do for instance here and here) and use these extra packages for the purposes outlined above (any meaning full business use) in combination with Java 7 SE you are subject to a separate (ostensibly payable) license.

The only mention I can find of this change from Oracle is this blog post with the clearly misleading title “JRockit is Now Free (and Other Java License Updates)”, as this does not apply to the JRockit “Commercial Features” listed above.

You should make sure that your developers, ops people and relevant vendors of such service knows this, or you could end up breaching your license and owing Oracle a lot of money.

Categories: Uncategorized.

Tags: , , , , ,

Dropbox Unzip

Inspirer by this post where the author shows how to add automatic unzipping to a Dropbox folder on OS X, I wanted to see if something similar was easily achievable on Ubuntu (10.10).

After a bit of searching I found incron. Quoting from the website incron “is an “inotify cron” system. It consists of a daemon and a table manipulator. You can use it a similar way as the regular cron. The difference is that the inotify cron handles filesystem events rather than time periods.”

To create a folder in your Dropbox that automatically unzips any zip file dropped into it first install incron. It is available in the Ubuntu Universe repository and can be installed using:

sudo apt-get install incron

After the package is installed you must add the username of all users who should be permitted to add jobs to incron to /etc/incron.allow like this(replace [username] with your username):

sudo echo “[username]” >> /etc/incron.allow

Next create the unzip folder in your Dropbox folder:

mkdir [path to your Dropbox folder]/unzip

Next we need to add the actual unzip job row to incron like this:

incrontab -e

This opens the user incron table in the deafult editor. Insert the following line, replacing [path to your Dropbox folder] with the absolute path (don’t use ~) to your Dropbox folder:

[path to your Dropbox folder]/unzip IN_CLOSE_WRITE unzip $@/$# -d $@

Check that the job row was added to your incron table:

incrontab -l

This should output the line you just added above. Finally we have to start the incron daemon:

sudo incrond

Now try copying a zip file into the Dropbox/unzip folder. If everything works it should unzip automatically. This obviously only so long the machine you installed the incron job is online and the daemon is running.

If you start thinking about the possible applications for this pattern are endless. How about converting just about any document type to PDF just by dropping it into a Dropbox subfolder? First install unoconv using:

sudo apt-get install unoconv

Then create a folder called “topdf” and add the following instruction using incrontab -e :

[path to your Dropbox folder]/topdf IN_CLOSE_WRITE unoconv -f pdf $@/$# -o $@

Voila any file of a format readable by OpenOffice dropped into the “topdf” folder will instantly be converted to PDF.

Categories: Uncategorized.

Tags: , , , , , ,

Emacs from master on Ubuntu

Check out source using:

git clone git://git.savannah.gnu.org/emacs.git

Generate configure script:

cd emacs

./autogen.sh

Configure make and install:

./configure
make
sudo make install

Done!

Categories: Uncategorized.

Tags: ,

A simple chat app using Aleph, Websockets and Clojure

I have implemented a small example shoving how to use the websocket support in Aleph, the asynchronous webframework for Clojure built on Netty.

The example is tested with Chrome and Firefox on Ubuntu. It should work in all modern browsers as it relies on web-socket-js for websocket emulation in browsers that do not have native support. Please note the updated Usage instructions. The socket-policy-server necessary for Flash websocket emulation has to listen on port 843 (at least that is the first place Flash asks for the policy file) so the server has to be run using sudo.

If you are interested the example is at hosted on github, along with usage instructions.

Categories: Uncategorized.

Tags: , , , ,

Oracle vs. Google – implementing the JVM specification

A lot has already been written on the Oracle vs. Google Android case. (UPDATED: Some are brilliant.) Some (UPDATE:  are illuminating, some less so. Since the complaint is devoid of any details as to how Android infringes upon the patents listed in the complaint, I will focus on the alleged copyright infringement. Here too Oracle is not specific but it is clear that the infringement is alleged at least in part on the basis of unlicensed use of specification(s) in which Oracle holds copyright(cf. Count VIII section 38 of the complaint) .

For context Oracle in the complaint defines Android as:

The Android operating system software “stack” consists of Java applications running on a Java-based object-oriented application framework, and core libraries running on a “Dalvik” virtual machine (VM) that features just-in-time (JIT) compilation.

One aspect that appears to confuse matters is what Dalvik is. Dalvik is VM but *not* a Java VM. Dalvik executes .dex files which are created from .class files produced by a Java compiler. The .dex files are created by a tool called “dx”. As such Dalvik does not implement the Java Language Specification. The “dx” tool does however appear to implement part of the Java Virtual Machine Specification, namely the part that specifies the .class file format. As the “dx” tool does not comply with the conditions of SUN’s license grant the question is then: Does Google need a copyright license from SUN to implement the “dx” tool?

From a European perspective the recent SAS vs. World Programming(WPL) case sheds some very interesting light on this issue. The case a addresses the application of copyright to programming languages, interfaces and functionality. While the judge submits all of the questions to the ECJ for a preliminary ruling, he clearly thinks, on the strength English precedents(specifically the Navitaire case) that neither programming languages, interfaces or functionality is protectable by copyright. If the ECJ concurs with the judges opinion it is hard to see why Google would need a license to implement the .class file format as part of their “dx” tool.

Would the analysis under US copyright law be the same?

Categories: Uncategorized.

Tags: , , , , , , ,

SAS vs World Programming – SAS’ version

SAS issued a press release today with its take on the recent decision in the case between the two companies.

While WPL’s press release might have been s optimistic in its evaluation of the decision, SAS’ press release is a master piece of hypocrisy and highly tendentious. The headline:

“Court finds World Programming Ltd. Infringed on SAS Copyrights; refers case to European Court of Justice”

Technically this is wrong. The judge referred a number of key questions to the ECJ – not the case it self. More specifically the judge asked for a preliminary ruling on 6 questions (para 332 i, ii, iii, v, vi and viii):

“i) Although I am not persuaded that Pumfrey J was wrong to conclude in Navitaire that, on the true interpretation of Article 1(2) of the Software Directive, copyright in computer programs does not protect programming languages from being copied, I agree with him that this is a question on which guidance from the ECJ is required (see paragraphs 211-218 above).

ii) Although I am not persuaded that Pumfrey J was wrong to conclude in Navitaire that, on the true interpretation of Article 1(2) of the Software Directive, copyright in computer programs does not protect interfaces from being copied where this can be achieved without decompiling the object code, I consider this is also a question on which guidance from the ECJ is required (see paragraphs 219-227 above).

iii) Although I am not persuaded that Pumfrey J was wrong to conclude in Navitaire that, on the true interpretation of Article 1(2) of the Software Directive, copyright in computer programs does not protect the functions of the programs from being copied, and although his decision on that point was upheld by the Court of Appeal in Nova, I consider that this is also a question on which guidance from the ECJ is required (see paragraphs 228-238 above).

v) I consider that the reasoning which supports Pumfrey J’s interpretation of Article 1(2) of the Software Directive also applies to Article 2(a) of the Information Society Directive, but again this is a question on which guidance from the ECJ is required (see paragraphs 251-256 above).

vi) On the assumption that Article 2(a) of the Information Society Directive is to be interpreted in the same manner as Article 1(2) of the Software Directive, WPL has not infringed SAS Institute’s copyright in the SAS Manuals by producing or testing WPS (see paragraphs 257-267 above).”

SAS completely neglects to mention that the judge is clearly prepared to find in favor of WPL in all these questions and cites English precedents in support of such a decision. He asks for the ECJs confirmation of his interpretation because the basis for the rules in English law is EU Directives (see here for the practice directions the court operates under).

SAS goes on to state the following:

“The court also found that WPL acted outside the scope of its license agreement for SAS Learning Edition software by using that product to develop WPL’s World Programming System (WPS) software.”

What the judge actually said was this (my emphasis):

vii) WPL’s use of the SAS Learning Edition falls outside the scope of the terms of the relevant licences (see paragraphs 276-290 above).

viii) The interpretation of Article 5(3) of the Software Directive is another question on which guidance from the ECJ is required (see paragraphs 291-311 and 314 above).

ix) On the interpretation of Article 5(3) which I favour, WPL’s use of the Learning Edition is within Article 5(3), and to the extent that the licence terms prevent this they are null and void, with the result that none of WPL’s acts complained of was a breach of contract or an infringement of copyright except perhaps one (see paragraphs 313-315 above).

Also on this issue SAS chooses not to disclose that the judge is prepared to find in favor of WPL.

Accusing WPL of spinning the courts decision and then applying tornado class spin to the decision yourself is just pathetic.

Categories: Uncategorized.

Tags: , , , ,