It does not need to be reverted. JEP 272 [1] removed these classes from JDK
9, so when compiling with JDK 9+ it will compile those stubs.
This allows both NbApplicationAdapterJDK8 and NbApplicationAdapterJDK9 [2]
to be compiled allowing NetBeans applemenu to run on JDK8+.

The problem has to be something quirky on your setup as GitHub Actions are
passing. Maybe you are mixing JDK versions when building?
Something with JAVA_HOME and/or nbjdk.home in
nbbuild/user.build.properties?


[1] https://openjdk.org/jeps/272
[2]
https://github.com/apache/netbeans/tree/master/platform/applemenu/src/org/netbeans/modules/applemenu

--Christian


On Sat, Jun 17, 2023 at 10:24 AM Eric Bresie <[email protected]> wrote:

> The build looks to be pulling external dependencies to get
> "java.awt.desktop" related packages which may be derived from external
> dependencies contained in a zip file.  The build.xml looks like it tries to
> setup some folders, unzips there but it doesn't seem to be working.
>
> The build.xml specifies source 1.8.  I'm still a little confused around
> handling sources/targets/releases, especially from within ant context, but
> given requiring JDK 11 for building stuff could this be causing problems
> around here?
>
> I think the dependencies are older as well.  Do these need to be updated to
> be build with something newer (i.e., build with JDK 11)?
>
> Did some poking on github and did find this comment
>
> https://github.com/apache/netbeans/pull/99/commits/46867147b806544edae8b97036011839ecd92407
> with some changes around here.  Does some portion of this need to be
> reverted?
> Eric Bresie
> [email protected]
>
>
> On Sat, Jun 17, 2023 at 8:08 AM Eric Bresie <[email protected]> wrote:
>
> > Forgot to mention...
> >
> > Built oin Window 11 using cygwin envionment with
> >
> > java -version
> > openjdk version "11.0.12" 2021-07-20
> > OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
> > OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode)
> >
> > ant -version
> > Apache Ant(TM) version 1.10.12 compiled on October 13 2021
> >
> > Eric Bresie
> > [email protected]
> >
> >
> > On Fri, Jun 16, 2023 at 4:47 PM Eric Bresie <[email protected]> wrote:
> >
> >> Cloned from master
> >> ant -q clean
> >> ant -Dcluster.config=full build
> >> During which I get the below error.
> >>
> >> I am not on an Apple device so even if this is some form of "applemenu"
> >> for apple platforms, I'm not sure why when I'm on a Windows platform?
> >>
> >> Is there something necessary to include the "java.awt.desktop" (module)
> >> in the build somewhere (i.e., enable a module of some type)?  Where
> might
> >> that get set?
> >>
> >> -do-compile:
> >>  [nb-javac] Compiling 7 source files to
> >> C:\git\netbeans\platform\applemenu\build\classes
> >>    [repeat] warning: [path] bad path element
> >> "C:\git\netbeans\platform\applemenu\build\desktop-classes-classes": no
> such
> >> file or directory
> >>    [repeat] warning: A file for type
> >> 'org.netbeans.modules.applemenu.Bundle' already exists on the
> sourcepath or
> >> classpath
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:22:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.AboutEvent;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:23:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.AboutHandler;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:24:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.OpenFilesEvent;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:25:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.OpenFilesHandler;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:26:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.PreferencesEvent;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:27:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.PreferencesHandler;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:28:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.QuitEvent;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:29:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.QuitHandler;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:30:
> >> error: package java.awt.desktop does not exist
> >>    [repeat] import java.awt.desktop.QuitResponse;
> >>    [repeat]                        ^
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:40:
> >> error: cannot find symbol
> >>    [repeat] public class NbApplicationAdapterJDK9 extends
> >> NbApplicationAdapter implements AboutHandler, OpenFilesHandler,
> >> PreferencesHandler, QuitHandler {
> >>    [repeat]
> >>                 ^
> >>    [repeat]   symbol: class AboutHandler
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:40:
> >> error: cannot find symbol
> >>    [repeat] public class NbApplicationAdapterJDK9 extends
> >> NbApplicationAdapter implements AboutHandler, OpenFilesHandler,
> >> PreferencesHandler, QuitHandler {
> >>    [repeat]
> >>                               ^
> >>    [repeat]   symbol: class OpenFilesHandler
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:40:
> >> error: cannot find symbol
> >>    [repeat] public class NbApplicationAdapterJDK9 extends
> >> NbApplicationAdapter implements AboutHandler, OpenFilesHandler,
> >> PreferencesHandler, QuitHandler {
> >>    [repeat]
> >>   ^
> >>    [repeat]   symbol: class PreferencesHandler
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:40:
> >> error: cannot find symbol
> >>    [repeat] public class NbApplicationAdapterJDK9 extends
> >> NbApplicationAdapter implements AboutHandler, OpenFilesHandler,
> >> PreferencesHandler, QuitHandler {
> >>    [repeat]
> >>                       ^
> >>    [repeat]   symbol: class QuitHandler
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:68:
> >> error: cannot find symbol
> >>    [repeat]     public void handleAbout(AboutEvent e) {
> >>    [repeat]                             ^
> >>    [repeat]   symbol:   class AboutEvent
> >>    [repeat]   location: class NbApplicationAdapterJDK9
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:73:
> >> error: cannot find symbol
> >>    [repeat]     public void openFiles(OpenFilesEvent e) {
> >>    [repeat]                           ^
> >>    [repeat]   symbol:   class OpenFilesEvent
> >>    [repeat]   location: class NbApplicationAdapterJDK9
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:78:
> >> error: cannot find symbol
> >>    [repeat]     public void handlePreferences(PreferencesEvent e) {
> >>    [repeat]                                   ^
> >>    [repeat]   symbol:   class PreferencesEvent
> >>    [repeat]   location: class NbApplicationAdapterJDK9
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:83:
> >> error: cannot find symbol
> >>    [repeat]     public void handleQuitRequestWith(QuitEvent e,
> >> QuitResponse response) {
> >>    [repeat]                                       ^
> >>    [repeat]   symbol:   class QuitEvent
> >>    [repeat]   location: class NbApplicationAdapterJDK9
> >>    [repeat]
> >>
> C:\git\netbeans\platform\applemenu\src\org\netbeans\modules\applemenu\NbApplicationAdapterJDK9.java:83:
> >> error: cannot find symbol
> >>    [repeat]     public void handleQuitRequestWith(QuitEvent e,
> >> QuitResponse response) {
> >>    [repeat]                                                    ^
> >>    [repeat]   symbol:   class QuitResponse
> >>    [repeat]   location: class NbApplicationAdapterJDK9
> >>    [repeat] 18 errors
> >>    [repeat] 2 warnings
> >>   [nbmerge] Failed to build target: all-applemenu
> >>
> >> BUILD FAILED
> >> C:\git\netbeans\nbbuild\build.xml:635: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:630: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:665: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:648: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:630: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:665: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:648: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:630: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\build.xml:677: The following error occurred
> while
> >> executing this line:
> >> C:\git\netbeans\nbbuild\templates\common.xml:207: Compile failed; see
> the
> >> compiler error output for details.
> >>
> >> Total time: 15 seconds
> >>
> >>
> >> Eric Bresie
> >> [email protected]
> >>
> >
>

Reply via email to