Modify

Opened 3 months ago

Last modified 3 months ago

#18809 new defect

JOSM.exe uses unexpected java version

Reported by: blackboxlogic@… Owned by: team
Priority: normal Milestone:
Component: Installer Windows Version:
Keywords: Cc:

Description (last modified by skyper)

Originally encountered while debugging #18769

Summary:
With some system configurations, josm.exe (with launch4j) uses java 8, josm-tested.jar uses java 13

My experience:
I updated JOSM to latest, installed OpenJDK 13 and changed the %JAVA_HOME% environment variable to point to it.

When I opened a console and ran

java -version

I get OpenJdk version "13.0.2" 2020-01-14

When I ran

C:\Program Files (x86)\JOSM\**josm-tested.jar**

The program is visually improved in many ways (layout, font etc)
In Help -> About -> Info

Java Version is 13

In Help -> About -> Installation Details

%JAVA_HOME% points to OpenJDK 13
<java.home> points to OpenJDK 13

When I ran

C:\Program Files (x86)\JOSM\**josm.exe**

The program is visually poor in many ways
In Help -> About -> Info

Java Version is 8

In Help -> About -> Installation Details

%JAVA_HOME% points to OpenJDK 13
<java.home> points to java 8

Situation which created the problem:

To work around the problem:

  • Download the OpenJDK 13 JRE (NOT JDK)
  • Select the installer option to write registry keys

I suggest two changes to launch4j.xml to avoid this problem:

  • <jdkPreference>preferJre</jdkPreference>
    • should be: <jdkPreference>preferJdk</jdkPreference>
    • Will take a JDK over a JRE
  • <path></path>
    • should be: <path>%JAVA_HOME%</path>
    • Will negate the need to have registry keys, which are not always there for OpenJDK

I am not well versed in java, launch4j, registry keys, or the JAVA_HOME environment variable. I have not tested my suggested changes and I don't know if it might break it for other people. Also, just waiting for the next release of launch4j might fix this.

Attachments (0)

Change History (3)

comment:1 Changed 3 months ago by GerdP

Summary: JOSM uses unexpected java versionJOSM.exe uses unexpected java version

comment:2 Changed 3 months ago by Don-vip

Component: CoreInstaller Windows

comment:3 Changed 3 months ago by skyper

Description: modified (diff)

layout improvements
{{{#!cmd }}} does not handle white spaces well.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to blackboxlogic@gmail.com
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.