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?
-
I need it to install through apt on ubuntu 9.10+ – Arthur Ulfeldt Dec 24 '09 at 19:34
-
To the best of my knowledge Clojure has not been made to run on any other VMs than Sun's. – mac Dec 25 '09 at 01:04
-
Maybe only relevant to a Mac platform, but I've run Clojure with SoyLatte. – G__ Dec 26 '09 at 16:48
5 Answers
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

- 73,784
- 33
- 194
- 347
-
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 Dec 24 '09 at 20:58
-
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 Dec 25 '09 at 00:02
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.

- 268,207
- 37
- 334
- 440
-
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 Dec 25 '09 at 00:07
-
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 Dec 25 '09 at 11:54
-
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 Dec 26 '09 at 22:58
OpenJDK does not have a EULA and can be installed non-interactively. See also http://openjdk.java.net/install/

- 562,542
- 136
- 1,062
- 1,124
-
-
1Well, 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 Dec 24 '09 at 19:42
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.

- 1,492
- 9
- 16
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.

- 4,570
- 1
- 21
- 19
-
These VMs are for developets to use to build the application so they need the JDK i think? – Arthur Ulfeldt Dec 24 '09 at 19:27