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.

52 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
345 views

Pi4J kills USB bus?

Hello fellow Pi enthusiasts :) I am currently attempting to control a standard 16x2 character LCD display from the PI's GPIO pins from Java. I downloaded Pi4J and wrote a small program to initialize ...
3
votes
1answer
148 views

A java jar file runs fine if run from console but generates exception if run at startup

I wrote a JavaFX program which also utilizes JSON. When run at startup, the try catch around the JSON parsing piece of the code throws an exception. I can't see the exception printed in the console ...
3
votes
0answers
2k views

Pi4J and Mifare RC-522 via SPI

I am having problems with coding a program that allows me to read RFID Tags with Pi4J on my Raspberry Pi 2 Model B. I am totally new to Python and would prefer a program written in Java to save some ...
3
votes
0answers
525 views

Raspberry Pi 2 and JavaFX8: Can't render small images without more GPU RAM

I'm trying to write a simple FX8 image display program on the Raspberry Pi2 without increasing the GPU memory beyond the default 64MB. I seem to get me a NullPointer Exception at com.sun.prism.impl....
2
votes
0answers
27 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 ...
2
votes
1answer
57 views

Running videos on JavaFX in Raspberry Pi Zero

I am trying to run a program which shows a simple video through mediaView and then shows a QR code that is associated with a string that the program generates on javaFX in a Raspberry Pi Zero. I have ...
2
votes
1answer
273 views

Fast pictures with PiCam and Java

I was already searching through forums and this stack exchange but I couldn't find anything that helps. So here is my problem. I have written a program in Java that analyzes pictures and outputs ...
2
votes
0answers
226 views

PI4J + Adafruit LCD with MCP23017

Got this device. Python example char_lcd_plate.py is working perfect. But I would like to manage it with Pi4J. I copied bits from python example LCD_PLATE_RS = 15 LCD_PLATE_RW ...
2
votes
0answers
923 views

Stream a camera, and get the video feed on Java

For my project, I have two USB cameras. I would like to plug them to the Raspberry Pi to stream over the internet. Also, I am developing a software in Java, and these videos streams (2) have to be ...
2
votes
0answers
184 views

Driving a HC-SR04 requires a 10 microsecond pulse, Java does 14. Any success stories?

I'm working on Android Things on an rpi3 dev kit, with the IMHO excellent Picon Zero hat. I'm trying to trigger and read the reply from a HC-SR04, which requires a ~10 μS trigger pulse, then ...
2
votes
0answers
82 views

Jar file running on one RPI but not another RPI

I have two RPI's, a model B+ and a Pi 3 model B. They are both running Rasbian. I have made sure they have the same Java JDK on both (1.8.0_131) but one will execute a jar file, whereas the other ...
2
votes
0answers
3k views

Simplest way to grab camera images from Java

I want to write a software that runs on the JVM (in Scala but you can think Java). I am looking for the simplest way to capture images from the standard camera module (v2). I find the raspstill quite ...
2
votes
0answers
52 views

How can I derive the Oracle build number from the Raspbian JDK package?

I'm trying to report a JDK bug to Oracle. However, the Raspbian package number doesn't have the Oracle package number, and the java -version output doesn't match any of the expected build numbers. ...
2
votes
0answers
471 views

interrupts gpio debounce java

My current code does not debounce the input signals from a hardware switch and as a result I get multiple input signals from a single push of the switch. Maybe I'm thinking wrong but I thought that ...
2
votes
0answers
616 views

Java app won't start after updating

After updating my raspberry (Raspbian) and everything on it including java my java application won't start anymore, does anyone know what these crashlog mean and how to solve it or create a workaround?...
2
votes
0answers
4k views

HTML Button onclick function()

I would like to seek help on my Web Control Interface - LED On and OFF button REST API. I just started node.js two weeks ago and manage to created a basic REST API. It manage to display mySQL database ...
2
votes
1answer
3k views

RaspberryPi MOSI/MISO on java with PI4J

Sorry for my English, but I will try :) I need help with working with RFID reader RC522 (like this). I connected it to Pi with help of this manual, but I cant write right code on Java and Pi4J, which ...
1
vote
1answer
69 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, ...
1
vote
0answers
22 views

