java web start jars

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steven

    #1

    java web start jars

    Hello,

    I'm a student at the university of Antwerp Belgium and I'm writing a
    program for java web start that has to support plugins.
    Now my question is why does java web start download 3 versions of the
    resources specified in the jnlp file: RC*.jar, RM*.jar and RT*.jar and
    is there any way in which I can acces the jar files in the following
    way:


    String url = "location of jar file downloaded by java web start"
    URL u = new URL("jar", "", url + "!/");
    JarURLConnectio n uc = (JarURLConnecti on)u.openConnec tion();
    JarFile jar = uc.getJarFile() ;
    Manifest man = jar.getManifest ();
    Attributes attr = man.getMainAttr ibutes();

    this always throws the following exception no matter which version
    (rm,rc,rt) I access.
    I/O error while loading JAR file:
    java.util.zip.Z ipException: The system cannot find the file specified
    at java.util.zip.Z ipFile.open(Nat ive Method)
    at java.util.zip.Z ipFile.<init>(U nknown Source)
    at java.util.jar.J arFile.<init>(U nknown Source)
    at java.util.jar.J arFile.<init>(U nknown Source)
    at sun.net.www.pro tocol.jar.URLJa rFile.<init>(Un known Source)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
    at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
    at sun.net.https://www.protocol.jar.JarURLConne...onnect(Unknown Source)
    at sun.net.https://www.protocol.jar.JarURLConne...arFile(Unknown
    Source)
    at PluginClassLoad er.getMainClass Name(PluginClas sLoader.java:28 )
    at PluginRunner.ru n(PluginRunner. java:30)
    at Notepad.main(No tepad.java:78)

    although the file I specify in the url is in the java web start cache
    directory

    thx.
  • Roedy Green

    #2
    Re: java web start jars

    On 5 Apr 2004 02:14:08 -0700, vde_steven@hotm ail.com (Steven) wrote or
    quoted :
    [color=blue]
    >String url = "location of jar file downloaded by java web start"
    >URL u = new URL("jar", "", url + "!/");[/color]

    jar:file:///C|/bar/baz.jar!/com/foo/Quux.class

    Is used for accessing a member of jar. If you want the entire jar,
    you use a url like this

    file:///C|/bar/baz.jar
    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

    Comment

    • opt_utc
      New Member
      • Nov 2005
      • 1

      #3
      Hello Stefen,

      Did you finally managed to access the jar files and do you know the use of RC*.jar, RM*.jar and RT*.jar ?

      If yes, can you please tell us about it.

      I'm actually trying to know when Java Web Start has updated an application so I can display a special screen (ONLY IF updates have been made). And I figured I could get some info from those three jars.

      If you have any better idea, feel free to post.

      Thanks in advance,

      Alex.

      Comment

      Working...