|
32.
|
|
|
Read the Java license presented. You must accept it to continue.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:100(para) programming/C/programming.xml:118(para)
|
|
33.
|
|
|
To get your system to use Sun Java instead of the open-source (but less functional) GIJ that is installed by default, run: <screen>sudo update-alternatives --config java</screen> and choose the option that has <filename>j2re1.5-sun</filename> in it.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:103(para)
|
|
34.
|
|
|
JDK 1.6
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:111(title)
|
|
35.
|
|
|
Java 1.6 is also available, and can be installed by following the above directions, swapping all instances of 1.5 to 1.6
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:112(para)
|
|
36.
|
|
|
<ulink url="apt:sun-java6-jdk">Install the <application>sun-java6-jdk</application> package</ulink>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:115(para)
|
|
37.
|
|
|
To get your system to use Sun Java instead of the open-source (but less functional) GIJ that is installed by default, run: <screen>sudo update-alternatives --config java</screen> and choose the option that has <filename>j2re1.6-sun</filename> in it.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:121(para)
|
|
38.
|
|
|
Hello World
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:130(title)
|
|
39.
|
|
|
Enter the following code into a text editor and save it as "Hello.java":
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:131(para)
|
|
40.
|
|
|
public class Hello {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:132(screen)
|
|
41.
|
|
|
Open a terminal and compile your code by typing:<screen>javac Hello.java</screen>. You can then run your code by typing:<screen>java Hello</screen>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
programming/C/programming.xml:138(para)
|