Changes

Jump to: navigation, search

Orange Pi Zero 3

464 bytes added, 18:16, 11 July 2023
Debian Bookworm System
<ol style="list-style-type: lower-alpha;">
<li><p>The specific version of Python is as follows</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''python3'''</p>
<p>Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux</p>
<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
<p>&gt;&gt;&gt;</p>
|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></big>|}</li>
<li><p>Write '''hello_world.py''' program in Python language</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p>
<p>print('Hello World!')</p>|}</li>
<li><p>The result of running '''hello_world.py''' is as follows</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p>
<p>Hello World!</p>|}</li></ol>
</li>
<li><p>Debian Bookworm does not install Java compilation tools and operating environment by default</p>
<ol style="list-style-type: lower-alpha;">
<li><p>You can use the following command to install openjdk, the latest &gt; version in Debian Bookworm is openjdk-17</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p>|}</li>
<li><p>After installation, you can check the version of Java</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''java --version'''</p>|}</li>
<li><p>Edit the Javaverison’s '''hello_world.java'''</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p>
<p>public class hello_world</p>
<p>{</p>
:<p>public static void main(String[] args)</p>:<p>{</p>::<p>System.out.println(&quot;Hello World!&quot;);</p>:<p>}</p>
<p>}</p>
<p>|}</p></li>
<li><p>Then compile and run'''hello_world.java'''</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p>
<p>orangepi@orangepi:~$ '''java hello_world'''</p>
<p>Hello World!</p>|}</li></ol>
</li></ol>

Navigation menu