Java program to fix the routing behaviour of the XT(2).

Having Garmin zumo XT problems? there is loads of help and advice in this forum
FrankB
Posts: 450
Joined: Mon Aug 10, 2020 7:22 am
Has liked: 103 times
Been liked: 133 times
Netherlands

Re: Java program to fix the routing behaviour of the XT.

Post by FrankB »

Grabcon wrote: Tue May 23, 2023 12:56 pm I would like to suggest that you contact Garmin support and see if they can review, revise, etc, and issue a patch or update so all can take advantage of your efforts.
My reply is a little late.
This is my view. @jfheath has been/is working with Garmin support for quite some time now. I do hope that a Firmware update emerges from that.
The fix that I found, including the small Java program, can certainly help Garmin pinpoint the problem. But they should fix another part of the process. Simply put: My program works on the imported result (=the trip files). They can theoretically:
1) Fix the importing, by setting the flag 'imported' to False.
2) Fix the routing. It should ignore the 'Imported' flag.
3) Fix the Trip screen. Add a checkbox that modifies the 'imported' flag, so it's possible for the user to change the behaviour.
4) Something else?
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Re: Java program to fix the routing behaviour of the XT.

Post by Peobody »

I have downloaded JRE but installing it feels like jumping off the high diving board. I've made it to the end of the board but haven't built up the nerve to jump. If/when I do, do I understand correctly that java.exe should be used to run this program and not javaw.exe?
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
Oop North John
Subscriber
Posts: 377
Joined: Fri Jul 27, 2018 10:27 am
Location: UK
Has liked: 106 times
Been liked: 63 times
Great Britain

Re: Java program to fix the routing behaviour of the XT.

Post by Oop North John »

Peobody wrote: Thu May 25, 2023 7:46 pm I have downloaded JRE but installing it feels like jumping off the high diving board. I've made it to the end of the board but haven't built up the nerve to jump. If/when I do, do I understand correctly that java.exe should be used to run this program and not javaw.exe?
I'm like you, so trued just opening up the route on the XT, and then saving the active route. And the repeated u-turns seem to go away. Downside is you lose the name the route was imported into the XT, but that's ok for me as I save the routes to the SD card.

HTH.
jfheath
Posts: 2807
Joined: Sat Oct 19, 2019 4:17 pm
Location: West Yorkshire, Uk
Has liked: 369 times
Been liked: 780 times
Great Britain

Re: Java program to fix the routing behaviour of the XT.

Post by jfheath »

Certainly does help !

I was looking to see if there was a way of saving the route - I thought I had seen the option, but couldn't find it. I didn't have a route active at the time. Thank you - I will see how that behaves too.
Have owned Zumo 550, 660 == Now have Zumo XT2, XT, 595, 590, Headache
Use Basecamp (mainly), MyRouteApp (sometimes), Competent with Tread for XT2, Can use Explore for XT - but it offers nothing that I want !

Links: Zumo 590/5 & BC . . . Zumo XT & BC
FrankB
Posts: 450
Joined: Mon Aug 10, 2020 7:22 am
Has liked: 103 times
Been liked: 133 times
Netherlands

Re: Java program to fix the routing behaviour of the XT.

Post by FrankB »

