My Project Works Inside Eclipse But Not When I Export

C

cppaddict

I have an eclipse project into which I have exported a few external
jar files. If I now export the entire eclipse project as a jar file,
will it include the necessary class files from the external jar files
in the export? Or will the exported jar depend on the external jar
files being in the CLASSPATH?

If the external class files are not exported by default, is there a
way to make them get exported?

Thanks,
cpp
 
C

cppaddict

Updated info.....

I went to the Build Path Properties in eclipse, Order and Export tab,
and checked the 2 jars. I also had to manually add them to my System
CLASSPATH. That took care of the the ClassDef errors.

However, the external jars use some native code and a DLL in the
C:\WINDOWS folder, and now I am getting an UnsatisfiedLinkError on one
of the native calls...

Again, it all works fine in eclipse. So now I am even more confused
:(

Any ideas?
 
W

www

cppaddict said:
I have an eclipse project into which I have exported a few external
jar files. If I now export the entire eclipse project as a jar file,
will it include the necessary class files from the external jar files
in the export? Or will the exported jar depend on the external jar
files being in the CLASSPATH?
During the Export process, there is an opportunity to let you decide if
you want to export other project(s) into the destination jar file. It is
a thing of check or un-check. In terms of those needed jar files, I
don't remember. I guess they are similar situation as the needed projects.

If my Eclipse project needs other project classes to work, I can export
all of them into a big jar file. Or I can only export my Eclipse project
into a smaller jar file, but I need to add those needed classes' paths
into classpath variable.
If the external class files are not exported by default, is there a
way to make them get exported?

Yes. Like I said previously, pay attention to each step when exporting,
there is a check or un-check thing to let you decide.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top