RangeError: index out of range error

I run Noble on the Raspberry Pi 3 (with Bluetooth) and i receive RSSI values from the nearby beacons that i have. However, if noble is ran the whole times i occasionally get the following error. ...
1
vote
0answers
27 views

Most compatible Java on Raspbian

I have run my .jar code on Raspberry Pi 3B - Raspbian Buster with Oracle Java 8 (1.8.0_241). The code will completely run after ~80 seconds. It's read that some java versions/models (like openJdk, ...
1
vote
0answers
26 views

Send data from PC to RPi although theyre not in the same LAN

i'm planning a school project that should represent a two-factor authentication. I already made a user interface to type in information to log in like email address and password. My plan was to ...
1
vote
1answer
64 views

Java IDEs won't open on my pi. How do I get them to open?

Of the preinstalled programming tools on raspbian all of them work except for the java IDEs(bluej and greenfoot). I've scoured the internet but have found nothing. really need to code in java for a ...
1
vote
0answers
118 views

install eclipse luna on raspberry pi 3

I'm new here and I want to ask if there is any way to install eclipse luna or higher on raspberry pi. I'm using Rasbian and the already installed Eclipse (3.8) sudo apt install eclipse doesn't ...
1
vote
0answers
258 views

JSch / Java SDK 1.8 - getting Auth Fail from working key file

I'm having an issue with JSch using the ARM variant of Java 8. Using SSH works fine with the key: pi@raspberrypi:~ $ ssh -i .ssh/Pi2Desktop2 -p 22 astump@192.168.1.2 Welcome to Ubuntu 18.04.2 LTS (...
1
vote
0answers
148 views

JavaFX missing class JFXPanel

So I have an OpenJDK 8 installed on Raspbian Stretch; it crashes all the time. I then manually installed Oracle JDK 8u201 ; my app runs fine now no crashes. It misses JavaFX, though. I installed ...
1
vote
0answers
121 views

How to get stream of data from arduino serial monitor on Apache Edgent application (Java application)?

