Importing classes from a jar file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Javier_Mansilla
Posted On:   Monday, June 18, 2001 02:50 AM

Hello everybody


I'm trying to import classes from the

package org.xml.sax.... from a class

inside a jar file. If I include

the jar file into my classpath

and run the command "java MyClass"

I haven't any problem.


The problem arrives when I try to
run "java -jar MyJarFile". It launchs
an exception because it isn't
able to find the needed class. Can
you explain me why? Thanks

Re: Importing classes from a jar file

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, June 18, 2001 10:20 AM

Hi,

You need to specify the classpath inside the manifest file of your jar.

Take a look ath this FAQ.
About | Sitemap | Contact