Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [java]

Java is a high level programming language. Roughly four billion devices run Java, as it is used in almost all computers and mobile phones, as well as other interactive devices. In order to program with Java, a separate JDK has to be installed beyond the normal language kit.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

How to remote debug with Eclipse and JDK17

In "the early days" it was pretty easy to write java-code using Netbeans an have it run remotely on a raspberry pi with tools netbeans provided. Nowadays I am struggeling to achieve the same ...
Jan Kressin's user avatar
3 votes
1 answer
680 views

Up-to-date java version for setting up a minecraft server on raspberry pi 4

Problem summary I'm trying to set up my raspberry pi 4 as a minecraft server as described here. I've installed the default version of java. The output from java -version is openjdk version "17.0....
r.bot's user avatar
  • 133
0 votes
1 answer
362 views

How to solve Missing X server or $DISPLAY when trying to change the loaded website in chromium

I am a newbie with using raspberry and I am using chilipie-kiosk to develop a kiosk on a raspberry pi. The idea is when the Raspberry Pi starts, the Chromium browser is launched with a page that we ...
Jorge Palacios Zaratiegui's user avatar
0 votes
1 answer
239 views

Hosting a lavalink server and connecting to it at the same time fails

I am running a discord bot that requires voice commands in my Raspberry Pi 4, and installed OpenJDK 17.0.1 on it. I also used pyenv to install python 3.10 on the Pi, and set the version to be global. ...
LuckElixir's user avatar
0 votes
0 answers
27 views

Raspberry Pi Wine Java

I downloaded Wine on my Raspberry Pi 5. I want to run Java, because I want to run Age of History 2 (the exe file uses Java).
MEnsar55's user avatar
0 votes
0 answers
64 views

wired connection between raspberry pi and android app

I am reading Can data with Pcan, and I am transferring my Can data to my Raspberry Pi 4. With this code import can import serial # CAN bus setup can_bus = can.interface.Bus(bustype="pcan", ...
Alper's user avatar
  • 1
1 vote
0 answers
20 views

Cannot get WS28xx strip code working in eclipse swing

Hey all I have been looking at doing this for some time now. I ran across this posting and this is the type of led strip I am using. However, using that code seems to have errors when trying to add it ...
StealthRT's user avatar
  • 121
2 votes
2 answers
237 views

How to correctly identify the pin addresses in the Pi4J 2.2.1 GPIO API?

I can't seem to get the right pin number. Let's say I want to access this pin: What's the actual address of the pin? 11, 26 or what? Here's the code I use: (THIS CODE WORKS WITH PIN BCM 23) final ...
MomoTheDev's user avatar
0 votes
0 answers
146 views

Raspberry 4 Java Pi4J GPIO Input not changing state

I am trying to use my Raspberry Pi 4's GPIOs to turn on various thing in my smart home. I am getting 2.6V on the GPIO Input, thus resulting in a HIGH signal. I have confirmed this with a basic python ...
Dahlin's user avatar
  • 1
0 votes
0 answers
139 views

Turn on LED using pi4j and Raspberry pi 4

I am so new to Raspberry Pi. I want to use pi4j 2 to flash a led that is connected to a raspberry pi. This is my code but the led does not turn on at all: import com.pi4j.Pi4J; import com.pi4j.io.gpio....
Reza Gholipour's user avatar
1 vote
2 answers
3k views

How to use Java 18 on Pi

Following https://www.hanselman.com/blog/how-to-use-a-raspberry-pi-4-as-a-minecraft-java-server to make a Minecraft server. The only thing I changed is the server jar itself, BUT Minecraft 1.18.2 ...
Nguyen Pham Khoi's user avatar
0 votes
0 answers
274 views

Using the camera on 64bit vs. 32bit from Java

I have Raspberry Pi 3 B. And a camera module v. 2.1. I have installed the Raspbian OS 64bit, the latest - "bullseye" Tried to record some video in any way, and after some experimentation, I ...
Ondra Žižka's user avatar
0 votes
0 answers
47 views

sound .wav clip on ubuntu 21.10 with openjdk 17

