Go to advanced search

by knute
Sat Jan 11, 2020 10:40 pm
Forum: Beginners
Topic: trying to write java code on my rpi 3 b+
Replies: 4
Views: 337

Re: trying to write java code on my rpi 3 b+

Install openjdk-11-jdk and openjdk-11-doc. Test it with: [email protected]:~ $ java -version openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-post-Raspbian-1deb10u1) OpenJDK Server VM (build 11.0.5+10-post-Raspbian-1deb10u1, mixed mode) Then try running a simple Java...
by knute
Thu Jan 02, 2020 4:44 pm
Forum: Networking and servers
Topic: [SOLVED] Apache2 multiple VHosts on LAN not working
Replies: 5
Views: 277

Re: Apache2 multiple VHosts on LAN not working

If you can resolve the host names from your PC it will work fine. And yes adding a name to /etc/hosts works. You are going to have to have different host names for the different VirtualHosts no matter how you do it. One of those can be the IP address.
by knute
Thu Jan 02, 2020 2:54 am
Forum: Networking and servers
Topic: [SOLVED] Apache2 multiple VHosts on LAN not working
Replies: 5
Views: 277

Re: Apache2 multiple VHosts on LAN not working

192.168.3.13/forum is not a fully qualified domain name so that won't work. Say your domain name is www.example.com and the IP is 123.123.123.123. You could have a server name of www.example.com and an alias of 123.123.123.123 and all of the documents served up whether with a http://www.example.com ...
by knute
Thu Jan 02, 2020 2:37 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6647

Re: Desktop indicators bleed through JavaFX

Thanks, I'll check it out.
by knute
Wed Jan 01, 2020 11:32 pm
Forum: Troubleshooting
Topic: ftp help
Replies: 1
Views: 124

Re: ftp help

I'm curious what is it that you want to administer with this GUI?
by knute
Wed Jan 01, 2020 11:14 pm
Forum: Other projects
Topic: Making an avionics package for far 103 aircraft.
Replies: 12
Views: 607

Re: Making an avionics package for far 103 aircraft.

This discussion got me all excited about making airplane instruments. So I made a gyro compass display for fun. It is written in Java. I don't like the airplane but it's OK for this. import java.awt.*; import static java.awt.RenderingHints.*; import java.awt.event.*; import java.awt.geom.*; import j...
by knute
Tue Dec 31, 2019 4:23 pm
Forum: Other projects
Topic: Making an avionics package for far 103 aircraft.
Replies: 12
Views: 607

Re: Making an avionics package for far 103 aircraft.

Disregarding the question of why you would want to do this; there is no airspeed input. I think the other instruments could be created from the data provided. It is not clear to me what a 10dof is however? I don't know enough about how the gyroscopes in this work to know if it is possible to get a g...
by knute
Sun Dec 29, 2019 3:32 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 23
Views: 6647

Re: Desktop indicators bleed through JavaFX

