Re: Possible to install jEdit on a new Mac?

Gregory Garretson <[email protected]> Fri, 17 Nov 2023 11:07:40 +0000
Newsgroups gmane.editors.jedit.user
Message-ID <[email protected]>
--===============1729298391302505424==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_7AEA07B2-DB7F-4CD1-A34A-CF8A2A73A054"


--Apple-Mail=_7AEA07B2-DB7F-4CD1-A34A-CF8A2A73A054
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Bj=C3=B6rn,

Thanks for this. Unfortunately, the new macOS launcher encounters the =
same problem as the one for 5.6. I get the error message that Java 11 is =
required, and I should update Java. Now, without having dug very deep =
into the C code, I can see two possible reasons for this.

The first is that it stops when it encounters the Java internet plugin, =
which in my case is 1.8:

/usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    21.0.1 (arm64) "Oracle Corporation" - "Java SE 21.0.1" =
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
    21.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 21.0.1" =
/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home
    1.8.391.13 (x86_64) "Oracle Corporation" - "Java" /Library/Internet =
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

There is no update available from Java for this plugin.

(You can also see from the above that usr/libexec/java_home does lead to =
the JDK without problem.)

The other possibility is suggested by this code in =
appbundler/native/main.m:

/**
 *  Searches for a JRE or JDK dylib of the specified version or later.
 *  First checks the "usual" JRE location, and failing that looks for a =
JDK.
 *  The version required should be a string of form "1.X". If no version =
is
 *  specified or the version is pre-1.7, then a Java 1.7 is sought.
 */
NSString * findJavaDylib (
                          NSString *jvmRequired,
                          bool jrePreferred,
                          bool jdkPreferred,
                          bool isDebugging,
                          bool exactMatch)
{...}

Since Java is no longer using the nomenclature 1.7, 1.8, etc., then =
maybe this is parsing the name of the version incorrectly? The version =
here is 21, but this method may not be finding it because it expects a =
string of the form 1.x. Might that be the problem?

I will look at this again in more detail when I have more time. =
Meanwhile, I really appreciate any suggestions anybody can make.

Cheers,
Gregory


> On Nov 17, 2023, at 3:12 AM, Vampire <[email protected]> wrote:
>=20
> Hi Gregory,
>=20
> I was about to release 5.7.0 and there also updated the macOS app =
bundler.
> Maybe you could quickly try =
https://www.swisstransfer.com/d/b8bcf63b-b3d3-403c-a0ea-fd3adb6d83bd ?
> Actually, I don't think it changes much in what Java is discovered, =
from what I have seen in the changes, but who knows.
>=20
> If you are able to read C code, you could maybe see from =
https://github.com/evolvedbinary/appbundler/blob/main/appbundler/native/ma=
in.m where Java runtimes are searched for.
> =46rom a very cursory look, I'd say it first searches for =
`/Library/Internet =
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java`
> and then uses `/usr/libexec/java_home` to find a matching JVM.
>=20
> If neither brings a result, it fails.
>=20
> Besides that Oracle Java is anyway questionable to be used since they =
changed their licensing.
> So maybe you also try with Temurin as Bobb suggested.
>=20
> Cheers
> Bj=C3=B6rn
>=20
> Am 07.11.2023 18:07, schrieb Gregory Garretson:
>> Hi Jack,
>>=20
>> Thanks, but I=E2=80=99m afraid it doesn=E2=80=99t seem to. I=E2=80=99ve=
 installed both the JRE and the JDK, but jEdit still tells me to install =
Java 11 or later, even though I get this:
>>=20
>> java --version
>> java 21.0.1 2023-10-17 LTS
>> Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
>> Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed =
mode, sharing)
>>=20
>> Any more thoughts?
>>=20
>> Thanks,
>> Gregory
>>=20
>>=20
>>> On Nov 7, 2023, at 4:56 PM, Jack W. <[email protected]> =
<mailto:[email protected]> wrote:
>>>=20
>>> Does this help? =
https://docs.oracle.com/en/java/javase/11/install/installation-jdk-macos.h=
tml
>>>=20
>>> On Tue, Nov 7, 2023 at 9:35=E2=80=AFAM Gregory Garretson =
<[email protected] <mailto:[email protected]>> wrote:
>>>> Now I have a MacBook with an M3 Apple Silicon processor.=20
>>>>=20
>>>> My problem is that while jEdit 5.6 successfully installs on the =
machine, it doesn=E2=80=99t detect Java. It looks for Java 11,
>>>=20
>>> --=20
>>> Jack Woehr               # If it doesn't work in Firefox,
>>> Box 82, Beulah CO 81023  # it's broken.
>>> http://www.softwoehr.com <http://www.softwoehr.com/> # Just Say No =
to Chrome.
>>=20
>>=20
>>=20
>>=20
>>=20
>=20


