tags:

views:

342

answers:

5

I'm automating the process of building development-VMs for a project and having a really hard time getting sun-java-6 to install in a non-interactive environment because it really wants to ask about licenses. what are my other options are far as clojure friendly javas go?

A: 

Any certified JVM should do the trick - e.g. JRockit. There's a list of JVMs here. Note that some of these are for embedded platforms and the like, so not applicable.

Brian Agnew
It doesn't *have* to be certified. Compatible is enough. There are JVMs that are compatible but not certified, because in order to become certified you have to run Sun's testsuite, but the testsuite is licensed in such a way that open source JVMs are sometimes not allowed to run it.
Jörg W Mittag
Well, the reason I said certified was to reduce the set to those demonstrated to be compatible. As a developer, I would be uncomfortable developing on a JDK **not** demonstrably compatible
Brian Agnew
They *are* demonstrably compatible. Sun just makes sure that it's illegal for them to actually say it. Less competition that way. They do pass the testsuite just fine, they just can't admit if because that would mean admitting to violating the license and thus breaking the law.
Jörg W Mittag
A: 

Hmm. Have you tried using the redistributable JRE? I know when I was writing an installer for some windows software, all you had to do was extract the directory structure and it would work just fine.

Chad Okere
These VMs are for developets to use to build the application so they need the JDK i think?
Arthur Ulfeldt
+1  A: 

OpenJDK does not have a EULA and can be installed non-interactively. See also http://openjdk.java.net/install/

Pascal Thivent
have you used it with the latest clojure?
Arthur Ulfeldt
Well, I just did with *OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)* and *Clojure 1.1.0-master-SNAPSHOT* and everything seems to be working.
Pascal Thivent
+4  A: 

If I recall correctly the "accept the license" bit can be set explicitly as the output from the installation process says that the license has already been accepted at a later stage. Hence, look into the Ubuntu package and figure out how to do this.

I would not go the OpenJDK way as I do not believe it has passed the TCK yet.


EDIT: It appears that this is the way to do it:

DEBIAN_FRONTEND=noninteractive apt-get install -y java5-sun-jre || :
debconf 'echo SET shared/accepted-sun-dlj-v1-1 true; echo $(read) >&2'
apt-get install -y java5-sun-jre

http://ubuntuforums.org/showpost.php?p=6752243&postcount=9

Thorbjørn Ravn Andersen
See http://java.dzone.com/news/red-hats-icedtea-project-power and http://www.sun.com/software/opensource/java/faq.jsp#k24 about OpenJDK and the JCK
Pascal Thivent
Interesting. Did OpenJDK pass the TCK on Ubuntu? If I understand correctly it is not enough to pass on another Linux platform (glibc versions, gcc versions and other nastyness)
Thorbjørn Ravn Andersen
+2  A: 

With Ubuntu 9.04 at least I used OpenJDK and had no problems, though I never beat it up enough to say there were 0 problems, and this was before recent 1.1 RCs so things may have changed there as well. However it was perfectly usable and I doubt that has changed.

Runevault