Changes between Initial Version and Version 3 of Ticket #18809


Ignore:
Timestamp:
2020-02-29T13:24:51+01:00 (6 years ago)
Author:
skyper
Comment:

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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18809

    • Property Summary JOSM uses unexpected java versionJOSM.exe uses unexpected java version
    • Property Component CoreInstaller Windows
  • Ticket #18809 – Description

    initial v3  
    1 Originally encountered while debugging https://josm.openstreetmap.de/ticket/18769
     1Originally encountered while debugging #18769
    22
    33Summary:
     
    55
    66My experience:
    7 I updated JOSM to latest, installed OpenJDK 13 and changed the %JAVA_HOME% environment variable to point to it.
     7I updated JOSM to latest, installed OpenJDK 13 and changed the `%JAVA_HOME%` environment variable to point to it.
    88
    99When I opened a console and ran
     10{{{#!cmd
    1011java -version
    11 I get
    12 OpenJdk version "13.0.2" 2020-01-14
     12}}}
     13I get `OpenJdk version "13.0.2" 2020-01-14`
    1314
    1415When I ran
     16{{{
    1517C:\Program Files (x86)\JOSM\**josm-tested.jar**
     18}}}
    1619The program is visually improved in many ways (layout, font etc)
    1720In Help -> About -> Info
    18 **Java Version is 13**
     21 **Java Version is 13**
    1922In Help -> About -> Installation Details
    20 %JAVA_HOME% points to OpenJDK 13
    21 <java.home> points to OpenJDK 13
     23 `%JAVA_HOME%` points to OpenJDK 13
     24 `<java.home>` points to OpenJDK 13
    2225
    2326When I ran
     27{{{
    2428C:\Program Files (x86)\JOSM\**josm.exe**
     29}}}
    2530The program is visually poor in many ways
    2631In Help -> About -> Info
    27 **Java Version is 8**
     32 **Java Version is 8**
    2833In Help -> About -> Installation Details
    29 %JAVA_HOME% points to OpenJDK 13
    30 <java.home> points to **java 8**
     34 `%JAVA_HOME%` points to OpenJDK 13
     35 `<java.home>` points to **java 8**
    3136
    3237Situation which created the problem:
     
    3439* I had downloaded the OpenJDK 13 JDK, but josm.exe is configured to prefer a JRE
    3540  * ​https://github.com/openstreetmap/josm/blob/23f812d89309fe7e1660efa1b2a21433305b5cfb/windows/launch4j.xml#L18
    36 * I had correctly set the JAVA_HOME environment variable, but launch4j ignores JAVA_HOME and only looks at registry keys. This might change with the next release of launch4j.
     41* I had correctly set the `JAVA_HOME` environment variable, but launch4j ignores `JAVA_HOME` and only looks at registry keys. This might change with the next release of launch4j.
    3742  * ​https://sourceforge.net/p/launch4j/feature-requests/127/
    3843* While installing OpenJDK, I did not write java keys to registry
     
    4348
    4449I suggest two changes to launch4j.xml to avoid this problem:
    45 * <jdkPreference>preferJre</jdkPreference>
    46   * should be: <jdkPreference>preferJdk</jdkPreference>
     50* `<jdkPreference>preferJre</jdkPreference>`
     51  * should be: `<jdkPreference>preferJdk</jdkPreference>`
    4752  * Will take a JDK over a JRE
    48 * <path></path>
    49   * should be: <path>%JAVA_HOME%</path>
     53* `<path></path>`
     54  * should be: `<path>%JAVA_HOME%</path>`
    5055  * Will negate the need to have registry keys, which are not always there for OpenJDK
    5156
    52 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.
     57I 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.