You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Gene Glick <gg...@aps-tech.com> on 2020/07/27 20:20:12 UTC

Build does not include dependent libs

Hi.

Netbeans 12.0
Java OpenJDK 14.0.1
64-bit
Windows 10.

My project runs fine in the IDE, but the packaged up jar file is not okay. The directory "dist" is missing the dependent libraries. Further, when I run java -jar myProgram.jar it responds with:

no main manifest attribute

Sure enough, the jar has no manifest.

This project began life in the Sun/Oracle Netbeans days, and builds just fine in Netbeans 7.2. I have finally bit the bullet and converted it over to the newer style. But - something is clearly wrong with the build. I have already check in the properties and the build tab, and the checkbox for "copy dependent libraries" is checked.

Any ideas what is wrong here?

gene

RE: Build does not include dependent libs

Posted by Gene Glick <gg...@aps-tech.com>.
I’ll consider moving to Maven….

FYI, problem resolved. I turned on every option I could.
[cid:image005.jpg@01D6658C.231DA320]

This revealed some problems. I’m not done resolving all of them….but the first 1 or 2 must have been getting in the way of the build.  It’s building correctly now.
From: Geertjan Wielenga <ge...@apache.org>
Sent: Wednesday, July 29, 2020 8:36 AM
To: Gene Glick <gg...@aps-tech.com>
Cc: enroi@mail.ru; users@netbeans.apache.org
Subject: Re: Build does not include dependent libs

If you can provide the steps to reproduce or the project or a similar sample project that can be used to reproduce the problem that would be best, even better would be for you to consider moving to Maven or Gradle instead of Ant.

Gj

On Wed, Jul 29, 2020 at 2:32 PM Gene Glick <gg...@aps-tech.com>> wrote:
Hi and thanks for the help.

Yes, that’s exactly how it is setup now. It’s been that way for years. Somehow it’s not working though.

The last time this project was built, used Netbeans 7.2 on Java 1.5 (possibly newer, but still 32-bit). Now that it is on Win10, and IDE changed to Apache Netbeans 12.0, it just isn’t doing the right thing – even with those settings.



From: enroi@mail.ru<ma...@mail.ru> <en...@mail.ru>>
Sent: Tuesday, July 28, 2020 5:23 PM
To: Gene Glick <gg...@aps-tech.com>>; users@netbeans.apache.org<ma...@netbeans.apache.org>
Subject: RE: Build does not include dependent libs

Hello.
I will try to help you.
I think for your project you use “Java with Ant” template Figure 1 and your project has icon [cid:image002.png@01D6658C.230734F0]
If you want to copy libraries to lib subfolder of dist folder you need to select “Copy Dependent Libraries” in project properties panel, look to Figure 2


[cid:image003.png@01D6658C.230734F0]

Figure 1
[cid:image004.png@01D6658C.230734F0]

Figure 2

From: Gene Glick <gg...@aps-tech.com>>
Sent: Monday, July 27, 2020 11:20 PM
To: users@netbeans.apache.org<ma...@netbeans.apache.org>
Subject: Build does not include dependent libs

Hi.

Netbeans 12.0
Java OpenJDK 14.0.1
64-bit
Windows 10.

My project runs fine in the IDE, but the packaged up jar file is not okay. The directory “dist” is missing the dependent libraries. Further, when I run java -jar myProgram.jar it responds with:

no main manifest attribute

Sure enough, the jar has no manifest.

This project began life in the Sun/Oracle Netbeans days, and builds just fine in Netbeans 7.2. I have finally bit the bullet and converted it over to the newer style. But – something is clearly wrong with the build. I have already check in the properties and the build tab, and the checkbox for “copy dependent libraries” is checked.

Any ideas what is wrong here?

gene

Re: Build does not include dependent libs

Posted by Geertjan Wielenga <ge...@apache.org>.
If you can provide the steps to reproduce or the project or a similar
sample project that can be used to reproduce the problem that would be
best, even better would be for you to consider moving to Maven or Gradle
instead of Ant.

Gj

On Wed, Jul 29, 2020 at 2:32 PM Gene Glick <gg...@aps-tech.com> wrote:

