Jar package references other packages

N

Nancy

I have created a JAR, Commercial.jar, which is comprised of the package
Commercial/*.class. My problem is that the *.class files in the
Commercial directory reference another package, com.adobe.pdf.*. The
directories com and Commercial are at the same level. I've tried many
different things, but my JAR can't find the com/adobe/pdf/*.class
files.

I tried Class-path: ./com/adobe/pdf/*.class but it didn't work.

Any suggestions?

Thanks!
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Nancy said:
I have created a JAR, Commercial.jar, which is comprised of the package
Commercial/*.class. My problem is that the *.class files in the
Commercial directory reference another package, com.adobe.pdf.*. The
directories com and Commercial are at the same level. I've tried many
different things, but my JAR can't find the com/adobe/pdf/*.class
files.

I tried Class-path: ./com/adobe/pdf/*.class but it didn't work.

Class-Path: other.jar

Arne
 
N

Nigel Wade

Nancy said:
I tried that too but could not make it work.

It should work, it's the way it's supposed to be done.

What exactly did you do? What is in the MANIFEST.MF of Commercial.jar?
Where is the other jar file in relation to Commercial.jar?

If you don't provide any information we can't provide any help.
 
N

Nancy

I've got the JAR, Commercial.jar, that contains the package I created.
It works fine on its own. I created a JAR, com.jar, which contains the
package com/adobe/pdf/*.

I made my manifest.mft file like this:
Manifest-Version: 1.0
Main-Class: Commercial/Interface
Class-path: com.jar

Commercial.jar and com.jar are located in the same directory. Several
of my classes in Commercial.jar import com.adobe.pdf.*.

When I run the program, I get an error about not finding the class in
com.adobe.pdf.
 
A

Andrew Thompson

Nancy said:
I've got the JAR, Commercial.jar, that contains the package I created.
It works fine on its own. I created a JAR, com.jar, which contains the
package com/adobe/pdf/*.

I made my manifest.mft file like this:
Manifest-Version: 1.0
Main-Class: Commercial/Interface
Class-path: com.jar

Commercial.jar and com.jar are located in the same directory. Several
of my classes in Commercial.jar import com.adobe.pdf.*.

When I run the program, I get an error about

About? Please always copy/paste compile and
run-time output, or at least the first few lines..
...not finding the class in
com.adobe.pdf.

...which brings me to. What is the *exact* command
that is being issued to launch the application?

Andrew T.
 
N

Nancy

Error message::

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
com/adobe/pdf/PDFFactory



InputStream myPDFInput = new FileInputStream("myFile.pdf");
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top