Re: Classpath and jar
From: FISH (joeking_at_merseymail.com)
Date: 06/02/04
- Next message: Nigel Wade: "Re: Blow me away, (long) does not truncate."
- Previous message: Ryan Stewart: "Re: Blow me away, (long) does not truncate."
- In reply to: Roedy Green: "Classpath and jar"
- Next in thread: Roedy Green: "Re: Classpath and jar"
- Reply: Roedy Green: "Re: Classpath and jar"
- Reply: Roedy Green: "Re: Classpath and jar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Jun 2004 04:42:28 -0700
Roedy Green <look-on@mindprod.com.invalid> wrote in message news:<q8nqb0tt4a5okbkvpdjgfhnk3ckjskae2v@4ax.com>...
> Two related questions:
>
> Is this correct?
>
> java.exe -jar x.jar
>
> Then the classpath is irrelevant. Java is not allowed to peek on the
> classpath for missing classes outside the jar.
To the best of my knowledge -jar does not nullify -classpath/-cp, nor
any other command line switch.
(You can specify the classpath with a Class-Path line in the manifest
of your Jar, and these other jars/directories will be loaded as
extensions. You can also seal a package into a given Jar file in 1.2
if you want, which IIRC forbids classes from that package from being
outside of that file.)
>
> <applet
> archive="../mypackage.jar"
> code="com.mindprod.mypackage.MyClass.class"
> width="565" height="46"
> alt="Java needed to display this Applet.">
> <param name="flavour" value="strawberry">
> Java needed to display this Applet.
> </applet>
>
> If there is an archive jar, then the classpath and codebase is
> irrelevant. Java is not allowed to peek out side the jar.
Again, the existance of a Jar file does not nullify the plugin's
classpath or the HTML's stated codebase. Your applet does not
all have to be inside one archive.
(Are you sure your code attribute should end with ".class"? AFAIK
this is incorrect (although most browsers will correct it for you!) )
-FISH- ><>
- Next message: Nigel Wade: "Re: Blow me away, (long) does not truncate."
- Previous message: Ryan Stewart: "Re: Blow me away, (long) does not truncate."
- In reply to: Roedy Green: "Classpath and jar"
- Next in thread: Roedy Green: "Re: Classpath and jar"
- Reply: Roedy Green: "Re: Classpath and jar"
- Reply: Roedy Green: "Re: Classpath and jar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|