--Apple-Mail=_7AEA07B2-DB7F-4CD1-A34A-CF8A2A73A054
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;">Hi =
Bj=C3=B6rn,<div><br></div><div>Thanks for this. Unfortunately, the new =
macOS launcher encounters the same problem as the one for 5.6. I get the =
error message that Java 11 is required, and I should update Java. Now, =
without having dug very deep into the C code, I can see two possible =
reasons for this.</div><div><br></div><div>The first is that it stops =
when it encounters the Java internet plugin, which in my case is =
1.8:</div><div><br></div><div><div>/usr/libexec/java_home =
-V</div><div>Matching Java Virtual Machines (3):</div><div>&nbsp; &nbsp; =
21.0.1 (arm64) "Oracle Corporation" - "Java SE 21.0.1" =
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home</div><div>&nbsp=
; &nbsp; 21.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 21.0.1" =
/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home</div><div>&=
nbsp; &nbsp; 1.8.391.13 (x86_64) "Oracle Corporation" - "Java" =
/Library/Internet =
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home</div><div><br></div><div>Th=
ere is no update available from Java for this =
plugin.</div><div><br></div><div>(You can also see from the above that =
usr/libexec/java_home does lead to the JDK without =
problem.)</div><div><br></div><div>The other possibility is suggested by =
this code in =
appbundler/native/main.m:</div><div><br></div><div><div>/**</div><div>&nbs=
p;* &nbsp;Searches for a JRE or JDK dylib of the specified version or =
later.</div><div>&nbsp;* &nbsp;First checks the "usual" JRE location, =
and failing that looks for a JDK.</div><div>&nbsp;* &nbsp;The version =
required should be a string of form "1.X". If no version =
is</div><div>&nbsp;* &nbsp;specified or the version is pre-1.7, then a =
Java 1.7 is sought.</div><div>&nbsp;*/</div><div>NSString * =
findJavaDylib (</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NSString =
*jvmRequired,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool =
jrePreferred,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool =
jdkPreferred,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool =
isDebugging,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool =
exactMatch)</div><div>{...}</div></div><div><br></div><div>Since Java is =
no longer using the nomenclature 1.7, 1.8, etc., then maybe this is =
parsing the name of the version incorrectly? The version here is 21, but =
this method may not be finding it because it expects a string of the =
form 1.x. Might that be the problem?</div><div><br></div><div>I will =
look at this again in more detail when I have more time. Meanwhile, I =
really appreciate any suggestions anybody can =
make.</div><div><br></div><div>Cheers,</div><div>Gregory</div><div><br></d=
iv><div><br><blockquote type=3D"cite"><div>On Nov 17, 2023, at 3:12 AM, =
Vampire &lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div>
 =20
    <meta content=3D"text/html; charset=3DISO-8859-1" =
http-equiv=3D"Content-Type">
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Hi Gregory,</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
    </div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">I was about to release =
5.7.0
      and there also updated the macOS app bundler.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Maybe you could quickly =
try&nbsp;<a =
href=3D"https://www.swisstransfer.com/d/b8bcf63b-b3d3-403c-a0ea-fd3adb6d83=
bd">https://www.swisstransfer.com/d/b8bcf63b-b3d3-403c-a0ea-fd3adb6d83bd</=
a>
      ?<br>
      Actually, I don't think&nbsp;it changes much in what Java is
      discovered, from what I have seen in the changes, but who =
knows.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
    </div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">If you are able to read C
      code, you could maybe see from&nbsp;<a =
href=3D"https://github.com/evolvedbinary/appbundler/blob/main/appbundler/n=
ative/main.m">https://github.com/evolvedbinary/appbundler/blob/main/appbun=
dler/native/main.m</a>
      where Java runtimes are searched for.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">=46rom a very cursory =
look, I'd
      say it first searches for `/Library/Internet
      Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java`</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">and then uses
      `/usr/libexec/java_home` to find a matching JVM.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
    </div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">If neither brings a =
result, it
      fails.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
    </div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Besides that Oracle Java =
is
      anyway questionable to be used since they changed their =
licensing.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">So maybe you also try with
      Temurin as Bobb suggested.</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
    </div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Cheers</div>
    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Bj=C3=B6rn</div>
    <br>
    <div class=3D"moz-cite-prefix">Am 07.11.2023 18:07, schrieb Gregory
      Garretson:<br>
    </div>
    <blockquote =
cite=3D"mid:[email protected]" =
type=3D"cite">
      <meta http-equiv=3D"content-type" content=3D"text/html;
        charset=3DISO-8859-1">
      Hi Jack,
      <div><br>
      </div>
      <div>Thanks, but I=E2=80=99m afraid it doesn=E2=80=99t seem to. =
I=E2=80=99ve installed
        both the JRE and the JDK, but jEdit still tells me to install
        Java 11 or later, even though I get this:</div>
      <div><br>
      </div>
      <div><div style=3D"margin: 0px; font-style: normal; =
