Hot answers tagged

20 votes

Do all GPIO pins have a internal pull-up/pull-down resistors?

Yes, all of the B+'s GPIO pins have internal pull-up or pull-down resistors that can be controlled from your code. Pull-up is 50K min – 65K max. Pull-down is 50K min – 60K max. More info on the GPIO ...
user avatar
11 votes

Raspbian Stretch: Getting Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'

I actually fixed this error going step by step, apt seems to have a bug in the way it handles ca-certificates-java and openjdk-8-jre-headless on raspbian. So I did : sudo apt-get remove openjdk-8-...
user avatar
  • 211
10 votes
Accepted

Running the PC version of Minecraft on a Pi

This was not possible at the time of the original question, but the full Java-based Minecraft can run on a Raspberry Pi 2 or higher today. With improvements to OpenGL on Raspbian over the years, LWJGL ...
user avatar
  • 2,804
10 votes
Accepted

How do I update Java 8 in Raspbian

To have all the time the most recent Oracle java installed, you can do check current Java pi@raspberrypi:~ $ java -version java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-...
user avatar
8 votes
Accepted

Installing OpenJDK 16 on Raspberry Pi 4

I wrestled with the same issue a few days ago. I have been running a Minecraft server on a Raspberry Pi 4, using Java 8, installed via sudo apt install openjdk-8-jdk. However, as of snapshot 21w19a, ...
user avatar
  • 196
6 votes
Accepted

How do I install java on my Raspberry Pi

In newer distributions, Java is already installed so you might find you already have it. If all else fails, try: sudo apt-get update && sudo apt-get install oracle-java7-jdk
user avatar
  • 4,449
6 votes

Can the Raspberry Pi Zero run Java 8? And on which OS image?

I've been using Java 8 tools on a Raspberry Pi 2, so I see no reason why it should not work on a Zero. It won't be as snappy as on a x86_64 or even an ARM with better CPU/more RAM but it will work. I'...
user avatar
  • 312
6 votes
Accepted

JAVA_HOME not working

Your JAVA_HOME points to a different directory than where your java executable is located. Per your question, the JAVA_HOME directory is: /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt whereas java is ...
user avatar
  • 4,993
5 votes

GUI for Pi - Python or Java

You won't see a big difference either way; GUI applications are actually not CPU intensive. Or at least, the GUI part of them is not; they may or may not be doing other things that are. To qualify ...
user avatar
  • 55.8k
5 votes

Minecraft server on raspberry pi cluster

With some reservations, the answer is probably "No". That is not to say that you can't make a cluster of raspberry pis (because you can), and not to say that you can't run minecraft on such a cluster ...
user avatar
  • 2,899
4 votes
Accepted

Java 11 not working

Linux applications are not portable across all distributions of the same architecture and ABI. This is mainly because different distributions use different versions of libc, but there may be other, ...
user avatar
4 votes
Accepted

How to install Oracle JDK 14 on my Rasberry Pi 4B?

Is it even possible to install orcale jdk 14 on raspbian? The versions on the oracle site currently all appear to be x86-64 (for version 14). Oracle java is not open source, so no one else could ...
user avatar
  • 55.8k
4 votes

Pi 4 performance against x86 - CI/CD server with Java/Maven

After a few weeks I was finally able to perform a few benchmarks. The results are shown below: Computer Arch CPU RAM Drive Java Build Time ------------- ------ -------- ----...
user avatar
3 votes

How do I remove JDK6 from my pi

You can run these interactive commands to choose which Java-version that runs: sudo update-alternatives --config javac sudo update-alternatives --config java sudo update-alternatives --config ...
user avatar
  • 181
3 votes

Running the PC version of Minecraft on a Pi

From the log you pasted it seems that Pi's GPU doesn't know OpenGL. That's one of the reasons they've made a special version of the game. EDIT: I tried to make LWJGL program an run it on pi. It ...
user avatar
3 votes

Java Eclipse configuration for raspberry-pi

eclipse is just a runtime, part of a framework (Eclipse RCP) based upon OSGi that helps build portable applications, Rich client applications that are quick to develop and easy, fast and cheap to ...
user avatar
  • 141
3 votes

Pi4J i2c error: Error writing to /dev/i2c-1 at address 0x21. Got -20001

The first thing to check is the permissions you have to access /dev/i2c-1 ls -l /dev/i2c-1 Typically access is allowed to the root and i2c group. If you are not a member of the i2c group try sudo ...
user avatar
  • 66.5k
3 votes
Accepted

Can I design the program via JAVA on PC then transfer it to a Raspberry Pi?

It is possible, but you must take into account, that java is not completely platform independent. There are lots of examples like linux user limits (ulimit -a shows them) for the amount of max open ...
user avatar
3 votes
Accepted

PI 2 - GPIO pin stays HIGH even when I toggle ( in Java)

Did you use the correct pins? There is a difference between the old Rev1 and Rev2 GPIO layout so you might used a wrong reference. If you plan to do loads of led GPIO, the time to designa GPIO LED ...
user avatar
  • 1,651
3 votes

Does Windows 10 IoT support Java on the Raspberry Pi 2?

The answer is indeed "Nope". Microsoft Windows is a bit more "closed off" so I wouldn't sit around and wait for Java to come to IoT any time soon. If you want Java, go with a Linux distro like ...
user avatar
  • 1,597
3 votes

Does Windows 10 IoT support Java on the Raspberry Pi 2?

Two years passed and Azul systems (as I understand not without the help from Microsoft) developed Java for Win 10 Iot http://www.azul.com/downloads/zulu-embedded/ Not much is known about the ...
user avatar
  • 31
3 votes

Java is crashing my Pi

Have you deleted any JDK files recently? This question suggests you may be missing some files from your java installation. Just in case you could try reinstalling java.
user avatar
3 votes
Accepted

Java and DS18B20

Pi4J has released a 1-Wire API in version 1.1. It's no longer a SNAPSHOT version. W1Master master = new W1Master(); List<W1Device> w1Devices = master.getDevices(TmpDS18B20DeviceType.FAMILY_CODE)...
user avatar
  • 633
3 votes

Java headless or headful?

Java should only throw that exception if you deal with gui components (like Swing). check all your imports for javax.swing and make sure you don't reference any. also, don't use javaw to run it, use ...
user avatar
  • 271
3 votes

How to execute Java command which would shutdown Raspbian Operating System?

There looks to be a complete Java example using pi4j here: import java.io.IOException; import com.pi4j.io.gpio.GpioController; import com.pi4j.io.gpio.GpioFactory; import com.pi4j.io.gpio....
user avatar
  • 10.6k
3 votes

Can the Raspberry Pi Zero run Java 8? And on which OS image?

Yes, you can run Java 8 on a Raspberry Pi Zero. I have a Raspberry Pi B and B+ and Oracle Java 8 is running fine on both and is pre-installed on Raspian OS. Raspberry Pi B and B+ using the same ARMv6 ...
user avatar
  • 633
3 votes
Accepted

Connecting relays to a Raspberry Pi via radio

Use readymade remote-controlled sockets. They should be tested AND work already. The hard part is replacing the supplied remote with a cheap 433 Mhz transciever , which might need reverse-...
user avatar
  • 6,015
3 votes

RejectedExecutionException in pi4j

Per the comments below the question, I can't really take the credit for this. jason.keisersmith had received a reply to a bug report posted to the Pi4J Github page here by user savageautomate on 18/03/...
user avatar
  • 10.6k

Only top scored, non community-wiki answers of a minimum length are eligible