The sample java application for reading random sensor value is given as: package org.apache.edgent.samples.topology; import java.util.Random; import org.apache.edgent.function.Supplier; /** * ...
1
vote
0answers
188 views

How to generate JRE fontconfig files on Arch ARM?

I'm trying to make a small Java application with UI and run it on Arch Linux ARM, but every time I try rendering a text, it crashes with the following error: Exception in thread "AWT-EventQueue-0" ...
1
vote
1answer
377 views

GPIO (using sysfs problem)

I'm presently trying to use the built-in indicator lights on the Raspberry Pi B+ to provide status: Green = OK; Red = Problem After turning off the triggers (writing none to /sys/class/leds/led[0,1]...
1
vote
1answer
303 views

LineUnavailableException when loading audio clip with Java on RPi

My RPi is Zero W and using Raspbian Jessie 4.9.35 / Oracle JDK8 1.8.0_65. I'm having problem with loading audio clips on Java Program with RPi. I have two audio files named "piano_0.wav" and "piano_1....
1
vote
0answers
586 views

Fullscreen JavaFX application on RPi Cursor Bug

I posted this issue on the Raspberry Pi forums, however I didn't receive any replies and am hoping you guys might be able to help me out. I am having an issue running fullscreen JavaFX applications ...
1
vote
0answers
568 views

GPIO State Listener Example using Pi4J permanently triggers LOW-event

I have a Pi3 and I am trying out the example http://pi4j.com/example/listener.html which is a GPIO state listener. My issue is the following: When I press (close) the contact, I get one HIGH event. ...
1
vote
0answers
708 views

Decoding mp4/h264 video frames on the JVM

I need to process some mp4 videos on the JVM, so I understand I need something that calls into OpenMAX for performance reasons. I read somewhere that the JogAmp or perhaps the JOGL sub-project provide ...
1
vote
0answers
2k views

Removing java 8 from Raspbian Jessie adds packages?

I'm try to remove java 8 and for some reason a whole bunch of new packages are being added. How do I prevent this? # apt-get remove oracle-java8-jdk Reading package lists... Done Building dependency ...
1
vote
1answer
311 views

unable to launch usertest.sh

When I try to execute sudo ./usertest.sh I get the following error: Java is starting. Press Ctrl-C to exit Frame buffer device detected: BCM2708 Frame buffer '/dev/fb0' detected: 656x416, depth=...
1
vote
0answers
568 views

serial device communication problem with high baud rate

I have a serial device connected to pi´s USB slot. The device is detected in ttyUSB0. Aten uc232a usb to serial adapter is used between the serial device and pi. I have to run a read and write ...
1
vote
0answers
126 views

How can I tell if Java is performing properly?

There are many different versions of Java and many instructions on how to install the fastest Java version on a Raspberry Pi. How can I tell if the one I've installed is using hard floats? Are there ...
1
vote
0answers
868 views

raspberry Pi and processing problem with Camera Capture

I installed Processing 2.2.1 (linux) on the RasPi (running Debian Wheezy) to connect a USB-Webcam and capture video stream with the standart processing.video* library. When I try to run the program (...
0
votes
0answers
47 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 ...
0
votes
2answers
857 views

How to install Java 12

I am trying to install java 12 on my pi. I can only use the terminal. Any Ideas what I have to do? it seems that java 12 isnt in the Repositorys. Thank you in advance
0
votes
0answers
45 views

Raspberry Pi Cam Stream to Android (Very Low Latency)

I've been looking for a way to get Pi Cam video streaming into an Android device and all Android Source code I found is very high latency. The only one I found was the ShawnBaker´s RPiCameraViewer ...
0
votes
0answers
379 views

Using Java JNA and native library on Raspberry Pi

I am trying to use JNA on raspbian. I have installed libjna-java sudo apt-get install libjna-java When I run my java application I get an "java.lang.UnsatisfiedLinkError" for libjnidispatch.so. This ...
0
votes
0answers
35 views

BTS7960 pwm values

I have a BTS7960 h-bridge and I am trying to make a motor to move forward and backward using pwm values. I am using the pi4j library to control the pins. The pins L_EN and R_EN are initialized as ...
0
votes
0answers
35 views

Java Audio Clip is not stopping at right time

I wrote a program to start and stop a wav file in Java which will run on pi 3/b. The program works well in windows pc but it doesn't works good in pi (Raspbian Installed). It stops the audio clip ...
0
votes
0answers
78 views

Browser swt on Raspberry Pi can't play audio when click a video on youtube

Firstly, I am sorry about my bad english. I am doing a web browser on Raspberry Pi. I use Java SWT Browser Widget and this browser work fine, but it don't play audio when i click a video on youtube. ...
0
votes
0answers
197 views

cannot play sounds on RPI3-B with java

im creating a java game library with support for raspberry, on that library I have a class that is in charge of sound effects, I created a game to test GPIO pins and sound was not working, I got an ...
0
votes
0answers
139 views

Raspberry Pi Java

If you have a raspberry pi: Okay, so I am trying to run jar files on my raspberry pi. I recently made a twitter bot and want to run it 24/7 on there. However when I run "java -jar MyTwitterBot.jar" ...
0
votes
0answers
291 views

Java Jersey Webservice on a Raspberry Pi

As I read that the JVM for Raspberry Pi performs well enough to use the Pi as an application server. https://blogs.oracle.com/jtc/entry/comparing_jvms_on_arm_linux I would like to know if it is ...
0
votes
0answers
433 views

Raspberry Pi 2 : DHT11 : Oracle Java ME Embedded

Anyone integrated DHT11 temperature sensor on Raspberry Pi2 with Oracle Java ME Embedded system? Any direction will be helpful.
0
votes
0answers
363 views

What's the best way to control a Matrix of 10 x 20 LED with Raspberry Pi?

I developed a Tetris-Clone in Java. I want to run it on the Raspberry Pi and display it on a 10 x 20 Home-made-LED-Matrix. My question is: What is the best way to achieve that. Here are the solutions ...
0
votes
1answer
3k views

Stream an IP camera video using Raspberry Pi as stream server and access it from remote networks

I have been working on a IoT project for some time. I have an IP camera and I want to make a Raspberry Pi work as a stream server to stream the IP camera and access it in a browser. I have found a ...