Friday, October 30, 2009

Unattended Installation (aka Silent Install) of Sun JDK in Debian

Posting this short note to my blog in the hopes it may help someone else, as I had a hard time tracking this info down.

Debian provides a package (sun-java6-jdk) for installing the JDK, but when you have a situation where you need to do an unattended installation (aka "silent install") of the JDK you are stuck, because the install insists on making you interactively accept Sun's licensing agreement. Passing the -y option to apt-get has no effect. I was able to find a link on Sun's site for doing silent installs on Windows, but nothing for Linux.

Fortunately, I eventually tracked down, all you have to do is the following before you run your apt-get install command:

echo sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true | debconf-set-selections

This indicates to the installer hooks that you have already accepted the license agreement, and doesn't give you the annoying EULA dialog.

UPDATE 11/3/09: I should note that all of the above research was in preparation for setting up an automated install with FAI. Unfortunately, I later found out, that while the above works great in the regular command line, due to the nature of the environment FAI installs run in, it doesn't work for that. However, I also discovered there is a correct way of doing it with FAI.

Use "debconf preseeding". Create a class file e.g. debconf/DEFAULT (I used debconf/easberry-vm-std-plt-01 for testing with my host class, and populate it with the following:


sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true


This accomplishes basically the same thing, but in the FAI environment. Success!

Sunday, October 25, 2009

No Fluff, Just Stuff Atlanta

I just finished attending a 3 day (well, technically 2 1/2 days) tech conference called the "Greater Atlanta Software Symposium". (Most people seem to just refer to it by the name of the organization, "No Fluff Just Stuff"). I highly recommend this conference, which is held at various locations throughout the year. This is the third one I've attended, and I always come away from them excited about the new tech I've learned and eager to apply it.

There were lots of good presentations. On the first day, I started out with a presentation on anti-patterns in software development. (I always wonder, if patterns and anti-patterns converge do they annihilate each other)? Then I went to a presentation on Scala, which I've heard a lot of buzz about. It looks interesting, though some of the syntax made my eyes hurt. Then, I went to a presentation on Flex development. This, I think, is something I really want to pursue. Flex looks pretty cool, and like it or not, Flash is a lot more ubiquitous than Java on the desktop ever was or will be. (Sorry JavaFX). After dinner, there was an interesting keynote on being an iconoclast. It was very thought provoking, although the speaker sort of lost me when he seemed to put the "Dixie Chicks" on par with Florence Nightingale and other historical figures as examples of iconoclasts.

The second day I attended several web design talks by a couple of different presenters. I really need to read "Don't Make Me Think"and "The Design of Everyday Things." I also attended a session on "Java.next" which was an overview of up and coming alternative languages on the JVM. (This is where I first heard the controversial statement I mention below).

The final day (today) consisted of topics that are probably the most immediately applicable to my day job: presentations on the "Busy Java Developer's Guide to Collections" and a couple of deep dives into garbage collection on the JVM and various tools that are available to help troubleshoot running systems. (BTrace looks awesome!) I also attended a presentation on applying functional language approaches to Java development.

Functional languages on the JVM seemed to be one of the dominant themes this year. I think I need to spend some time learning either Scala or Clojure (or maybe both). One really provocative comment made by one of the presenters, and reaffirmed by the group at the expert panel talk, was that no "green field" projects should be written in Java. Of course, its a particularly provocative comment given that it was made at a conference targeted at Java developers.

I have mixed feelings.

I'm convinced that these new languages provide a lot of demonstrable benefits over the aging Java language. Since they run on the JVM, they can even be grafted onto existing Java projects. Of course, it's always good to learn new technologies just to tickle your brain, and maybe even get some new insights and ways of thinking about various problems.

On the other hand, in my world I don't see a lot of call for programmers that know Scala or Clojure, or even Groovy (which is not a functional language, but it's in that "java.next" category and its about as incremental a step away from Java that you can make). Let's face it, in today's economy, that's got to be a major consideration! Also, in most of the positions I've held in my career, I'm generally not working on "green field" projects; I'm maintaining existing applications. There's no way I'm going to be able to sneak in Clojure or Scala on my existing project (except for maybe, as was suggested as a first step, unit testing). Sure, those modules written in the other languages can be integrated with the existing Java code and it may not be an issue in the short term, but what percentage of Java developers are going to be able to come in behind me and even recognize the language, much less be able to understand it or maintain it? When someone else raised this very issue during the Scala presentation I attended, the presenter's answer to this seemed to be that he was above working with such programmers so it was a non-issue for him.

I still think it worth learning one (or both) of these languages, even though for the short term at least, I can't see using them for anything other than personal projects. Just wish I knew where to place my bets and place my focus, because there seem to be a LOT of paths to the future.