0

I am planning to start writing java program on raspberry Pi3. I found out some java IDE on Internet. I saw that NetBeans is most commonly use on raspberry Pi3.

I am confuse, Do I need to install java IDE or I can directly type program on nano editor and run on PI without installing java IDE

I think, I have to install NetBeans java IDE to write ,compile program on PI

asked Jan 12, 2018 at 11:33
1
  • 1
    No, you do not need to use an IDE. Commented Jan 12, 2018 at 12:38

1 Answer 1

3

You do not need to run NetBeans to program Java on the Raspberry Pi. You do not even need an IDE, though that can be helpful.

To run a java program all you need is a Java runtime. The official name from Oracle (the owner's of Java) is the Java Runtime Environment (JRE). This is a collection of libraries plus the application "java" which runs a compiled java program.

To program in Java you need some sort of text editor. An IDE includes this and sometimes will let you switch to your favorite editor. Then you will compile your program with the "javac" application.

There are different runtimes and libraries out there, so you will have to check how to download your favorite to your Raspberry Pi. The last time I checked, Java was included in the Raspian I downloaded for my Pi.

If you want to access the gpio pins of your Pi, you'll need a library that allows you to do this. The two most commons ones are Pi4J and Device I/O. Instructions for downloading them are at https://dzone.com/refcardz/iot-applications-with-java-and-raspberry-pi.

There is also a version of Java designed for embedded computers. Oracle's version is called "Java SE Embedded" and this page, http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html, describes it, but it's outdated.

answered Jan 12, 2018 at 12:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.