I'm trying to play a .wav file on my Raspberry Pi (4). My OS is Ubuntu 21.10, 64 bit. My JDK is Open JDK 17.0.1. I've downloaded a sample .wav file to play it. The .wav file located under resources ...
Roy Ash's user avatar
  • 101
0 votes
0 answers
234 views

Why am I getting "bash: javac: command not found" after supposedly installing jdk17.0.1 on Raspberry pi OS 64 bit?

So I followed The instructions here https://linuxhint.com/install-oracle-java-jdk-16-raspberry-pi/ Except I did so entirely on the gui of Raspberry pi OS. I downloaded the jdk file from the same ...
Justin's user avatar
  • 1
-2 votes
1 answer
34 views

JDK version still at 11 even after updating $PATH to use JDK 16

I updated my Raspberry Pi to JDK 16 by following part of this tutorial: https://linuxhint.com/install-oracle-java-jdk-16-raspberry-pi/ It worked just fine (when I do java --version, it displayed JDK ...
YJJcoolcool's user avatar
0 votes
1 answer
132 views

ClassNotFound when sudo java

I have a computer lab which is set up with piserver and 3B+ raspberry pis. I want my students to be able to write java code that will use the GPIO pins, so they will need to sudo java their programs. ...
KsMomOf2's user avatar
2 votes
1 answer
328 views

Audio not playing through Java on Raspberry Pi

The issue I'm trying to play sound on a Raspberry Pi 3 B+ through Java, but it doesn't work. I have Written code (shown below) in IntelliJ, and confirmed that it works on Windows 10. Connected ...
kviLL's user avatar
  • 131
0 votes
1 answer
559 views

Trying to install Minecraft server - can't install the correct JAVA version

My goal is to install a Minecraft server on my Raspberry Pi 4B with 8GB RAM. I mainly followed this guide which includes a script to install all of the components quickly. The main commands are: wget -...
X_841's user avatar
  • 103
2 votes
0 answers
126 views

How do I rebuild the Minecraft shim layer?

I'm running a Minecraft server off a RPi4 8gb, but the raspian OSs is 32 bit, limiting the memory I can allocate to the server. There is a beta 64 bit os, but on of the things missing is Minecraft's ...
Jacob N's user avatar
  • 21
0 votes
1 answer
463 views

build opencv for java on rpi4

I'm trying to build OpencCV for Java on raspberry pi 4B. I am quite new in this sphere and do not understand almost everything. At first, I just wanted to unload my .jar file to the raspberry and run ...
crackanddie's user avatar
6 votes
3 answers
22k views

Installing OpenJDK 16 on Raspberry Pi 4

I am trying to install OpenJDK 16 on my Raspberry Pi 4. I'm running a minecraft server and there was an update recently which requires Java 16, but I have Java 8 installed. There is no openjdk-16-jdk ...
Henry's user avatar
  • 163
0 votes
1 answer
177 views

GpioPinPwmOutput set pwm value with floating point

I have a raspberry pi 4 B and I want to control servo motor. I am using NetBeans IDE and Java programming language with pi4j library for raspberry. Also I have a servo motor that can rotate for 300 ...
crackanddie's user avatar
0 votes
0 answers
133 views

Pi4 MCP3008 - SPI port setup failed, no SPI available

I am trying to use a joystick with a MCP3008 in the middle (Connected to GPIO8 - SPI CS0) but I get following error: Exception in thread "main" java.lang.reflect.InvocationTargetException ...
osumatu's user avatar
  • 113
0 votes
1 answer
159 views

How do I install Java 7 on Raspbian Buster?

I have a program that runs with Processing 2.2.1. I have downloaded Processing 2.2.1 from the Download page, but the Java included in the program is not compatible with the Raspberry Pi. https://...
zetamoon's user avatar
0 votes
1 answer
1k views

How do I install UniFi Network Controller and Oracle Java 8 on Raspbian 10 (buster)?

