|
1 Running the Nectar application
1.1 Java Runtime Environment & Development Kit
You should be already be able to compile and run Java executables using openJDK, but we prefer to install the sunJDK.
- Download and install the last JDK' RPM
from SUN.
rq: The Java Development Kit (JDK) contain the Java Runtime Environment (JRE).
# chmod +x jdk-6u19-linux-i586-rpm.bin
# ./jdk-6u19-linux-i586-rpm.bin
rq: # rpm --erase jdk-1.6.0_19-fcs (will remove it)
- You may want to make the SUN JDK the default one.
$ rpm -ql jdk-1.6.0_19-fcs | grep bin/javac (the sun jdk)
$ which java
$ ls -l /usr/bin/java* (link pointing to open jdk)
# cd /usr/bin
# rm -f java* (replacing links)
# find /usr/java/jdk1.6.0_19/bin/java* -exec ln -s {} . \;
$ /etc/alternatives/java -version (testing)
$ java -version
1.2 Hello World
$ cat > hello.java
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}
^D
$ javac hello.java
$ java HelloWorldApp
1.3 Nectar application
2 Integrated development environment
|