Closed

How can Netbeans run my application when some of my application's dependencies are not in the “Libraries” folder?

I have an application what works properly when I run it from Netbeans, but doesn't work properly when I run it from the executable jar produced by the Netbeans "Clean and Build" command. In particular, I'm getting "[url removed, login to view]" for classes that aren't the "Libraries" folder of my project (for example, [url removed, login to view], as well as various other classes in [url removed, login to view]).

I know that ClassNotFoundException is thrown when the given class isn't in the classpath of the application. I had started to manually add all of the various dependencies to the "[Project-Name]\dist\lib" folder created by Netbeans, but I feel like this is not the right way to go about doing this. This doesn't work for all dependencies, with ClassNotFoundExceptions being thrown even if a jar with the relevant class is in "[Project-Name]\dist\lib".

I have no problem getting stuff listed in the "Libraries" folder into "[Project-Name]\dist\lib" folder.

I have noticed that the dependencies that are not listed in the "Libraries" folder are various Java EE components. Since this program is an application client that connects to a Java EE server, and this is my first Java EE project, my guess is that there is something basic about Java EE that I don't understand that has led to this issue.

I have two questions:

1. How can Netbeans run my application when some of my application's dependencies are not in the "Libraries" folder?

2. Is there any way of automatically exporting all of the dependencies not explicitly listed in the "Libraries" folder to "[Project-Name]\dist\lib"?

Also, my project is not a Maven project.

Skills: Java, Netbeans

See more: how to run android apps on pc, how to run a java applet, how to gind s hood graphic designer, how to follow up on a job application by phone, how to follow up on a job application, how many p's do we have in marketer, how does upwork's new pay fee structure differ from the old, how to run properly, how to run freelancer on windows 7, how to run a business online from home, a4 folder application illustrator, launch program folder application delphi, extjs folder application, modify date folder application

About the Employer:
( 1 review ) Richmond Hill, Canada

Project ID: #15913556

12 freelancers are bidding on average $43 for this job

deepakmishra1988

I have been developing java application using NetBeans ever since I started as a programming (8yrs now) and well versed in its usage.

$55 CAD in 1 day
(36 Reviews)
5.5
$150 CAD in 1 day
(42 Reviews)
5.6
dipakjadhav08

I have 8 years experience in java application development. I will fix this. Please message me for further discussion.

$35 CAD in 1 day
(75 Reviews)
5.2
$25 CAD in 1 day
(19 Reviews)
4.2
asonnenhohl

your netbeans is running with the jdk in your machine, and when you run java -jar it is using the jre.

$35 CAD in 1 day
(1 Review)
4.2
$25 CAD in 1 day
(24 Reviews)
3.8
bnabin51

I have 6K reputation in stackoverflow. I have been programming in Java for more than 3 years. I have used many IDEs. I can explain your queries.

$30 CAD in 1 day
(15 Reviews)
3.6
sureshvadlamudi8

A proposal has not yet been provided

$30 CAD in 1 day
(6 Reviews)
3.7
imagicaworld

Hello Client, I read your requirements you are looking for an app to be developed. I have sound experience in Android and iPhone application development,designing and testing. My team have been developed many apps More

$50 CAD in 1 day
(1 Review)
2.4
$25 CAD in 1 day
(4 Reviews)
2.4
zhiqiang1988

Dear sir. I am a Java expert. If you hire me, I will give you excellent results with a small amount of money in the shortest time. I hope to meet you again. Thank you.

$25 CAD in 1 day
(0 Reviews)
0.0
Pankaj91234

I have fixed same issue earlier for desktop application, when we did export executable jar file from netbeans IDE , got same Class path issue.

$26 CAD in 1 day
(0 Reviews)
0.0