I have a LABISTS Raspberry Pi 4 B Model B 4GB with Raspbian 10 installed (Buster). I've been trying to follow UniFi - How to Install and Update via APT on Debian or Ubuntu to install the Ubiquiti ...
Dawngerpony's user avatar
0 votes
1 answer
2k views

Installing ARM64 Java On The Model 4

I am trying to install the ARM64 version of Java on my Raspberry Pi model 4. I have already added arm_64bit=1 to the /boot/config.txt file and running uname -a returns Linux pi4 5.10.17-v8+ #1403 SMP ...
SidS's user avatar
  • 265
0 votes
2 answers
879 views

Can't figure out how to install java 10

I'm trying to install java 10 on the 64 bit OS. I can install java 11 fine with sudo apt-get install openjdk-11-jdk-headless, but when I do sudo apt-get install openjdk-10-jdk-headless, I get the ...
DPS100's user avatar
  • 1
0 votes
1 answer
284 views

Can jSerialComm use the UART RX and TX pins on Raspberry Pi?

I made a PCB board that can handle measurements and control from a web application made in Java (Vaadin) and I want to connect the RX and TX pins of that PCB board to my Raspberry Pi 4B. I tried to ...
euraad's user avatar
  • 105
0 votes
1 answer
216 views

Run Eclipse on RP4

Got Raspberry Pi 4 with 8Gb of RAM and would like to run Eclipse for it. But Eclipse does not provide 32 bit versions. Can I somehow get running latest version of Eclipse? What latest version I can ...
vico's user avatar
  • 163
0 votes
1 answer
2k views

Minecraft 1.16.4 on Raspberry Pi 4 fais to launch with errors

I'm getting an error trying to launch 1.16.4. Here are the steps I've done so far: Got Minecraft 1.16.1 with Optifine working on my RPI4 following the steps on the How to setup Minecraft 1.16.1 on ...
Backface_Kullah's user avatar
1 vote
4 answers
3k views

What Java library to use for GPIO with raspberry pi 4b

Abandoned post by Unregistered user. What Java library should I use to control raspberry pi 4b, Pi4J does not support rpi4. Wiringpi is deprecated. I tried searching for others b ut cannot find ...
newbie's user avatar
  • 31
1 vote
1 answer
102 views

Unable to control GPIO from the code

I am using raspberry pi 4b along with Freenova kit. I am trying to make the LED blink however it does not blink instead it is ON of the time. I have tried different code (C,Python,Java) but none of it ...
newbie's user avatar
  • 31
3 votes
1 answer
6k views

Java 64 Bit on Pi 4

I switch the Kernel of my Raspbi 4 to 64 Bit by changing the /boot/config.txt adding arm_64bit=1. After a reboot uname -a shows Linux raspberrypi 5.4.72-v8+ #1358 SMP PREEMPT Mon Oct 26 17:29:14 GMT ...
Nabor's user avatar
  • 131
1 vote
2 answers
542 views

Trying to build java app with Gradle, ssh gradle build fails

I have a Raspberry Pi which I'm trying to create a Java app for. So far I have cloned my repo into a directory on the desktop. My app uses Gradle and I followed the instructions correctly from here to ...
SimonA's user avatar
  • 11
1 vote
3 answers
113 views

Which language to use for an application which includes a REST API?

I have an RPi which I want to use to interface to a number of different devices via I/O and/or COM. A PC will communicate with it via ethernet and a REST API. The app should be able to start up ...
paul's user avatar
  • 131
1 vote
2 answers
2k views

Pi4 GPIO Control with Java