T13 wrote:
Sat Dec 28, 2019 8:56 pm
I´m using the latest Raspbian Buster and Liberica 13.0.1 (https://bell-sw.com/pages/java-13.0.1/) that meanwhile has JavaFX Media included and is based on OpenJDK and OpenJFX.
So does Liberica 13.0.1 have javafx.media? Their website says no for ARMHF.
by knute
Sat Dec 28, 2019 8:43 pm
Forum: Java
Topic: Quit Java to Command Line
Replies: 5
Views: 346

Re: Quit Java to Command Line

If you want to terminate a JavaFX program, you want to use Platform.exit(). That will cause it to stop right now. When I am writing code before it is completely debugged I put code in the catch block to display the error to the command line and and any code I need to see the values of variables that...
by knute
Tue Dec 24, 2019 2:13 am
Forum: Java
Topic: Quit Java to Command Line
Replies: 5
Views: 346

Re: Quit Java to Command Line

(...) public void Stop() { try { mainFormController.Stop(); scheduler.shutdown(); scheduler.awaitTermination(10, SECONDS); gpio.shutdown(); Platform.exit(); Thread.sleep(1000); System.exit(0); } catch (Exception ex) { } } (...)[/code] I tried searching the forum, but my search-fu is weak, so apolog...
by knute
Fri Nov 08, 2019 3:13 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

Yes you need to install Java (openjdk-11-jdk). The program is a command line program. You run it with the java command, the name of the Java file and the arguments. java ScaleImage.java sourceFile destFile WxH WxH is the width and height separated by a lower case 'x'. In your case 1200 by 740 would ...
by knute
Wed Nov 06, 2019 12:28 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

Yes I’d like to keep the hi res for the timelapse so your idea sounds good, what js did you use? Steve import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; public class ScaleImage { public static void main(String... args) throws Exception { System.out.println("Scale...
by knute
Tue Nov 05, 2019 7:44 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

If you don't have need for the hifi image you can have raspistill scale it for you. See the -width and -height command line options. If you want to keep the hifi images on the Pi and serve the lores image you can scale them with another program. I've written simple Java programs to scale images.
by knute
Thu Oct 24, 2019 1:50 am
Forum: Advanced users
Topic: rpi-eeprom beta package - VL805 updates
Replies: 50
Views: 7841

Re: rpi-eeprom beta package - VL805 updates

I really don't understand how all this works so I've got a stupid question. If you run the update next week and it updates the eeprom and then you move the card to another Pi will running update again update that other Pi too?
by knute
Mon Oct 14, 2019 2:24 pm
Forum: Java
Topic: Having trouble with .Jar files
Replies: 2
Views: 1911

Re: Having trouble with .Jar files

Assuming it is a Java program in that .jar file you are trying to run, the easiest thing it to start it from the command line: java -jar nameOfYourJarFile.jar If you want to run it by double clicking on its icon in File Manager: Open the File Manager, right click on the file you want to run, AnalogC...
by knute
Sat Oct 12, 2019 7:22 pm
Forum: General discussion
Topic: "Realtime" audio output using RPi?
Replies: 4
Views: 619

Re: "Realtime" audio output using RPi?

Java has a very simple sound API that works just fine on a Pi. As to the 0-5ms latency I don't know. I think that would be affected by the USB sound card's buffering. In any case that is a really short time, even 1 cycle of 800hz tone takes 1.25ms. What are you using the sound for?
by knute
Wed Oct 09, 2019 2:22 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

I never enable ufw until after I allow ssh.

The ufw default is to drop inbounds that are not specifically allowed and to allow outbounds. I don't think you gain anything by rejecting all the inbound as it is really nice to be able to ping the server.
by knute
Mon Oct 07, 2019 8:13 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3B+ Unable to sync to correct time
Replies: 27
Views: 1430

Re: Raspberry Pi 3B+ Unable to sync to correct time

It looks like a DNS problem. The output from timedatectl shows not synced. No return from the google.com ping. All symptoms of DNS not working correctly. You might post the last 15 or so lines of /etc/dhcpcd.conf if you are using a static IP. If you are using dhcp then: cat /var/run/dnsmasq/resolv.c...
by knute
Sun Oct 06, 2019 9:04 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

I don't know how you are getting to your remote Pi but I would be very careful with using the ufw rules from above. If you are getting to your Pi via remote ssh you will be locked out forever using those commands. If that is not the case then kindly disregard my note.
by knute
Sat Oct 05, 2019 9:59 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2914

Re: Upload a pic every minute

In the <HEAD> part of the HTML put <meta http-equiv="refresh" content="60"> to get a 60 second reload. If you don't like the flash that will occur with an image there is a more sophisticated method that uses some JavaScript. Take a look at my website, http://knutejohnson.com/pi, there are a couple o...
by knute
Fri Oct 04, 2019 9:35 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 812

Re: Need 5V for my fan, pins covered by RTC?

Did you solder that to the board?
by knute
Tue Oct 01, 2019 9:23 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 812

Need 5V for my fan, pins covered by RTC?

I've got a Pi4 in a case with a fan and a RTC that covers pins 1-6. The fan needs 5V. Is there another pin or place to get 5V on the board? What about the POE pins? I thought as a last resort I could use one of the USB ports for power but that uses up a USB that could be used for something more inte...
by knute
Tue Oct 01, 2019 8:34 pm
Forum: Troubleshooting
Topic: Unable to write a .service file to systemd for auto-booting python programs
Replies: 6
Views: 286

Re: Unable to write a .service file to systemd for auto-booting python programs

The .service files need to go into the /etc/systemd/system directory. That directory is owned by root. The .service file needs to be owned by root. So you need to use sudo on all the command to read or write a file to that directory. Also, the systemd services are run as root unless you specifically...
by knute
Sat Sep 28, 2019 11:15 pm
Forum: Java
Topic: Method in ArrayList?
Replies: 4
Views: 1804

Re: Method in ArrayList?

It's a little more complicated in Java. import java.util.*; import java.util.function.*; public class SSCCE { // simple self contained compilable example public static void main(String... args) { // returns the argument unchanged UnaryOperator<String> u1 = UnaryOperator.identity(); // returns the ar...
by knute
Sat Sep 21, 2019 7:34 pm
Forum: Troubleshooting
Topic: [Solved] Stuck in loop asking for password before desktop. Check your .profile
Replies: 16
Views: 39067

Re: [Solved] Stuck in loop asking for password before desktop. Check your .profile

I had the same thing happen just now and it was a bad uSD card. When they die sometimes they go into read only so they'll boot but you can't login. The only solution is a new card.

Go to advanced search