Go to advanced search

by knute
Sat Mar 02, 2019 11:59 pm
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 6349

Re: OpenGL and Java?

So I got it sort of working by using Alexi Shipilev's openjdk11, https://builds.shipilev.net/openjdk-jdk11/, for arm build and adding a command line switch from a Oracle document, https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/java2dpipeline004.html, and disabling the use of the...
by knute
Wed Feb 27, 2019 9:41 pm
Forum: Java
Topic: I want to initialize two dimensional array in constructor
Replies: 1
Views: 5138

Re: I want to initialize two dimensional array in constructor

public class test { private String[][] table; public test() { table = new String[][] {{"ID","NAME"}, {"101","Max"}, {"102","Mark"}}; } public static void main(String... args) { test test = new test(); for (int i=0; i<test.table.length; i++) { for (int j=0; j<test.table[0].length; j++) { System.out....
by knute
Sat Feb 23, 2019 1:41 am
Forum: Troubleshooting
Topic: Autostart a .jar file as root at boot
Replies: 2
Views: 305

Re: Autostart a .jar file as root at boot

I think you are going to have all sorts of issues if you attempt to run the desktop as root. I would start the Java program with sudo in a desktop file.
by knute
Mon Feb 11, 2019 12:04 am
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 6349

Re: OpenGL and Java?

Might be helpful to include your java code. Code shouldn't make any difference but here is what I usually use to test whether the OpenGL pipeline is actually working. import java.awt.*; import java.awt.event.*; import java.lang.reflect.*; import javax.swing.*; /** * Demonstrates a method to do fast...
by knute
Sat Feb 09, 2019 6:31 pm
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 6349

OpenGL and Java?

Anybody know how or if it is even possible to get Java to use the OpenGL pipeline? I'm running current up to date raspbian with the OpenGL desktop driver enabled. Java is latest openjdk version 8. pi@raspberrypi3B-1:~ $ java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8...
by knute
Fri Feb 08, 2019 10:53 pm
Forum: Beginners
Topic: Writing to systemd journal from C code
Replies: 2
Views: 196

Re: Writing to systemd journal from C code

Code: Select all

$ gcc -lm -lrt -lwiringPi -lwiringPiDev -l libsystemd-dev -pthread -o prog prog.c
/usr/bin/ld: cannot find -llibsystemd-dev
I think you have too many 'l's here.
by knute
Mon Feb 04, 2019 12:09 am
Forum: Troubleshooting
Topic: Cable and power supply tests
Replies: 1
Views: 367

Cable and power supply tests

I had gotten a low voltage warning a while back and it got me to thinking about power supplies and cables. So I bought some cables that were advertised as lower resistance and I had a few already that I could try out. I tested six cables all with the same power supply and five power supplies without...
by knute
Sat Jan 26, 2019 10:47 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

I just solved my problem playing sound by editing the /etc/java-8-openjdk/sound.properties file according to this post: https://nealvs.wordpress.com/2017/08/11/java-sound-on-a-raspberry-pi-with-openjdk/ It says to comment out the icedtea pulseaudio properties and go back to the com.sun.media.sound p...
by knute
Sat Jan 26, 2019 10:30 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

I don't know what's going on with FX. I just tried to run a JavaSound program and it doesn't work either. I get LineUnavailableExceptions. Not sure what is going on, I thought this worked just fine before. Try the short program below on a wave file and see if that plays. I tried putting Oracle's Jav...
by knute
Fri Jan 25, 2019 11:28 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

I haven't done much with FX on the Pi because it didn't work very well for quite a while. I know you can use Aleksy Shipilev's (https://builds.shipilev.net/openjdk-jdk11/) arm build of openJDK11 and gluon's JavaFX 11 early access for the arm. I don't know what repo has 11, when I look I just see ope...
by knute
Fri Jan 25, 2019 2:02 am
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 2381

Re: Virtual com port drivers?

Thanks for all the information. I got the sensor and plugged it in and it creates the /dev/ttyUSB0 device. I even got their SDK to compile and run some test programs on the Pi.

Thanks again for all the help.
by knute
Fri Jan 25, 2019 1:59 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

An update on my previous post. This worked great for graphics, but was crashing with a SEGFAULT when trying to play a media clip. Based on another post, I forced a reinstall and that seems to have fixed it. sudo apt-get install --reinstall -y openjdk-8-jre-headless openjdk-8-jre openjfx It does see...
by knute
Sun Jan 20, 2019 12:30 am
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 2381

Re: Virtual com port drivers?

Thanks everybody for all the information. I'm supposed to have the sensor next week to play with. I'm sure I will have more question later.

Thanks!
by knute
Sun Jan 20, 2019 12:27 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

casete wrote:
Sat Jan 19, 2019 4:04 pm
I'd be really interested to know what I would need to do to get my Pi set up properly with OpenJFX. Looking forward to hearing more!
If you are using openjdk8 then just: sudo apt install openjfx

that's it.
by knute
Sat Jan 19, 2019 3:10 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

You might give OpenJFX a try, it's in the repository. Tomorrow when I'm back in front of my Pi I'll post the code for a simple app and a screen shot. That may explain what's up.
by knute
Sat Jan 19, 2019 3:05 am
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 2381

Re: Virtual com port drivers?

So the /dev entries are created when the device is plugged in? That assumes a smart device yes, that tells the Pi what it is? Sorry to be so dense but this isn't something I have any familiarity with.
by knute
Fri Jan 18, 2019 8:55 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

Maybe I should ask what Java and JavaFX you are using? And what version of Raspbian? I know that some early versions would only run through the framebuffer. I've run a few JavaFX programs under OpenJDK and OpenJFX and they window just like a Swing app does. Can you post your code or is it super secr...
by knute
Fri Jan 18, 2019 8:50 pm
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 2381

Re: Virtual com port drivers?

COM ports are a windows construct. USB-serial devices appear as tty's (terminal devices) as /dev/ttyUSB0 - /dev/ttyUSBx. You can access them through various file stream utilities (i.e. echo "blah" > /dev/ttyUSB0 results in blah being transmitted on the wire) or via system calls in your own programs...
by knute
Thu Jan 17, 2019 9:50 pm
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 2381

Virtual com port drivers?

Are there virtual com port drivers for serial to USB devices?

Thanks!
by knute
Thu Jan 17, 2019 9:47 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6642

Re: Desktop indicators bleed through JavaFX

Can you make the background opaque on your app?
by knute
Thu Jan 17, 2019 4:04 am
Forum: Beginners
Topic: UART on Pi3B & 3B+ ?
Replies: 5
Views: 933

Re: UART on Pi3B & 3B+ ?

klricks wrote:
Wed Jan 16, 2019 4:24 am
knute wrote:
Wed Jan 16, 2019 3:53 am
.....The second is, is there any hardware flow control available (RTS,CTS)?
If UART 1 is used then RTS and CTS is available.

(UART 0 has no flow control)
Is there documentation somewhere on which pins for RTS/CTS and on the port in general?

Thanks.
by knute
Thu Jan 17, 2019 4:02 am
Forum: Beginners
Topic: UART on Pi3B & 3B+ ?
Replies: 5
Views: 933

Re: UART on Pi3B & 3B+ ?

I ran a RPi to Arduino Due serial communication at 230400 without issues. I did not use any hardware flow control. I used software flow control. I used "<" to start a message and ">" to end a message sentence for each direction. I'd ignore bytes till the data stream hit a ">" and keep collecting da...
by knute
Wed Jan 16, 2019 3:53 am
Forum: Beginners
Topic: UART on Pi3B & 3B+ ?
Replies: 5
Views: 933

UART on Pi3B & 3B+ ?

I've got a project coming that needs to communicate via serial and I have no experience with Pis and the serial port. Fortunately it is 3.3v and won't require any level conversion. My first question is about baud rates and buffers. Can the Pi receive data at 115200 baud and clear the buffer fast eno...
by knute
Wed Jan 09, 2019 3:59 pm
Forum: Networking and servers
Topic: Setting up "basic" mail
Replies: 5
Views: 2173

Re: Setting up "basic" mail

mail is part of the mailutils package (and I think some other). It delivers mail to a user or to a mail transfer agent. You need to install the rest of the mail system however, something to collect and deliver the mail. I really like sendmail for that but you will get plenty of other suggestions. I'...
by knute
Tue Jan 08, 2019 2:25 am
Forum: Graphics, sound and multimedia
Topic: Raspberry Pi two way communication
Replies: 2
Views: 2246

Re: Raspberry Pi two way communication

And this simple intercom program written in Java for the Pi at http://pi.knutejohnson.com.

Go to advanced search