View: 18590|Reply: 8

Embedded Java8 and Netbeans

[Copy link]

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
Published in 2016-2-17 23:02:56 | Show all floors |Read mode
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

  1. sudo apt-get update
  2. sudo apt-get upgrade
Copy code

Download the embedded java 8 jdk from Oracle at  http://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

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

Set default java and javac to the new installed jdk8.

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

And then
  1. sudo update-alternatives --config javac
  2. sudo update-alternatives --config java
Copy code

After all, verify with the commands with -version option.
  1. java -version
  2. javac -version
Copy code

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.zip  file .
Navigate until ...../home/orangepi/<yournetbeansfolder>/bin
Give the permission and the file executable with
  1. chmod +x netbeans
Copy code

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

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

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-20 09:41:59 | Show all floors
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 .....
  1. sudo apt-get install librxtx-java
Copy code

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 find  into  /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
  1. -Djava.library.path="/usr/lib/jni/"
Copy code

Click ok and go out and all is done.
Now if you run your project everythings  are 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

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-20 23:28:22 | Show all floors

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-22 09:49:13 | Show all floors
now the problem is how to unlock the  ttyS0 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 "

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 21:21:33 | Show all floors
ok it works
Reply

Use magic report

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-24 11:13:21 | Show all floors
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

0

threads

10

posts

50

credits

Registered member

Rank: 2

credits
50
Published in 2022-9-16 10:42:53 | Show all floors
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.

0

threads

28

posts

74

credits

Registered member

Rank: 2

credits
74
Published in 2023-7-13 10:58:39 | Show all floors
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

0

threads

20

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2023-9-22 19:42:35 | Show all floors
Thanks for sharing this wonderful blog. Keep posting.  https://www.google.com/maps/place/?q=place_id:ChIJ48xZLbp1cVMRmkuG0vDqeYo
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list