Peobody wrote: Thu May 25, 2023 7:46 pm I have downloaded JRE but installing it feels like jumping off the high diving board. I've made it to the end of the board but haven't built up the nerve to jump. If/when I do, do I understand correctly that java.exe should be used to run this program and not javaw.exe?
As you will have noticed, I have very little experience with a Mac, so if you're on Mac I can only point you to the screenshots I made and added today.
On Windows 10 (probably also 7, 8 and 11, but didn't try) it's definitely Java.exe. Java.exe allocates a console window where the program messages go. Javaw.exe doesn't have that.

I have included a cmd file that contains this:

java -jar SetTripsToSaved.jar
pause

Just out of curiosity: What are your concerns when it comes to Java? Security reasons I guess? Have you had bad experiences?
And I'm not trying to push anyone into a direction they don't want.
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Re: Java program to fix the routing behaviour of the XT.

Post by Peobody »

FrankB wrote: Thu May 25, 2023 8:41 pm Just out of curiosity: What are your concerns when it comes to Java? Security reasons I guess? Have you had bad experiences?
And I'm not trying to push anyone into a direction they don't want.
Definitely security concerns. I don't remember the specifics other than uninstalling it from all corporate PC's a couple of years before retiring. I actually tracked down phone system management software that was not dependent on Java.

During research this afternoon I learned that JRE 8 has an option that allows for disabling Java content in browsers. That is reassuring.
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
FrankB
Posts: 450
Joined: Mon Aug 10, 2020 7:22 am
Has liked: 103 times
Been liked: 133 times
Netherlands

Re: Java program to fix the routing behaviour of the XT.

Post by FrankB »

Peobody wrote: Thu May 25, 2023 9:19 pm Definitely security concerns.
Well. I respect that. As said before: Dont want to force anyone into anything.

Just to explain my motives.
- I wanted my finding about the imported flag, confirmed by as much persons as possible.
- Because I felt a Hex-Editor was only usable for a few people, I wanted a program.
- Java is 'multi-platform' so that's why I chose that programming language, if it were only required on Windows I would have chosen Delphi and created a Windows executable.
- The .jar filetype is easier to distribute compared to .exe. Smaller and usually not banned by downloads.
- And after all I thought, 'its just a temporary thing, we need a Garmin solution'.

What I do with software that I'm 'forced' to use, but dont want on my System? I run them virtual. In a sandbox if you like. (VmWare, or Virtualbox)
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Re: Java program to fix the routing behaviour of the XT.

Post by Peobody »

To anyone who is as concerned as I am about installing Java...

Java JDK 17 & 20 are available for download as compressed archives (Linux, macOS, & Windows). I have just tested the program by @FrankB with an extracted Windows JDK 20 .zip. I then did a registry search for the path to the extracted java.exe and only found it in MUICache keys. This is not surprising and reassured me that Java had not 'installed' itself. I have executed java.exe. I used the .cmd file provided by Frank in his SetTripsToSaved.zip file, modified to point to the java.exe file where JDK 20 extract was located.

The only disturbing thing about this process is that the extracted JDK is a whopping 306 MB.

The JDK compressed archive files are available on the Java download site: https://www.oracle.com/java/technologies/downloads/

Edit: I failed to mention the most important thing... Frank's program worked great. Thanks Frank!
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
FrankB
Posts: 450
Joined: Mon Aug 10, 2020 7:22 am
Has liked: 103 times
Been liked: 133 times
Netherlands

Re: Java program to fix the routing behaviour of the XT.

Post by FrankB »

@Peobody
Thanks a million for testing this.

The JDK (Java Development Kit) is indeed quit large. To run the program you only need the JRE (Java Runtime Environment) which is smaller.
https://www.java.com/en/download/manual.jsp
Haven't checked it, but dont believe the JRE installs itself in an unwanted manner. From what I've read was the biggest concern running Java from a Webbrowser. Nowadays most browsers don't allow Java anymore. Not to be confused with Javascript which is a totally different beast.

But... Help may be on it's way. I've posted this link on a Dutch board https://forum.gps.nl/viewtopic.php?t=54124 and one person was willing to look into the possibility of creating a Web Application. If he succeeds it would be available to anyone on any platform without having to install anything.

And of course, we're still hoping for a Garmin solution.
Last edited by FrankB on Sat May 27, 2023 3:56 pm, edited 1 time in total.
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Re: Java program to fix the routing behaviour of the XT.

Post by Peobody »

Based on everything I read, JRE installs with Java content enabled in web browsers by default unless it is disabled in the browser itself. There is a JRE control panel to disable Java content in browsers but it is disturbing that it appears to be enabled by default. Now, if JRE was available as a compressed archive that could be extracted and run, well, that could be a winner.

I have found jPortable (portable Java® runtime environment) on portableapps.com. I am going to check it out next.
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
Post Reply