Downloading a directory of jar files

We need to download jar files one by one in the jnlp file but is it possible to download a directory that contains all the jar files as the number of jar files is too large?

I need to download around 50 jar files dynamically
using JNLP, how can that be achieved.Stop telling me what you 'need', because
a) I do not believe you have much idea what
you need.
b) To help you achieve the end goal, I need to
know what it is you are trying to achieve, and
that can be answered by the question
"What does this bring to the end user?"
(trust me - if you asked any enduser if they
need to download 50 jar's dynamically -
they would give you a strange look).
Though a simple and obvious answer is to
generate the JNLP file dynamically as well
(note: that is probably an entirely wrong
strategy to achieving the end goal).
And i even want to know if jnlp supports for loop as i m new to this topic. Then it sounds as though you have a lot
of reading ahead. Other posts you find on
the forum are a good start, but also the
official documentation, some good ones
are linked from here..
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/
The Developer's Guide is a good overview,
though the Spec. is the best. The FAQ has lots
of good stuff, but the JNLP package is really
focused on development using web-start file
services and such.

Similar Messages

  • Lazy downloading broken for updated jar-files?

    Hello,
    Using webstart-6.0 + jar-index + download="lazy" works great - jar files are downloaded on demand when they are really needed.
    However when updating all jar-files, the files that have been downloaded lazily and cached before are downloaded again before the application can be launched, not only on demand.
    Is this the intended behaviour, and is there any way to let webstart lazily download updates, just when the jar-files are needed?
    Thank you in advance, lg Clemens

    Libraries loaded from the j2ee/home/lib directory are opened and loaded at the J2EE container level. So they are accessed from the very start of the server, to the point where it is stopped.
    Therefore if you modify a class library which has already been loaded, you may run into file locking related issues (which will be OS dependent, Windows for example probably won't even let you overwrite the file) so that is what you are likely to be seeing.
    JAR files loaded at the J2EE container level aren't really suitable for dynamic updating -- the classes can be referenced in a multitude of other classloaders.
    As you have seen, replacing a J2EE container level class file, then a restart will be required along the lines of what you have written.
    Stop mid-tier, move new file in and restart?? cheers
    -steve-

  • How to download connector Quickstart distribution .jar file to connect H2 databse

    Hi,
    I am using CQ5.4 version and i want to connect H2 Database with my cq5 instance. From the tutorial i got to know that i need to download connector Quickstart distribution .jar file.
    But i am not able to figure out where i can get this file.
    I have already  downloaded H2 databse.
    Plz help  me as i need to complete this task as soon as possible
    Thanks in Advance....

    If you are refering to JDBC connector [1] I would recommend not to use it.  The connector has been in beta mode and we are in the process of correcting/removing the page for the JDBC connector.   Instead  use the respective JDBC driver and convert it into an OSGI bundle which can then be referenced in your custom JDBC client code to perform all DB activities. More details refer [2].
    [1]   http://dev.day.com/docs/en/crx/connectors/jdbc/current.html
    [2]   http://dev.day.com/content/kb/home/cq5/Development/HowToConfigureSlingDatasource.html

  • Multiple download of the same JAR file

    We have a collection of applets packaged in a single JAR file. Some users (web developers that use our applets) have been complaining that the applet is extremely slow to start up.
    When the html page includes more than one applet from the same JAR file then, "ONLY IN SOME CASES", the JAR file is downloaded multiple times.
    By capturing network traffic we can also think that the JAR file is downloaded even when accessing an image packaged in the applet's own JAR file.
    One further detail: this "DOES NOT OCCUR" when there is a fast connection to the server (or at leat it seems so). In these cases, the JAR file is downloaded once. It looks as if the problem only occurs on slower network connections.
    Thanks in advance for any help.

    Mmm... I don't think this is the solution... all the applets share a lot of classes (the big part of the JAR files).
    But my question is....: why in some cases the JAR is downloaded more than once???

  • Downloading/uploading external (non-jar) files to/from client

    We are searching for a solution to upload and download non-jar files to or from the JWS-client. We've only found information to upload jar-files to a JWS-client, but we couldn't find anything about uploading non-jar files. Is there a standard solution or tool to do this with webstart?

    Hi there,
    We found a solution to upload the non-jar files, in our requirement we are trying to load the resources in the zip files. I have written the extension installer to extract the zip file from the URL to the JNLP client.
    But for this user has to click on the install pop up to allow the JWS to install the non jar files.
    Thanks,
    TSR

  • I want to download  Java Speech API jar file  where can I get that ?

    hi All
    i started development on the Java Speech API. so were i can download the jar file and also if any one having the Maven artifact Id / group Id. please post it.it may helpful for me.
    Thanks
    Jega

    Sun has no such API like Java Speech API in their J2SE but there r other third parties api like FreeTTS which can be used
    to code speech apps.
    http://nchc.dl.sourceforge.net/project/freetts/FreeTTS/FreeTTS%201.2.2/freetts-1.2.2-bin.zip

  • Jar file is not working after deleting all packages from the same directory

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

  • Firefox 35 downloads sometimes jar file as a zip one

    This link: http://montoyo.net/wd2.php?t=mod&v=latest is a "Minecraft" mod that is supposed to download it as a .jar file(like it happens with Google Chrome or Opera), but Firefox renames it as a .zip file. Please solve this. Thanks :D.
    For more info about that web: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291044-web-displays-browse-on-the-internet-in-minecraft
    Sorry by my English :D

    Try adding jar:// to the front of the url:
    [https://bugzilla.mozilla.org/show_bug.cgi?id=132008]

  • Automated Jar file download

    Hi,
    I was planning download and run a jar file in an automated way.
    I want to do this using an html. When i open the html it should go and download the jar file and then run the jar. I want to do this using java.
    What is the best way to do this. Do i've to use applets for this ?
    Are there any existing examples .
    Thanks in advance
    Jagadeesh

    jag_chandra wrote:
    Java Web StartJava Web Start is a helper application that gets associated with a Web browser. When a user clicks on a link that points to a special launch file (JNLP file), it causes the browser to launch Java Web Start.Who are you telling? I doubt anyone in this thread is unaware of what JWS is.
    Java web Start requires user click , isn't it. Is that a question? If so, please don't forget to add a question mark.
    but the actual situation is i've 100's of jar file url's, i need to scroll through each one of them and run them automatically on java installed machine. I can't get the user to click on them. I want to create a html when opening the html in the browser it should do this bit .
    Can JavaWebstart do this ? How does the user get to the page with 'hundreds of URLs'? Is it perhaps via a link they need to click on?
    If that is the case, replace that link to a href pointing to one (note ONE) JNLP file. In the JNLP launch file, list the 'hundreds of Jars' and mark them as a lazy download. Specify the main-class as a helper class that will go through the lazy download of the 100s of Jars one by one, cache each one then run it.
    The problem is solved with as many clicks as it took to get to your original page, and most of the gory details of the hundreds of Jars are hidden from the end user.

  • How to find directory java program .jar file is in?

    I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
    If the user launches the app from that directory, it's easy.
    The problem is when they do something like "java -jar /dir1/dir2/program.jar".
    When they do that, HOW can I find the directory the .jar file is in - from within the program?

    CasaDelGato wrote:
    I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
    If the user launches the app from that directory, it's easy.
    The problem is when they do something like "java -jar /dir1/dir2/program.jar".
    When they do that, HOW can I find the directory the .jar file is in - from within the program?There is an obscure way that basically consists of the following.
    1. Get the class loader of the class (obviously one in the jar)
    2. Find the 'resource' of that.
    3. Resolve that to a path
    4. Make it absolute if not already.
    5. Extract the directory part.
    2 and 3 are always the hard ones (conceptually and figuring out from the javadocs). There are examples somewhere on the forum.

  • .JAD/JAR file download problems

    Hi,
    I'm having trouble with downloads of .jad and .jar files through WAP onto my mobile phone. The .JAR file downloads fine via the WAP APN but then the .JAD file doesn't download.
    From what I can see, it looks like the j2me app manager on the phone which reads the jad file tries to download the .JAR file directly from the website. The problem here is that since i'm connected to a WAP APN, i have to download through the proxy so there's no direct access to the internet.
    Anyone else have this kind of problem?
    Is is possible to set up the .JAD file somehow so that it downloads through a proxy or takes the current APN to download it??
    This is a HTTPS site but I dont think that would make a difference.
    Cheers,

    Hello,
    I have a very similar problem. Not quite the same tho: i am able to download the JAD and the JAR gets requested. One some phones the JAR gets downloaded properly but on others it blocks after 50 or 60 %.
    We only encounter this problem when downloading through a proxy (defined in the phones wap/internet configuration); when we connect without a proxy everythibng works just fine.
    Another clue might be the fact that we cannot do HTTPS communication (from the device) using a connection that is proxied. (We tested by putting the file on the device using bluetooth).
    Has anybody seen this before? Do you know a solution to this problem?
    Thank you,
    Nick

  • Cached jar files

    Hi.
    I am in the middle of java bean development. As I have to test the java bean I often change the java code, comple it, jar compress it, sign the jar file and put it on to the application server $OH/forms/java directory. The problem I am facing is the JRE on the client side does not refresh / download the newly created jar file. To force the JRE to download it I have to manually delete it from JRE resources.
    I was convinced every time the jar file is changed (date, length ...) the client JRE deletes old resource and downloads the new one. Now I am confused what I could be doing wrong.
    Best regards, Gregor

    Assuming you are using a new version of the JRE (1.6.0_22), so as to be sure you are not dealing with a bug, the JRE will reload the jar if it has changed. However, if the previous session has not been terminated this may not occur. Simply exiting the browser may not accomplish this thanks to changes in IE by Microsoft, which can cause iexplore.exe sessions to continue even though the browser has closed. The best way to know if the session has truly terminated is to review the System tray (next to the clock - lower right corner). If the Java icon is still displayed, the session was not terminated.
    As for your immediate situation, I would recommend disabling caching while you are testing. This will ensure that the current file is always pulled from the server. Set the cache size to 0 in the Java Control Panel (Temporary Internet Files...) and uncheck the box labeled "Keep temporary files on my computer".

  • Can't find jar file

    I am attempting to implement an applet in a pl/sql package. Basically I have copied the format for an implementation in another pl/sql package successfully running on the same server.
    The other package successfully shows the required applet.
    I am using IE 5.5 with the java 1.4.0 plugin
    The code used for the applet
    <APPLET NAME="me" code="ptolemy.plot.plotml.PlotMLApplet" WIDTH="700" HEIGHT="500"
    CODEBASE="/ptolemy/"
    ARCHIVE="plot/plotmlapplet.jar"
    </APPLET>
    Where ptolemy.plot is the directory the jar file is in and
    ptolemy.plot.plotml is the package for the PlotMLApplet.class
    I popped this code in my application after and it worked OK although I am not sure why the jar file needed to be in that directory but that is the ONLY way it will run.
    However when I put this code in instead
    <APPLET NAME="me" code="detail.plan.MyPlan" WIDTH="700" HEIGHT="500" ;
    CODEBASE="/detail/"
    ARCHIVE="plan/plotmlapplet.jar"
    </APPLET>
    where the package is detail.plan and the jar file is in detail/plan it doesn't work.
    This is the error in the java console
    java.io.FileNotFoundException: http://(The server IP address and port is in here) /ability/elmostart.jar
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(Unknown Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(Unknown Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.net.protocol.http.HttpUtils.followRedirects(Unknown Source)
         at sun.plugin.cache.CachedJarLoader.download(Unknown Source)
         at sun.plugin.cache.CachedJarLoader.load(Unknown Source)
         at sun.plugin.cache.JarCache.get(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
         at sun.misc.URLClassPath$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getResource(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class ability.plan.MyPlan not found.
    java.lang.ClassNotFoundException: ability.plan.MyPlan
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 11 more
    Sorry for the turgid detail.
    I'm not sure if the jar file is the problem or the class files. There are only two class files and I compiled thwem in jdk1.3.1
    I am sure that the jar file was ftp'd correctly as i retrieved it and checked the magic numbers of the classes inside.
    trying to do this with just the class files doesn't work either.
    Any help much appreciated. This is turning into a real hair puller of a problem.
    CAse

    now you served your problem, maybe you can help me with mine !
    i have a html file with 2 applets; applet1 calls applet2. to get familiar with jar-files, i build a jarfile with applet2, wrote in the html archive="name.jar" and nothing happend. do you have a tip, what's wrong ??

  • Can Netbeans put a jar file In a jar file?

    I just went through the process of getting Eclipse to create a jar file that would execute from a command prompt using a plugin called fatjar :
    http://fjep.sourceforge.net/
    Details from other thread :http://forum.java.sun.com/thread.jspa?threadID=5219638&tstart=0
    I really would like to use netbeans but i now have the exact same problem trying to make a jar file in netbeans 5.5.1
    I am using a package from icaste.com It has a
    .dll file to put in the windows directory
    JCommSerial_3_0.jar file that contains all the classes
    I can compile and run a file in the IDE and it works fine
    The Jar file does not contain the classes so i get errors when running from command line.
    Here is the layout of my screen and result of run command in IDE
    http://www.acousticlights.com/netbeans.png
    What do I need to try?

    georgemc wrote:
    Why is everyone so obsessed with doing this? The gains are minimal and the problems numerousBecause we are new and don't understand how the java VM actually runs code and the error messages sent by the java machine are cryptic.
    My first attempt at using an external jar in a java program lead me to believe that all of the code for a java program would be in a jar file including external jar files, after all the JDK standard library has tons of jars in it so I assumed the external jar file would be linked (as most other programming compiler/linkers I have worked with in my top down programming life).
    I find out the answer is so simple that the external jar file could not be found by the VM running my jar file. Like I said, if the VM would have just gave me an error that it could not find a file on a specific directory i never would have perused the idea of jar in a jar (fatjar plugin for Eclipse for example)
    Really this is like getting into a race car and not knowing at what RPM to shift gears, sure you can press the pedal and make it go but if you don't understand how it works under the hood you are going to blow the engine if you keep it in first gear.
    I have read many posts on these errors, the reason is the error message is just not very descriptive of the original problem. If I try and open a database called xyz.dbf that has one field defined as lastname, in C for example, I would not give the error message "Lastname could not be found) when indeed the lastname could not be found but the reason it could not be found was because the database xyz.dbf could not be found. Further , adding to the error message that the system is looking for xyz.dbf on drive X- subdirectory -mydatabases would complete the error message and allow the user to fix the error. Just what is a non java programmer that is using my java program suppose to do with an Ecception Error in (main) bla bla bla... I know now I need to check for library files myself within my own java programs and give a better error message to the user before the java VM sends out it's cryptic message.
    Edited by: metron9 on Sep 25, 2007 11:00 AM

  • Getting file from directory where class files are

    hi i want to load a properties file from the directory where my java program is (the class/jar files)
    somebody told me that i could use System.getProperty("user.dir"); but it would only work under windows; under linux it points elsewhere.
    how can i determine the directory where my program lies? sounds easy but i failed :(

    why to hell put it in the classpath? Because that way you don't have to ask the user where the hell he put the file.
    and if i would do so the next question: how can my
    program modify the classpath?It can't. And it doesn't need to.
    isn't there another way to determine the directory
    where the app is started from???If you mean the current, or working, directory, then yes there are several ways to determine that. But that directory need not be where the classes are actually stored. In fact the current directory doesn't even have to be in the classpath.
    Now, here's the best way to deal with properties files. (IMHO of course.) Put them in the classpath, in the same directory or jar file as your classes. Then to create a Properties object and load it from your properties file named e.g. "default.properties" you do this:Properties props = new Properties();
    props.load(this.getClass().getResourceAsStream("/default.properties"));

Maybe you are looking for

  • Broadband dropping out

    It seems that every couple of days at random my broadband connection drops and I have to wait for my home hub to reconnect. It has only been happening during the last week. Last Monday I had an engineer out to reconnect the lines coming into my house

  • How can I see the photos stored on my icloud

    Please forgive my near-total ignorance. I searched different forums for a while and could not find a straightforward answer. I have an Ipad 2. My photos get uploaded to the iCloud. Great. iCloud gets full. Ipad settings show that my photos take up 4

  • PDFs won't download in 64 bit mode

    When I go to a site and click to download a PDF, all I get is a black screen when Safari is in 64 bit mode. If I switch to 32 bit, the PDF opens up just as it always did and I can then save it or print it. What gives?

  • Works with an mp3 tape cassette adapter?

    Well i have two questions. Will the Iphone work with an mp3 cassette adapter? The one you put in a cars tape deck for those who do not know what I am talking about. I read that the a new 3G iphone will be released sometime 2008. Some sites have said

  • Admin Applet could not start after upgrade to 11g

    I recently performed an in-place upgrade of UCM 10g to 11g following the UCM Upgrade documentation. After the upgrade, the Admin Applet could not run using the browser. I have tried on both IE8 and FireFox. Let's use Repository Manager as an example.