font-variant-caps: normal; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo; font-size-adjust: none; =
font-kerning: auto; font-variant-alternates: normal; =
font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;"><span style=3D"font-variant-ligatures: =
no-common-ligatures">java
            --version</span></div><div style=3D"margin: 0px; font-style: =
normal; font-variant-caps: normal; font-stretch: normal; font-size: =
11px; line-height: normal; font-family: Menlo; font-size-adjust: none; =
font-kerning: auto; font-variant-alternates: normal; =
font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;"><span style=3D"font-variant-ligatures: =
no-common-ligatures">java
            21.0.1 2023-10-17 LTS</span></div><div style=3D"margin: 0px; =
font-style: normal; font-variant-caps: normal; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo; =
font-size-adjust: none; font-kerning: auto; font-variant-alternates: =
normal; font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;"><span style=3D"font-variant-ligatures: =
no-common-ligatures">Java(TM)
            SE Runtime Environment (build =
21.0.1+12-LTS-29)</span></div><div style=3D"margin: 0px; font-style: =
normal; font-variant-caps: normal; font-stretch: normal; font-size: =
11px; line-height: normal; font-family: Menlo; font-size-adjust: none; =
font-kerning: auto; font-variant-alternates: normal; =
font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;"><span style=3D"font-variant-ligatures: =
no-common-ligatures">Java
            HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed
            mode, sharing)</span></div>
      </div>
      <div><span style=3D"font-variant-ligatures: =
no-common-ligatures"><br>
        </span></div>
      <div><span style=3D"font-variant-ligatures: =
no-common-ligatures">Any
          more thoughts?</span></div>
      <div><span style=3D"font-variant-ligatures: =
no-common-ligatures"><br>
        </span></div>
      <div><span style=3D"font-variant-ligatures: =
no-common-ligatures">Thanks,</span></div>
      <div>Gregory</div>
      <div><span style=3D"font-variant-ligatures: =
no-common-ligatures"><br>
        </span></div>
      <div><br>
        <blockquote type=3D"cite">
          <div>On Nov 7, 2023, at 4:56 PM, Jack W.
            <a class=3D"moz-txt-link-rfc2396E" =
href=3D"mailto:[email protected]">&lt;[email protected]&gt;</a> =
wrote:</div>
          <br class=3D"Apple-interchange-newline">
          <div>
            <div dir=3D"ltr">
              <div dir=3D"ltr">Does this help? <a moz-do-not-send=3D"true"=
 =
href=3D"https://docs.oracle.com/en/java/javase/11/install/installation-jdk=
-macos.html">https://docs.oracle.com/en/java/javase/11/install/installatio=
n-jdk-macos.html</a></div>
              <br>
              <div class=3D"gmail_quote">
                <div dir=3D"ltr" class=3D"gmail_attr">On Tue, Nov 7, =
2023 at
                  9:35=E2=80=AFAM Gregory Garretson &lt;<a =
moz-do-not-send=3D"true" =
href=3D"mailto:[email protected]">[email protected]</a>&gt=
;
                  wrote:<br>
                </div>
                <blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">Now I have a
                  MacBook with an M3 Apple Silicon processor. <br>
                  <br>
                  My problem is that while jEdit 5.6 successfully
                  installs on the machine, it doesn=E2=80=99t detect =
Java. It
                  looks for Java 11,</blockquote>
              </div>
              <br>
              <span class=3D"gmail_signature_prefix">-- </span><br>
              <div dir=3D"ltr" class=3D"gmail_signature">
                <div dir=3D"ltr">
                  <div>
                    <div dir=3D"ltr">
                      <div>
                        <div dir=3D"ltr">
                          <div>
                            <div dir=3D"ltr">
                              <div>
                                <div dir=3D"ltr">
                                  <div>
                                    <div dir=3D"ltr">
                                      <div style=3D"text-align:left">
                                        <div dir=3D"ltr">
                                          <div>
                                            <div dir=3D"ltr">
                                              <div>
                                                <div dir=3D"ltr"><span =
style=3D"font-family:monospace">Jack
                                                    =
Woehr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;
                                                    # If it doesn't work
                                                    in Firefox,<br>
                                                    Box 82, Beulah CO
                                                    81023&nbsp; # it's
                                                    broken.<br>
                                                    <a =
moz-do-not-send=3D"true" href=3D"http://www.softwoehr.com/" =
target=3D"_blank">http://www.softwoehr.com</a>
                                                    # Just Say No to
                                                    Chrome.</span><br>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class=3D"mimeAttachmentHeader"></fieldset>
      <br>
      <br>
      <fieldset class=3D"mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </div>

</div></blockquote></div><br></div></body></html>=

--Apple-Mail=_7AEA07B2-DB7F-4CD1-A34A-CF8A2A73A054--


--===============1729298391302505424==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1729298391302505424==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users

--===============1729298391302505424==--