range Pi User Manual Copyright reserved by Shenzhen Xunlong Software Co., Ltd
247
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use the Ctrl+D shortcut to exit python's interactive mode.
b. Write the hello_world.py program in Python language
orangepi@orangepi:~$ vim hello_world.py
print('Hello World!')
c. The result of running hello_world.py is as follows
orangepi@orangepi:~$ python3 hello_world.py
Hello World!
3) Debian Bookworm does not install Java compilation tools and operating environment
by default
a. You can use the following command to install openjdk, the latest version in
Debian Bookworm is openjdk-17
orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk
b. After installation, you can check the version of Java
orangepi@orangepi:~$ java --version
c. Write the Java version of hello_world.java
orangepi@orangepi:~$ vim hello_world.java
public class hello_world
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
d. Then compile and run hello_world.java
orangepi@orangepi:~$ javac hello_world.java
orangepi@orangepi:~$ java hello_world
Hello World!
3.24.3. Ubuntu Focal system
1) Ubuntu Focal has a gcc compilation tool chain installed by default, which can directly
compile C language programs in the Linux system of the development board
a. The version of a.gcc is as follows
orangepi@orangepi:~$ gcc --version