> Hi and thanks for the help.
>
>
>
> Yes, that’s exactly how it is setup now. It’s been that way for years.
> Somehow it’s not working though.
>
>
>
> The last time this project was built, used Netbeans 7.2 on Java 1.5
> (possibly newer, but still 32-bit). Now that it is on Win10, and IDE
> changed to Apache Netbeans 12.0, it just isn’t doing the right thing – even
> with those settings.
>
>
>
>
>
>
>
> *From:* enroi@mail.ru <en...@mail.ru>
> *Sent:* Tuesday, July 28, 2020 5:23 PM
> *To:* Gene Glick <gg...@aps-tech.com>; users@netbeans.apache.org
> *Subject:* RE: Build does not include dependent libs
>
>
>
> Hello.
>
> I will try to help you.
>
> I think for your project you use “Java with Ant” template Figure 1 and
> your project has icon
>
> If you want to copy libraries to lib subfolder of dist folder you need to
> select “Copy Dependent Libraries” in project properties panel, look to
> Figure 2
>
>
>
>
>
> Figure 1
>
> Figure 2
>
>
>
> *From:* Gene Glick <gg...@aps-tech.com>
> *Sent:* Monday, July 27, 2020 11:20 PM
> *To:* users@netbeans.apache.org
> *Subject:* Build does not include dependent libs
>
>
>
> Hi.
>
>
>
> Netbeans 12.0
>
> Java OpenJDK 14.0.1
>
> 64-bit
>
> Windows 10.
>
>
>
> My project runs fine in the IDE, but the packaged up jar file is not okay.
> The directory “dist” is missing the dependent libraries. Further, when I
> run java -jar myProgram.jar it responds with:
>
>
>
> no main manifest attribute
>
>
>
> Sure enough, the jar has no manifest.
>
>
>
> This project began life in the Sun/Oracle Netbeans days, and builds just
> fine in Netbeans 7.2. I have finally bit the bullet and converted it over
> to the newer style. But – something is clearly wrong with the build. I have
> already check in the properties and the build tab, and the checkbox for
> “copy dependent libraries” is checked.
>
>
>
> Any ideas what is wrong here?
>
>
>
> gene
>

RE: Build does not include dependent libs

Posted by Gene Glick <gg...@aps-tech.com>.
Hi and thanks for the help.

Yes, that's exactly how it is setup now. It's been that way for years. Somehow it's not working though.

The last time this project was built, used Netbeans 7.2 on Java 1.5 (possibly newer, but still 32-bit). Now that it is on Win10, and IDE changed to Apache Netbeans 12.0, it just isn't doing the right thing - even with those settings.



From: enroi@mail.ru <en...@mail.ru>
Sent: Tuesday, July 28, 2020 5:23 PM
To: Gene Glick <gg...@aps-tech.com>; users@netbeans.apache.org
Subject: RE: Build does not include dependent libs

Hello.
I will try to help you.
I think for your project you use "Java with Ant" template Figure 1 and your project has icon [cid:image001.png@01D66582.BF5F5C60]
If you want to copy libraries to lib subfolder of dist folder you need to select "Copy Dependent Libraries" in project properties panel, look to Figure 2


[cid:image002.png@01D66582.BF5F5C60]

Figure 1
[cid:image003.png@01D66582.BF5F5C60]

Figure 2

From: Gene Glick <gg...@aps-tech.com>>
Sent: Monday, July 27, 2020 11:20 PM
To: users@netbeans.apache.org<ma...@netbeans.apache.org>
Subject: Build does not include dependent libs

Hi.

Netbeans 12.0
Java OpenJDK 14.0.1
64-bit
Windows 10.

My project runs fine in the IDE, but the packaged up jar file is not okay. The directory "dist" is missing the dependent libraries. Further, when I run java -jar myProgram.jar it responds with:

no main manifest attribute

Sure enough, the jar has no manifest.

This project began life in the Sun/Oracle Netbeans days, and builds just fine in Netbeans 7.2. I have finally bit the bullet and converted it over to the newer style. But - something is clearly wrong with the build. I have already check in the properties and the build tab, and the checkbox for "copy dependent libraries" is checked.

Any ideas what is wrong here?

gene

RE: Build does not include dependent libs

Posted by en...@mail.ru.INVALID.
Hello.

I will try to help you.

I think for your project you use "Java with Ant" template Figure 1 and your
project has icon 

If you want to copy libraries to lib subfolder of dist folder you need to
select "Copy Dependent Libraries" in project properties panel, look to
Figure 2

 

 



Figure 1



Figure 2

 

From: Gene Glick <gg...@aps-tech.com> 
Sent: Monday, July 27, 2020 11:20 PM
To: users@netbeans.apache.org
Subject: Build does not include dependent libs

 

Hi.

 

Netbeans 12.0

Java OpenJDK 14.0.1

64-bit

Windows 10.

 

My project runs fine in the IDE, but the packaged up jar file is not okay.
The directory "dist" is missing the dependent libraries. Further, when I run
java -jar myProgram.jar it responds with:

 

no main manifest attribute

 

Sure enough, the jar has no manifest.

 

This project began life in the Sun/Oracle Netbeans days, and builds just
fine in Netbeans 7.2. I have finally bit the bullet and converted it over to
the newer style. But - something is clearly wrong with the build. I have
already check in the properties and the build tab, and the checkbox for
"copy dependent libraries" is checked.

 

Any ideas what is wrong here?

 

gene