You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by "William L. Thomson Jr." <wl...@o-sinc.com> on 2017/11/27 18:49:25 UTC

SOLVED: Cannot find resource

This was buried in the other thread. Given how frustrating it was for
me. I thought I would make it more visible for others to find.

To resolve the following "Cannot find resource" simply add

--source-path src

Where src is the root folder of sources, like in any Netbeans project
in the repository. For some reason that stuff is not picked up
otherwise. Not by adding folder to classpath, etc.

That resolves exceptions such as the following.

src/org/netbeans/modules/extbrowser/BrowserUtils.java:36:
    error: cannot find resource
org/netbeans/modules/extbrowser/resources/browser_generic_16x.png
private static final String BROWSER_ICON =
"org/netbeans/modules/extbrowser/resources/browser_generic_16x.png";

src/org/netbeans/core/windows/actions/ResetWindowsAction.java:60:
    error: Cannot find resource
org/netbeans/core/windows/actions/Bundle.properties public static
ActionListener reset() {

-- 
William L. Thomson Jr.

Re: SOLVED: Cannot find resource

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 20:24:14 +0100
Antonio <an...@vieiro.net> wrote:
>
> The NetBeans build system is very complex and does lots of things. So 
> don't be frustrated: this is going to take some time and effort.

That was not so much Netbeans related as JDK and processors. It is VERY
odd that processors cannot find stuff on the classpath. Why it needs a
source path seems strange. Maybe a JDK bug or something not sure.

Just so happens Netbeans uses a lot of processors so I was running into
that problem. But I needed those processors to process so needed to
find a solution. It just made no sense when the files it could not find
sat literally next to the class it was compiling within the sources.
 
> I was wondering if you could benefit of taking a look at the result
> of one of our builds at [1].

Yes for sure, and not doing things the hard way. I likely should have
started with that. I did not realize such was going on. I thought I was
some what familiar having messed with ant build system for 8.2 packages
on Gentoo. Just as easily could merge one of those again and look at
output. I was doing some of that how I discovered the NbBundleProcessor.

> I think we can generate a verbose build somehow for you to see all
> those little flags being passed to the compiler, to jar, etc.. If
> you're interested I'll try to generate a verbose build in a few days.
> (The resulting build log may be huge, btw.).

That would be cool. Maybe useful either way to produce a list of stuff
used for reference. But you have given me some ideas so I may go off
and do my own verbose build. I know what you mean about size. I added
-verbose to compiles, and got a bunch of output. I think more with Java
9 than with past, but maybe the same.

Thanks much for the offer and ideas! Makes me feel I should have done
more of this myself vs noise on list. Oh well :)

-- 
William L. Thomson Jr.

Re: SOLVED: Cannot find resource

Posted by Antonio <an...@vieiro.net>.

El 27/11/17 a las 21:15, William L. Thomson Jr. escribió:
> 
> Thanks for the suggestion and offer! I should have started with
> something like that to answer my own questions :P
> 

Don't worry about asking questions. After all answering questions is one 
of the purposes of this mailing list. ;-)

Cheers,
Antonio

Re: SOLVED: Cannot find resource

Posted by "William L. Thomson Jr." <wl...@o-sinc.com>.
On Mon, 27 Nov 2017 20:24:14 +0100
Antonio <an...@vieiro.net> wrote:
>
> I think we can generate a verbose build somehow for you to see all
> those little flags being passed to the compiler, to jar, etc.. If
> you're interested I'll try to generate a verbose build in a few days.
> (The resulting build log may be huge, btw.).
> 
> [1] https://travis-ci.org/apache/incubator-netbeans/builds/

Looking over a few build outputs. Seems I will for sure need to go the
verbose route. I will see about that locally. Even if it fails I can
eek it along building pieces/modules. I did some of that before. Just
going into a subdir and running ant :)

No worries on generating one for me, unless you all want a log of that
out for public searching etc. The normal output does not even show
NbBundleProcessor others. I think I had to grep the build/antsrc to
find NbBundleProcessor in the first place.

Thanks for the suggestion and offer! I should have started with
something like that to answer my own questions :P

-- 
William L. Thomson Jr.

Re: SOLVED: Cannot find resource

Posted by Antonio <an...@vieiro.net>.
Hi again,

El 27/11/17 a las 19:49, William L. Thomson Jr. escribió:
> This was buried in the other thread. Given how frustrating it was for
> me. I thought I would make it more visible for others to find.
> 
> To resolve the following "Cannot find resource" simply add
> 
> --source-path src

The NetBeans build system is very complex and does lots of things. So 
don't be frustrated: this is going to take some time and effort.

I was wondering if you could benefit of taking a look at the result of 
one of our builds at [1].

I think we can generate a verbose build somehow for you to see all those 
little flags being passed to the compiler, to jar, etc.. If you're 
interested I'll try to generate a verbose build in a few days. (The 
resulting build log may be huge, btw.).

Cheers,
Antonio


[1] https://travis-ci.org/apache/incubator-netbeans/builds/