I am basically trying to turn on a led by using pi4j library. My code is pretty simple: public static void main(String args[]) throws InterruptedException { GpioController gpioController = ...
osumatu's user avatar
  • 113
0 votes
1 answer
742 views

Is there any way to communicate with the I2C with Java, without Pi4J?

With Pi4J, I can communicate with I2C with Java. But is there any way I can communicate with I2C with Java, without Pi4J. Just by using Linux internal...shell-ish...command? I want to read and write ...
euraad's user avatar
  • 105
1 vote
1 answer
3k views

Issues with linux and Jar files. Jar works in eclipse, but doesn't run in raspberry pi

I'm trying to run a .jar file made in Eclipse using JDK 11 on a raspberry pi 4. For the Raspbian OS I had to use a 64-bit version instead of a 32 bit. I put the jar into a folder together with the ...
HelloThere's user avatar
0 votes
3 answers
891 views

Minecraft 1.16.2 on Raspberry Pi 4

As of this writing, I have been attempting for some time now to get Minecraft 1.16.2 working on my Raspberry pi 4. I have been using the instructions on this guide which helped me set up Minecraft 1....
Herb_Ren's user avatar
0 votes
1 answer
91 views

JAVA development environment for Raspberry Pi 2 or perhaps from the command line?

Hi I'm new to Raspberry (Pi 2) and would like to know (1) if it's feasible to develop simple JAVA apps in a development environment (Eclipse? Others?) or failing that from the command line. (2) a ...
Dave's user avatar
  • 143
6 votes
2 answers
3k views

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

I was considering using a Raspberry Pi 4 as a cheap CI/CD server with Jenkins & Maven. Does anyone have a performance comparison of a Pi 4 against a modern Intel Core i3/i5/i7? For example, how ...
The Impaler's user avatar
1 vote
2 answers
334 views

CLASSPATH seems to be ignored by openJDK8 on RaspiOS Lite Buster [closed]

I installed openJDK8 on a Raspberry Pi 0H with RaspiOS Lite (BUSTER). I also installed wiringpi and pi4j libraries. I added the directories to CLASSPATH in the /etc/environment file and even tried ...
Chris Wolcott's user avatar
2 votes
1 answer
444 views

Rasberry Pi 3 Pi4j does not work for digital pins other than RaspiPin.GPIO_07

I am trying to get a led working with the Raspberry Pin 3 model B+ with Raspbian. I am using Java Pi4j library this way: GpioPinDigitalOutput digitalOutputPin = GpioFactory.getInstance()....
MABC's user avatar
  • 123
0 votes
3 answers
4k views

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

I'm trying to install jdk 14 on my raspbian pi 4b but all tutorials either show how to download open-jdk or how to download an old oracle jdk version. I've already tried to install the .deb file ...
MeineHTMLCodes's user avatar
2 votes
1 answer
3k views

cannot execute binary file: Exec format error while running java 11.0.7-open with sdkman

I installed java 11.0.7-open using sdkman and I get this error: bash: /home/pi/.sdkman/candidates/java/11.0.7-open/bin/java: cannot execute binary file: Exec format error when running java --...
Cimlah's user avatar
  • 55
2 votes
2 answers
694 views

Getting a NRF24L01 module running with Java

I'm currently trying to make a NRF24L01 module work by using Java. I found this library that makes use of the JNI, but I can't get it to work. When I try to run the provided example code the ...
Gereon99's user avatar
  • 141
2 votes
0 answers
216 views

Slow Serialcommunication between Raspberry Pi and Ardunio Mega

I'm in the process of tinkering with something, and for that I need an Arduino to collect measurement data, and a PI to process it all and send it on. My problem is that the connection between my Pi ...
isi_ko's user avatar
  • 121
0 votes
1 answer
527 views

JavaFX application does not accept touch inputs

I am trying to run a javaFX application on a raspberry pi 3b+ with a 7" 1024x600 touchscreen by Lebula. When I plug a mouse in, the application works as normal, but, when I try to use the touchscreen, ...
ssemtner's user avatar
1 vote
1 answer
164 views

Controlling Raspberry PI zero device over the internet

I have five Raspberry Pi zero W devices and each device connected to 4 channel relay module. These five devices are in different locations and connected to the internet. We wrote a python program to ...
Nagaraj's user avatar
  • 119
0 votes
0 answers
410 views

Running a java program on Raspberry Pi

I want to use my pi as a navigation and weather station on my boat. One of the programs I need is JWX.jar. When I try to execute it, I type "java -jar JWX.jar", wich works flawlesly in Linux Mint and ...
Robert's user avatar
  • 1

1
2 3 4 5 6