Re: Java programs run in Netbeans but not outside
Thanks to all who suggested Netbeans 12.0. I finally found time from other projects to install it and the problem is now resolved. Bayless On 8/17/20 11:36 AM, Gianluca Ruggero wrote: Hi Bayless, I have had the same problem in Netbeans 11 with all my ant based projects created with Netbeans 8.2. But with Netbeans 12 seems resolved. I've successfully built my ant projects and the dist folder has been created correctly. Gianluca Il giorno dom 16 ago 2020 alle ore 23:26 Bayless Kirtley mailto:bk...@cox.net>> ha scritto: Thanks guys. I'm old and retired and have used Netbeans with ant since version 5.0. I still maintain a couple of charity applications for them so this is important. Suddenly it stops including the lib directory. I have tried adding the lib directory to the dist directory but still nothing. The jar file just goes to lunch. Something about compiling or building the executable doesn't seem to recognize the libraries. To solve a problem for a food pantry (charity project) I had to revert to an older version of Linux on a questionable disk where Netbeans 8.1 with Java 1.8 still works. I don't see that as a long term solution though as the disk is too undependable. A few weeks ago I thought I saw a related reference here but failed to save it as I didn't know I had a problem at the time. Can anyone recall that or explain it again please? Bayless On 8/16/20 1:42 AM, Mark Eggers wrote: > I do something similar and then package up everything as a zip file or > tar.gz with the assembly plugin. > > Something like this: > > > > org.apache.maven.plugins > maven-assembly-plugin > 2.6 > > src/main/assembly/assembly.xml > > > > And the assembly.xml file (leaving out the schema for brevity): > > > bin > > tar.gz > zip > > false > false > > > target > > > *.jar > lib/ > > > > > > Then, mvn package followed by mvn assembly:single gives me a tar.gz and > a zip file containing the correct structure. I can ship that around, > unpack it, and run the program from the command line with: > > java -jar ./jarname.jar > > Works for me. > > . . . just my two cents > /mde/ > > On 8/15/2020 9:07 PM, Bradley Willcott wrote: >> 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: >> >> >> >> >> org.apache.maven.plugins >> maven-jar-plugin >> 3.2.0 >> >> >> >> true >> libs/ <<=== Important >> org.markdownj.cli.Main >> true >> true >> >> >> >> >> >> org.apache.maven.plugins >> maven-dependency-plugin >> 3.1.1 >> >> >> copy-dependencies >> prepare-package >> >> copy-dependencies >> >> >> runtime >> test >> >> ${project.build.directory}/libs >> <<=== Important >> >> >> >> >> >> >> >> >> 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 >>> >>> >>> > ---
RE: Java programs run in Netbeans but not outside
I too had this problem, and posted to the list. Here’s the thread: http://mail-archives.apache.org/mod_mbox/netbeans-users/202007.mbox/%3CSN6PR17MB2382478E5923CD2F5191CFF4ED720%40SN6PR17MB2382.namprd17.prod.outlook.com%3E You can jump to the end if you like. I was unable to find the exact reason, tried everyone’s advice, but nothing helped. When I finally checked all the options, and then tried to compile, the IDE complained about a bunch of things wrong in the code. So, I cleaned them up, one at a time until it built properly. At that time, I think, the distribution folder correctly contained the libraries. From: Gianluca Ruggero Sent: Monday, August 17, 2020 12:37 PM To: users@netbeans.apache.org Subject: Re: Java programs run in Netbeans but not outside Hi Bayless, I have had the same problem in Netbeans 11 with all my ant based projects created with Netbeans 8.2. But with Netbeans 12 seems resolved. I've successfully built my ant projects and the dist folder has been created correctly. Gianluca Il giorno dom 16 ago 2020 alle ore 23:26 Bayless Kirtley mailto:bk...@cox.net>> ha scritto: Thanks guys. I'm old and retired and have used Netbeans with ant since version 5.0. I still maintain a couple of charity applications for them so this is important. Suddenly it stops including the lib directory. I have tried adding the lib directory to the dist directory but still nothing. The jar file just goes to lunch. Something about compiling or building the executable doesn't seem to recognize the libraries. To solve a problem for a food pantry (charity project) I had to revert to an older version of Linux on a questionable disk where Netbeans 8.1 with Java 1.8 still works. I don't see that as a long term solution though as the disk is too undependable. A few weeks ago I thought I saw a related reference here but failed to save it as I didn't know I had a problem at the time. Can anyone recall that or explain it again please? Bayless On 8/16/20 1:42 AM, Mark Eggers wrote: > I do something similar and then package up everything as a zip file or > tar.gz with the assembly plugin. > > Something like this: > > > > org.apache.maven.plugins > maven-assembly-plugin > 2.6 > > src/main/assembly/assembly.xml > > > > And the assembly.xml file (leaving out the schema for brevity): > > > bin > > tar.gz > zip > > false > false > > > target > > > *.jar > lib/ > > > > > > Then, mvn package followed by mvn assembly:single gives me a tar.gz and > a zip file containing the correct structure. I can ship that around, > unpack it, and run the program from the command line with: > > java -jar ./jarname.jar > > Works for me. > > . . . just my two cents > /mde/ > > On 8/15/2020 9:07 PM, Bradley Willcott wrote: >> 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: >> >> >> >> >> org.apache.maven.plugins >> maven-jar-plugin >> 3.2.0 >> >> >> >> true >> libs/ <<=== Important >> org.markdownj.cli.Main >> true >> true >> >> >> >> >> >> org.apache.maven.plugins >> maven-dependency-plugin >> 3.1.1 >> >> >> copy-dependencies >> prepare-package >> >> copy-dependencies >> >> >> runtime >> test >> >> ${project.build.directory}/libs >> <<=== Important >> >> >> >> >> >> >> >> >> 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
Re: Java programs run in Netbeans but not outside
Hi Bayless, I have had the same problem in Netbeans 11 with all my ant based projects created with Netbeans 8.2. But with Netbeans 12 seems resolved. I've successfully built my ant projects and the dist folder has been created correctly. Gianluca Il giorno dom 16 ago 2020 alle ore 23:26 Bayless Kirtley ha scritto: > Thanks guys. I'm old and retired and have used Netbeans with ant since > version 5.0. I still maintain a couple of charity applications for them > so this is important. Suddenly it stops including the lib directory. I > have tried adding the lib directory to the dist directory but still > nothing. The jar file just goes to lunch. Something about compiling or > building the executable doesn't seem to recognize the libraries. > > To solve a problem for a food pantry (charity project) I had to revert > to an older version of Linux on a questionable disk where Netbeans 8.1 > with Java 1.8 still works. I don't see that as a long term solution > though as the disk is too undependable. > > A few weeks ago I thought I saw a related reference here but failed to > save it as I didn't know I had a problem at the time. Can anyone recall > that or explain it again please? > > Bayless > > On 8/16/20 1:42 AM, Mark Eggers wrote: > > I do something similar and then package up everything as a zip file or > > tar.gz with the assembly plugin. > > > > Something like this: > > > > > > > > org.apache.maven.plugins > > maven-assembly-plugin > > 2.6 > > > > > src/main/assembly/assembly.xml > > > > > > > > And the assembly.xml file (leaving out the schema for brevity): > > > > > > bin > > > > tar.gz > > zip > > > > false > > false > > > > > > target > > > > > > *.jar > > lib/ > > > > > > > > > > > > Then, mvn package followed by mvn assembly:single gives me a tar.gz and > > a zip file containing the correct structure. I can ship that around, > > unpack it, and run the program from the command line with: > > > > java -jar ./jarname.jar > > > > Works for me. > > > > . . . just my two cents > > /mde/ > > > > On 8/15/2020 9:07 PM, Bradley Willcott wrote: > >> 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: > >> > >> > >> > >> > >> org.apache.maven.plugins > >> maven-jar-plugin > >> 3.2.0 > >> > >> > >> > >> true > >> libs/ <<=== Important > >> org.markdownj.cli.Main > >> true > >> true > >> > >> > >> > >> > >> > >> org.apache.maven.plugins > >> maven-dependency-plugin > >> 3.1.1 > >> > >> > >> copy-dependencies > >> prepare-package > >> > >> copy-dependencies > >> > >> > >> runtime > >> test > >> > >> ${project.build.directory}/libs > >> <<=== Important > >> > >> > >> > >> > >> > >> > >> > >> > >> 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 > > > > - > To u
Re: Java programs run in Netbeans but not outside
Thanks guys. I'm old and retired and have used Netbeans with ant since version 5.0. I still maintain a couple of charity applications for them so this is important. Suddenly it stops including the lib directory. I have tried adding the lib directory to the dist directory but still nothing. The jar file just goes to lunch. Something about compiling or building the executable doesn't seem to recognize the libraries. To solve a problem for a food pantry (charity project) I had to revert to an older version of Linux on a questionable disk where Netbeans 8.1 with Java 1.8 still works. I don't see that as a long term solution though as the disk is too undependable. A few weeks ago I thought I saw a related reference here but failed to save it as I didn't know I had a problem at the time. Can anyone recall that or explain it again please? Bayless On 8/16/20 1:42 AM, Mark Eggers wrote: I do something similar and then package up everything as a zip file or tar.gz with the assembly plugin. Something like this: org.apache.maven.plugins maven-assembly-plugin 2.6 src/main/assembly/assembly.xml And the assembly.xml file (leaving out the schema for brevity): bin tar.gz zip false false target *.jar lib/ Then, mvn package followed by mvn assembly:single gives me a tar.gz and a zip file containing the correct structure. I can ship that around, unpack it, and run the program from the command line with: java -jar ./jarname.jar Works for me. . . . just my two cents /mde/ On 8/15/2020 9:07 PM, Bradley Willcott wrote: 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: org.apache.maven.plugins maven-jar-plugin 3.2.0 true libs/ <<=== Important org.markdownj.cli.Main true true org.apache.maven.plugins maven-dependency-plugin 3.1.1 copy-dependencies prepare-package copy-dependencies runtime test ${project.build.directory}/libs <<=== Important 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 - 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
Re: Java programs run in Netbeans but not outside
I do something similar and then package up everything as a zip file or tar.gz with the assembly plugin. Something like this: org.apache.maven.plugins maven-assembly-plugin 2.6 src/main/assembly/assembly.xml And the assembly.xml file (leaving out the schema for brevity): bin tar.gz zip false false target *.jar lib/ Then, mvn package followed by mvn assembly:single gives me a tar.gz and a zip file containing the correct structure. I can ship that around, unpack it, and run the program from the command line with: java -jar ./jarname.jar Works for me. . . . just my two cents /mde/ On 8/15/2020 9:07 PM, Bradley Willcott wrote: > 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: > > > > > org.apache.maven.plugins > maven-jar-plugin > 3.2.0 > > > > true > libs/ <<=== Important > org.markdownj.cli.Main > true > true > > > > > > org.apache.maven.plugins > maven-dependency-plugin > 3.1.1 > > > copy-dependencies > prepare-package > > copy-dependencies > > > runtime > test > > ${project.build.directory}/libs > <<=== Important > > > > > > > > > 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
Re: Java programs run in Netbeans but not outside
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: org.apache.maven.plugins maven-jar-plugin 3.2.0 true libs/ <<=== Important org.markdownj.cli.Main true true org.apache.maven.plugins maven-dependency-plugin 3.1.1 copy-dependencies prepare-package copy-dependencies runtime test ${project.build.directory}/libs <<=== Important 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
Java programs run in Netbeans but not outside
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