xwalter post at 2016-2-17 23:02:56

Embedded Java8 and Netbeans

Edited by xwalter at 2016-2-17 23:11

I use java 8 and Netbeans to develop with my orange pi plus 2
Following this istructions I hope you get help .
First of all you have to update and upgrade your system by typing

sudo apt-get update
sudo apt-get upgrade

Download the embedded java 8 jdk from Oracle athttp://www.oracle.com/technetwor ... nloads-2133151.html
Select jdk-1.8.0_73-linux-arm32-vfp-hflt.tar.gz and download it into Downloads folder
Move the terminal in this folder and type

sudo tar zxvf jdk-8u73-linux-arm32-vfp-hflt.tar.gz -C /opt

Set default java and javac to the new installed jdk8.

sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_73/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_73/bin/java 1

And then
sudo update-alternatives --config javac
sudo update-alternatives --config java

After all, verify with the commands with -version option.
java -version
javac -version

Now you can download and install Netbeans 8 as well , to this link https://netbeans.org/downloads/index.html
Download the complete version with Platform" OS indipendent zip"
Navigate to Download folder again and unzip the netbeans.8.1.xxxxx.zipfile .
Navigate until ...../home/orangepi/<yournetbeansfolder>/bin
Give the permission and the file executable with
chmod +x netbeans

After that ,to run Netbeans you have to type
./netbeans

Then you can install modules and plugin for several language such C/C++, PHP and java of course
It's working well .
ciao
Walter

xwalter post at 2016-2-20 09:41:59

Edited by xwalter at 2016-2-20 09:48

Carry on and let's use the serial port of our orangepi .
After install java jdk 8 and Netbeans and both working , now we want to use the serial port
First of all .....
sudo apt-get install librxtx-java
This will install the tool and you will find the RXTXcomm.jar into/usr/share/java
You have to add this library in Netbeans as external jar/folder
But for the runtime it needs also a .so file which is the same like .dll in windows .
so=shared object , is a dinamically library used at runtime which connects itself to the device driver.
After many nightmares and troubles I have found the best solution for that .
After the installation of the library you will also findinto/usr/lib/jni a lot of .so files but what you are interested is the librxtxSerial.so.
The problem is that Netbeans search this .so file somewhere like java.library.path and I didn't solve these issues. But I solved int his way ....
In Netbeans , right click above your project (in the tree at left) and select
-> Properties -> Run -> VM Options(is a richtext box ) and to add this line
-Djava.library.path="/usr/lib/jni/"
Click ok and go out and all is done.
Now if you run your project everythingsare ok .
Here you can find a complete project which uses the serial port by using threading technique as well.
http://rxtx.qbang.org/wiki/index ... ith_the_serial_port
ciao

xwalter post at 2016-2-20 23:28:22

In these two videos I show what I did
https://youtu.be/53ehI1FFKsM?list=PLJmvUGejM2TP5jt-xbKrCBU3QIe9MEXw_
https://youtu.be/q5HPKug3ZS0?list=PLJmvUGejM2TP5jt-xbKrCBU3QIe9MEXw_

xwalter post at 2016-2-22 09:49:13

now the problem is how to unlock thettyS0 in the system.
I'm trying with gtkterm , minicom and else but nothing to do
The serial port of orangepi is sleeping , it doesn't receive and it doesnt'show me anything on the screen .
Where to find the file and set "I Want to use my serial port " :Q

xwalter post at 2016-2-23 21:21:33

ok it works

xwalter post at 2016-2-24 11:13:21

Edited by xwalter at 2016-2-24 22:28


Communication between orange pi and Visual Studio 2015 over the serial port
https://youtu.be/Vz00VZiCzcY

davidjohn68 post at 2022-9-16 10:42:53

These new features usually improve the user experience, improve system performance, or both. While it’s great to learn how something works and how it can be used to make your life easier, it’s also good to know what you’re getting into weaver game phrazle before you start tinkering around with potentially expensive software.

emmaorabelle post at 2023-7-13 10:58:39

Thank you for sharing the instructions for setting up Java 8 and Netbeans on an Orange Pi Plus 2. These steps provide a helpful guide for developers using this platform. By following these instructions, users can update their system, download and install the Java 8 JDK, set the default Java and javac versions, and install Netbeans 8. Dave The Diver

Angel17 post at 2023-9-22 19:42:35

Thanks for sharing this wonderful blog. Keep posting.https://www.google.com/maps/place/?q=place_id:ChIJ48xZLbp1cVMRmkuG0vDqeYo
page: [1]
View full version: Embedded Java8 and Netbeans