accessing main class embedded in a package

I am having trouble accessing the main class of my application that is embedded in a package, several directories down (within a jar). I have several questions:

How do I set the class path?

How do I invoke the embedded main class?

The developers guide does not discuss the JNLP file resource elements "package" and "extension". Is the syntax published? Is this part of the equation?

[436 byte] By [ashuman] at [2007-9-26 4:18:57]
# 1

You should look at the "Java Network Launching Protocol & API Specification," it's a pdf document available on the Web Start site.

The "package" tag can be ignored- it's used with lazy downloading to instruct the loader on which packages are placed in which jar.

The "extension" tag, on the other hand, is useful. When using a signed application, ALL of the application's jars have to be signed. The way to avoid having to sign a utility jar that doesn't need secure access is to make it into an extension: create a JNLP file referencing the jar WITHOUT the <j2se version="1.3+"> and with a <component-desc/> tag instead of <application-desc/>. In the application's JNLP file, load the extension with the tag

<extension name="Extension Name" href="extensionfile.jnlp">

</extension>

instead of <jar href="extensionfile.jar">.

To answer your actual question, though, you can specify the main class with the tag

<application-desc main-class="package.Class"/>.

Jonathan

jkallay at 2007-6-29 17:21:14 > top of Java-index,Desktop,Deploying...