How to install Sun JDK on Ubuntu

Posted on Saturday, November 1, 2008 in Setups, en, java

sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk

sudo update-java-alternatives -s java-6-sun

You also need to edit a file called /etc/jvm. This file defines the default system JVM search order. Each JVM should list their JAVA_HOME compatible directory in this file. The default system JVM is the first one available from top to bottom. Open /etc/jvm

$ sudo vi /etc/jvm

Make sure /usr/lib/jvm/java-6-sun is added to the top of JVM list

/usr/lib/jvm/java-6-sun

At the end your file should read as follows:


/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun
/usr

Save and close the file.

Setup the environment variable

You also need to setup JAVA_HOME and PATH variable. Open your $HOME/.bash_profile or /etc/profile (system wide) configuration. Open your .bash_profile file:

$ vi $HOME/.bash_profile

Append following line:

export JAVA_HOME=/usr/lib/jvm/java-6-sun
 export PATH=$PATH:$JAVA_HOME/bin

Save and close the file.

Test your new JDK

Type the following command to display version:

$ java -version

Output:

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

Try HelloWorld.java - first java program

$ vi HelloWorld.java

Append code:

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Save and close the file. Compile HelloWorld.java and execute program by typing following two instructions:

$ javac HelloWorld.java
 $ java  HelloWorld
 

Output:

Hello, World!
Tags: ,

Manning: some books about search technologies

Posted on Saturday, October 18, 2008 in books, en

Disclaimer!

None of the following links is an affiliate, and I have never personally linked to the Manning publishing.

Algorithms of the Intelligent Web

Topics of the book - search, data mining, classification, clasterisation, personal recommendations, etc.

The emphasis is on general principles and algorithms to organize the process.

The book has not yet been published (publication scheduled for March 2009), but is available for purchase through MEAP (Manning Early Access Program). Thus, what I took an advantage on. I bought it for chapters, starting with the 3rd, but decided to read from the beginning.

Collective Intelligence in Action

Very close on the first, but more attention paid to tools - Lucene, Nutch, WEKA

The press must be 17 October. Available as the most Manning-books are, in PDF format. Could not get to decide which of the two to choose, but now I tend to think that I’ll buy this one, too.

Taming Text

Again, very close to the first two, but is more specific specialization. The theme of the book - “how to cope with the unstructured text.” So far, says only half of the book is available through the MEAP.

Hibernate Search in Action

All the same search, but now in the annex to the specific technologies - Hibernate Core + Apache Lucene

Lucene in Action, Second Edition

Reissue of the famous book on the famous search framework - Lucene. Lucene - in the original Java-framework, has been ported to other languages and platforms. Lucene is the basis for other powerful and interesting projects - Hadoop, Solr and others.

Conclusion (rather passing observation):

It seems, Java finally ceased to be perceived as a “brake” even in such sensitive to the performance areas as search and processing large amounts of data. Or, in recent years has grown a generation of programmers / authors of books that are completely forgotten the C / C + +?

My music selection makes last.fm look good

You can't see my music, but that doesn't mean it's not there.

This theme was designed by Chris Wallace and is licensed under the GNU General Public License.

Check out his cool WordPress Themes. Released by Six Revisions in the year of the rat.