You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Steven Ingram <st...@gmail.com> on 2019/12/01 22:15:20 UTC
Build failing locally
I tried to build the project today, but I kept hitting errors which led me
to make a new clone of an up-to-date master branch of my fork. I keep
running into compilation errors. See attached truncated output. If i need
to attach the rest I can at request.
Thanks!
Steven
Re: Build failing locally
Posted by Steven Ingram <st...@gmail.com>.
Thx Tim. I’ll take a look at it. I love a tool that makes things easier.
I’m pretty sure that’s why I’m a software dev. :)
On Tue, Dec 3, 2019 at 14:42 Tim Boudreau <ni...@gmail.com> wrote:
> FYI, I find myself needing to switch between JDKs enough that I set up some
> tooling to make that a single shell alias to do that cleanly (actually
> removing and replacing things from $PATH, rather then endlessly prepending
> more JAVA_HOME/bin dirs to it). That might make things simpler for anyone
> who wants to build NetBeans with JDK 8 but do other things with something
> else.
>
> Here's the script (requires nodejs - my preferred command-line scripting
> tool these days):
> https://timboudreau.com/files/fixpath.txt
>
> You'll want to rename it without the '.txt' extension, put it in ~/bin or
> someplace like that, and follow the instructions in the comment at the top
> to set up
> shell variables and aliases for the various JDKs you use. It's pretty
> straightforward.
>
> -Tim
>
> On Tue, Dec 3, 2019 at 7:44 AM Steven Ingram <st...@gmail.com>
> wrote:
>
> > I made my local repo pristine, set my system JDK to 11, and built the
> > project with no issues. My original issue with “applemenu” has also
> > vanished. I’ve made no other concessions for the project with local
> > configuration, it just works out of the box now, which is fantastic.
> >
> > I did have to set my build command to allow jdk 9, but I’m taking the
> > README as the truth.
> >
> > "Requirements
> > Git
> > Ant 1.9.9 or above
> > JDK 8 or 11 (to build NetBeans)
> > JDK 9 or above (to run NetBeans)"
> >
> > My problems started when I used a system set JDK 8 to build and run NB.
> >
> > Thanks everyone!
> >
> > Steven
> >
> > On Tue, Dec 3, 2019 at 05:21 Neil C Smith <ne...@apache.org> wrote:
> >
> > > On Tue, 3 Dec 2019 at 09:56, Peter Hull <pe...@gmail.com> wrote:
> > > > This means checking the PATH and JAVA_HOME and JDK_HOME and
> > > > .nbbuild.properties and nbbuild\user.build.properties for
> consistency.
> > >
> > > Possibly ANT_HOME missing there? I know there was a line about
> > > setting JAVA_HOME and ANT_HOME integrated into the readme during the
> > > 11.2 release window. Is this by itself still not enough?
> > >
> > > See https://github.com/apache/netbeans/pull/1554 and
> > >
> > >
> >
> https://mail-archives.apache.org/mod_mbox/netbeans-dev/201910.mbox/%3C26c1f141-b021-4473-059f-41ec0b5e3613%40status6.com%3E
> > >
> > > Best wishes,
> > >
> > > Neil
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > > For additional commands, e-mail: dev-help@netbeans.apache.org
> > >
> > > For further information about the NetBeans mailing lists, visit:
> > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > >
> > >
> > >
> > >
> >
>
>
> --
> http://timboudreau.com
>
Re: Build failing locally
Posted by Tim Boudreau <ni...@gmail.com>.
FYI, I find myself needing to switch between JDKs enough that I set up some
tooling to make that a single shell alias to do that cleanly (actually
removing and replacing things from $PATH, rather then endlessly prepending
more JAVA_HOME/bin dirs to it). That might make things simpler for anyone
who wants to build NetBeans with JDK 8 but do other things with something
else.
Here's the script (requires nodejs - my preferred command-line scripting
tool these days):
https://timboudreau.com/files/fixpath.txt
You'll want to rename it without the '.txt' extension, put it in ~/bin or
someplace like that, and follow the instructions in the comment at the top
to set up
shell variables and aliases for the various JDKs you use. It's pretty
straightforward.
-Tim
On Tue, Dec 3, 2019 at 7:44 AM Steven Ingram <st...@gmail.com>
wrote:
> I made my local repo pristine, set my system JDK to 11, and built the
> project with no issues. My original issue with “applemenu” has also
> vanished. I’ve made no other concessions for the project with local
> configuration, it just works out of the box now, which is fantastic.
>
> I did have to set my build command to allow jdk 9, but I’m taking the
> README as the truth.
>
> "Requirements
> Git
> Ant 1.9.9 or above
> JDK 8 or 11 (to build NetBeans)
> JDK 9 or above (to run NetBeans)"
>
> My problems started when I used a system set JDK 8 to build and run NB.
>
> Thanks everyone!
>
> Steven
>
> On Tue, Dec 3, 2019 at 05:21 Neil C Smith <ne...@apache.org> wrote:
>
> > On Tue, 3 Dec 2019 at 09:56, Peter Hull <pe...@gmail.com> wrote:
> > > This means checking the PATH and JAVA_HOME and JDK_HOME and
> > > .nbbuild.properties and nbbuild\user.build.properties for consistency.
> >
> > Possibly ANT_HOME missing there? I know there was a line about
> > setting JAVA_HOME and ANT_HOME integrated into the readme during the
> > 11.2 release window. Is this by itself still not enough?
> >
> > See https://github.com/apache/netbeans/pull/1554 and
> >
> >
> https://mail-archives.apache.org/mod_mbox/netbeans-dev/201910.mbox/%3C26c1f141-b021-4473-059f-41ec0b5e3613%40status6.com%3E
> >
> > Best wishes,
> >
> > Neil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
>
--
http://timboudreau.com
Re: Build failing locally
Posted by Steven Ingram <st...@gmail.com>.
I made my local repo pristine, set my system JDK to 11, and built the
project with no issues. My original issue with “applemenu” has also
vanished. I’ve made no other concessions for the project with local
configuration, it just works out of the box now, which is fantastic.
I did have to set my build command to allow jdk 9, but I’m taking the
README as the truth.
"Requirements
Git
Ant 1.9.9 or above
JDK 8 or 11 (to build NetBeans)
JDK 9 or above (to run NetBeans)"
My problems started when I used a system set JDK 8 to build and run NB.
Thanks everyone!
Steven
On Tue, Dec 3, 2019 at 05:21 Neil C Smith <ne...@apache.org> wrote:
> On Tue, 3 Dec 2019 at 09:56, Peter Hull <pe...@gmail.com> wrote:
> > This means checking the PATH and JAVA_HOME and JDK_HOME and
> > .nbbuild.properties and nbbuild\user.build.properties for consistency.
>
> Possibly ANT_HOME missing there? I know there was a line about
> setting JAVA_HOME and ANT_HOME integrated into the readme during the
> 11.2 release window. Is this by itself still not enough?
>
> See https://github.com/apache/netbeans/pull/1554 and
>
> https://mail-archives.apache.org/mod_mbox/netbeans-dev/201910.mbox/%3C26c1f141-b021-4473-059f-41ec0b5e3613%40status6.com%3E
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>
Re: Build failing locally
Posted by Neil C Smith <ne...@apache.org>.
On Tue, 3 Dec 2019 at 09:56, Peter Hull <pe...@gmail.com> wrote:
> This means checking the PATH and JAVA_HOME and JDK_HOME and
> .nbbuild.properties and nbbuild\user.build.properties for consistency.
Possibly ANT_HOME missing there? I know there was a line about
setting JAVA_HOME and ANT_HOME integrated into the readme during the
11.2 release window. Is this by itself still not enough?
See https://github.com/apache/netbeans/pull/1554 and
https://mail-archives.apache.org/mod_mbox/netbeans-dev/201910.mbox/%3C26c1f141-b021-4473-059f-41ec0b5e3613%40status6.com%3E
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Build failing locally
Posted by Peter Hull <pe...@gmail.com>.
On Tue, 3 Dec 2019 at 01:19, Steven Ingram <st...@gmail.com>
wrote:
> Also I just noticed that the README has changed to say that you can now
> build the project with 8 or 11? How'd I miss that?
>
> Just to check I did a clean checkout and built with JDK11. I needed to add
option "-Dpermit.jdk9.builds=true" to the ant command line (it tells you to
do this) but it was fine. However, some targets (build-basic and
build-platform) already have this set.
So I think the message is - make sure not to mix two JDKs otherwise strange
things will happen.
This means checking the PATH and JAVA_HOME and JDK_HOME and
.nbbuild.properties and nbbuild\user.build.properties for consistency.
Having said which, I *think* building with JDK 1.8 is still the recommended
option (at least that's what the Travis does).
Anyway they're all the things I've done wrong so hopefully will be helpful
to someone else.
Pete
Re: Build failing locally
Posted by Steven Ingram <st...@gmail.com>.
Thanks Mathias,
I think I'm starting to put it together in my head. In the README for the
project there's this gem.
"NetBeans also runs with JDK 8, although then it will not include tools for
the JDK 9 Shell."
I know I was building and running NB on JDK8. Can anyone confirm that my
'applemenu' error was in support of the above mentioned JDK 9 shell tools?
Also I just noticed that the README has changed to say that you can now
build the project with 8 or 11? How'd I miss that?
Thanks again for your help.
On Mon, Dec 2, 2019 at 2:45 PM Matthias Bläsing <mb...@doppel-helix.eu>
wrote:
> Am Sonntag, den 01.12.2019, 17:15 -0500 schrieb Steven Ingram:
> > I tried to build the project today, but I kept hitting errors which
> > led me to make a new clone of an up-to-date master branch of my
> > fork. I keep running into compilation errors. See attached
> > truncated output. If i need to attach the rest I can at request.
> >
>
> I see this regularly. This is the scenario:
>
> - I have OpenJDK 11 (default JDK)
> - my .nbbuild.properties contains
> (nbjdk.home=/home/matthias/bin/jdk1.8.0_201/)
>
> I get the same error. The problem is, that the build script scans the
> target JDK for the required classes, but does not use the nbjdk.home to
> build.
>
> I don't see much value in fixing this, just build with JDK. I have
> this:
>
> export JDK_HOME=/home/matthias/bin/jdk1.8.0_201/
> export PATH=$JDK_HOME/bin;$PATH
>
> After that, build runs clean.
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>
Re: Build failing locally
Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Am Sonntag, den 01.12.2019, 17:15 -0500 schrieb Steven Ingram:
> I tried to build the project today, but I kept hitting errors which
> led me to make a new clone of an up-to-date master branch of my
> fork. I keep running into compilation errors. See attached
> truncated output. If i need to attach the rest I can at request.
>
I see this regularly. This is the scenario:
- I have OpenJDK 11 (default JDK)
- my .nbbuild.properties contains (nbjdk.home=/home/matthias/bin/jdk1.8.0_201/)
I get the same error. The problem is, that the build script scans the
target JDK for the required classes, but does not use the nbjdk.home to
build.
I don't see much value in fixing this, just build with JDK. I have
this:
export JDK_HOME=/home/matthias/bin/jdk1.8.0_201/
export PATH=$JDK_HOME/bin;$PATH
After that, build runs clean.
Greetings
Matthias
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Re: Build failing locally
Posted by Steven Ingram <st...@gmail.com>.
Eric,
That is what I had originally thought, but it came down to me running
netbeans with JDK 8 and not 9+
Regards,
Steven
On Tue, Dec 3, 2019 at 5:55 PM Eric Bresie <eb...@gmail.com> wrote:
> This couldn’t in any way be related to the recent dark theme work being
> doing could it?
>
> Eric Bresie
> Ebresie@gmail.com
> > On December 2, 2019 at 10:40:55 AM CST, Steven Ingram <
> steven.rextechinc@gmail.com> wrote:
> >
> > My issues started yesterday when I pulled the upstream code and an error
> > presented itself related to the dark theming. I know that was a topic as
> of
> > late so I thought it may be an environmental issue. I don’t have that
> error
> > recorded anywhere, unfortunately.
> >
> > So then I set off on making my local repo pristine, even tossing
> everything
> > ignored by git, and this error (the one from my original post) shows up.
> >
> > I removed the entry for applemenu from config and then I could move on
> with
> > my work.
> >
> > On Mon, Dec 2, 2019 at 02:05 Peter Hull <pe...@gmail.com> wrote:
> >
> > > On Sun, 1 Dec 2019 at 22:15, Steven Ingram <
> steven.rextechinc@gmail.com>
> > > wrote:
> > >
> > > > I tried to build the project today, but I kept hitting errors which
> led
> > > me
> > > > to make a new clone of an up-to-date master branch of my fork. I keep
> > > > running into compilation errors. See attached truncated output. If i
> > > need
> > > > to attach the rest I can at request.
> > > >
> > > > I also saw the same errors (failing to build the applemenu module)
> just
> > > recently. For me it was solved by making sure I was building with JDK
> 8,
> > > and making sure JAVA_HOME was also set correctly.
> > >
> > > I think applemenu depends on some Desktop classes which were added in
> JDK9,
> > > and there is a compatibility JAR which contains these classes for
> earlier
> > > JDKs. On later ones (I tried JDK11) the classes should be there
> > > automatically but for some reason they were not found. I didn't have
> time
> > > to look further.
> > >
> > > Pete
> > >
>
Re: Re: Build failing locally
Posted by Eric Bresie <eb...@gmail.com>.
This couldn’t in any way be related to the recent dark theme work being doing could it?
Eric Bresie
Ebresie@gmail.com
> On December 2, 2019 at 10:40:55 AM CST, Steven Ingram <st...@gmail.com> wrote:
>
> My issues started yesterday when I pulled the upstream code and an error
> presented itself related to the dark theming. I know that was a topic as of
> late so I thought it may be an environmental issue. I don’t have that error
> recorded anywhere, unfortunately.
>
> So then I set off on making my local repo pristine, even tossing everything
> ignored by git, and this error (the one from my original post) shows up.
>
> I removed the entry for applemenu from config and then I could move on with
> my work.
>
> On Mon, Dec 2, 2019 at 02:05 Peter Hull <pe...@gmail.com> wrote:
>
> > On Sun, 1 Dec 2019 at 22:15, Steven Ingram <st...@gmail.com>
> > wrote:
> >
> > > I tried to build the project today, but I kept hitting errors which led
> > me
> > > to make a new clone of an up-to-date master branch of my fork. I keep
> > > running into compilation errors. See attached truncated output. If i
> > need
> > > to attach the rest I can at request.
> > >
> > > I also saw the same errors (failing to build the applemenu module) just
> > recently. For me it was solved by making sure I was building with JDK 8,
> > and making sure JAVA_HOME was also set correctly.
> >
> > I think applemenu depends on some Desktop classes which were added in JDK9,
> > and there is a compatibility JAR which contains these classes for earlier
> > JDKs. On later ones (I tried JDK11) the classes should be there
> > automatically but for some reason they were not found. I didn't have time
> > to look further.
> >
> > Pete
> >
Re: Build failing locally
Posted by Steven Ingram <st...@gmail.com>.
Thx for the reply Peter.
My issues started yesterday when I pulled the upstream code and an error
presented itself related to the dark theming. I know that was a topic as of
late so I thought it may be an environmental issue. I don’t have that error
recorded anywhere, unfortunately.
So then I set off on making my local repo pristine, even tossing everything
ignored by git, and this error (the one from my original post) shows up.
I removed the entry for applemenu from config and then I could move on with
my work.
On Mon, Dec 2, 2019 at 02:05 Peter Hull <pe...@gmail.com> wrote:
> On Sun, 1 Dec 2019 at 22:15, Steven Ingram <st...@gmail.com>
> wrote:
>
> > I tried to build the project today, but I kept hitting errors which led
> me
> > to make a new clone of an up-to-date master branch of my fork. I keep
> > running into compilation errors. See attached truncated output. If i
> need
> > to attach the rest I can at request.
> >
> > I also saw the same errors (failing to build the applemenu module) just
> recently. For me it was solved by making sure I was building with JDK 8,
> and making sure JAVA_HOME was also set correctly.
>
> I think applemenu depends on some Desktop classes which were added in JDK9,
> and there is a compatibility JAR which contains these classes for earlier
> JDKs. On later ones (I tried JDK11) the classes should be there
> automatically but for some reason they were not found. I didn't have time
> to look further.
>
> Pete
>
Re: Build failing locally
Posted by Peter Hull <pe...@gmail.com>.
On Sun, 1 Dec 2019 at 22:15, Steven Ingram <st...@gmail.com>
wrote:
> I tried to build the project today, but I kept hitting errors which led me
> to make a new clone of an up-to-date master branch of my fork. I keep
> running into compilation errors. See attached truncated output. If i need
> to attach the rest I can at request.
>
> I also saw the same errors (failing to build the applemenu module) just
recently. For me it was solved by making sure I was building with JDK 8,
and making sure JAVA_HOME was also set correctly.
I think applemenu depends on some Desktop classes which were added in JDK9,
and there is a compatibility JAR which contains these classes for earlier
JDKs. On later ones (I tried JDK11) the classes should be there
automatically but for some reason they were not found. I didn't have time
to look further.
Pete