Книга: Embedded Linux development using Eclipse

2.3.1 Installing and Using a Java Virtual Machine (JVM)

2.3.1 Installing and Using a Java Virtual Machine (JVM)

JVMs can be downloaded from http://www.java.com/en/. Click on the Free Java Download button. This takes you to a Java Downloads for Windows page. Click on All Java Downloads. This brings up a page with downloads of the latest releases of Solaris, Linux, and Mac OS, as well as Windows. At the time this was being written, the latest release was Java 6 update 3. While Eclipse does not officially support this version, it does appear to work OK. Other versions of Java are available by clicking on Other Java Versions.

Download the Linux (self-extracting) file to the same directory where you downloaded Eclipse. The file is an executable, so execute it. You’ll be asked to read and accept the Sun Microsystems Binary Code License Agreement for the Java SE runtime environment (JRE) version 6. The JVM is then extracted to jre1.6.0_03/. Note that if you choose to use a different version, the directory name changes accordingly.

To be sure the new version of the Java is the one that gets executed, it must appear in your path before the default version. You can add /<path_to_jvm>/bin to the beginning of your $PATH environment variable. Or you can create a link to the new Java executable in a directory that already appears in your $PATH ahead of the directory holding the default version.

Execute the shell command whereis java to determine where the default version is located. Then execute echo $PATH to find a suitable directory that appears earlier in your path. In my case, the default java is in /usr/bin and it turns out that /usr/local/bin shows up just ahead of that. So I put a link to /usr/local/jre1.6.0_03/bin/java in /usr/local/bin.

You can skip the rest of this chapter and move on to the next, unless you want to try out Eclipse under Windows.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.277. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз