[vc_row][vc_column][vc_column_text]Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers “write once, run anywhere” (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Java is, as of 2014, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 9 million developers.[10][11] Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems’ Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.
In this post, we will look at how to install java on pcDuino.[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1395131935-1-8″][vc_column_text]We need the following parts:
1 x pcDuino v2 with 20131126 ubuntu image installed.[/vc_column_text][/vc_tab][vc_tab title=”Install Java development Enviroment” tab_id=”1395131935-2-50″][vc_column_text]1. We can check if Java is installed by typing:
ubuntu@ubuntu:~$java -version
If the terminal outputs something as the following, it means that Java is ready install.
If no version of Java is reported, we can install java JDK by typing:
ubuntu@ubuntu:~$apt-get install java-6-openjdk
2. Although it is not necessary, but we recommend to use eclipse to manage the project.
Install eclipse by:
ubuntu@ubuntu:~$sudo apt-get install eclipse
After its done, we can run eclipse by:
ubuntu@ubuntu:~$eclipse
During the startup, it will prompts you to create a workspace.[/vc_column_text][/vc_tab][vc_tab title=”Hello World” tab_id=”1395132254725-2-1″][vc_column_text]Create a test project by File->New->Java project, and then create file test.java, input the test code:
package com.test; public class Test { public static void main(String[] args) { System.out.println("Hello world !"); } }
When we run the code, it will output “Hello world” on the console.[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.