Hi Bayless,

Are you using an Ant build or Maven?  If Maven, have a look at "maven-jar-plugin" and "maven-dependency-plugin".  Here is an example of both from one of my projects:

    <build>
        <plugins>
            <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix> <<===  Important
<mainClass>org.markdownj.cli.Main</mainClass>
<addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
<goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
<includeScope>runtime</includeScope>
<excludeScope>test</excludeScope>
                            <outputDirectory>
                                ${project.build.directory}/libs     <<===  Important
                            </outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Of course, the "<<===  Important" text is not part of the POM text.

All you need to do then is copy the 'libs' directory to the same directory you install the 'jar' file to, and then it should work a charm.  Does for me.

Brad.

On 15/8/20 8:13 pm, Bayless Kirtley wrote:
I recently upgraded from Netbeans 8.1 to 11.1  and due to problems with java 8 I also went to 11. I have been working on some existing projects and everything works fine from within Netbeans. When I try to deploy though, it seems that Netbeans is no longer including the lib directory in the dist directory and the programs will not run. Even when I just replace the jar file in the dist directory, leaving the lib directory as it was, the programs still will not run. What do I need to do to correct this situation?

Bayless




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to