JNLP jar paths

I have my jnlp with the main jar files, and another folder of jars elsewhere that i wish to reference in the jnlp file.
However i'm seeng some errors
If i have a directory structure as follows
C:\Folder\App\install.jnlp
C:\Folder\App\*.jar
C:\Folder\Common\*.jar <== trying to access these
<jar href="/Common/jars/cms/metalthemer.jar"/>
calling from the command line:
javaws -import -codebase file:///C:/Folder/App/ c:\Folder\App\install.jnlp
Worst thing is in the wrapped exceptions
it's trying to find
c:\Folder\App\on\jars\cms\metalthemer.jar
notice that 'on' which doesn't exist, and it is actually part of Comm_on_
since when i play with the HREF in the jar tag, i get 'mon', 'on' etc etc
Thanks

bump
filed a bug on this also

Similar Messages

  • Where do you get jnlp.jar for Mac Leopard 10.5.5

    Hello,
    I am trying to use Persistence in JNLP on a Mac 10.5.5 with either 1.5 or 1.6. I have searched
    my local disk the Mac developer web site and this website for "jnlp java Mac Leopard" no useful results.
    Where can I get a jnlp.jar file that works on a Mac?
    Rinaldo

    I was able to get the question answered on the mailto:[email protected] list.
    My friend http://www.google.com/search?q=jnlp.jar+mac+java&ie=utf-8&oe=utf-8&aq=t answered it.
    Greg also provided some very useful information, especially the mdfind javaws.jar command
    http://lists.apple.com/archives/Java-dev/2008/Nov/msg00052.html
    I see that in JDK 1.5, javaws.jar is included. For now I will assume that the javaws.jar classes have been moved to javaws.jar
    jar tvf ./Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/javaws.jar | grep jnlp
            0 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/
      3147 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ApiDialog.class
      1626 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletAudioClip$1.class
      3922 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletAudioClip.class
      1377 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$1.class
       990 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$2.class
      1329 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$AppletContainerContext$1$1.class
      1452 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$AppletContainerContext$1.class
      2942 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$AppletContainerContext.class
      1551 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$AppletContainerStub.class
       710 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer$LoadImageAction.class
      4841 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainer.class
       234 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/AppletContainerCallback.class
      1362 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/BasicServiceImpl$1.class
      1158 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/BasicServiceImpl$2.class
       992 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/BasicServiceImpl$BasicServiceBrowser.class
      2397 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/BasicServiceImpl.class
      1279 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/CheckServicePermission.class
       868 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/ClipboardServiceImpl$1.class
      1668 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/ClipboardServiceImpl$2.class
      2787 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/ClipboardServiceImpl.class
      1159 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$1.class
      1652 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$10.class
      1318 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$2.class
      1474 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$3.class
      1679 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$4.class
      2519 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$5.class
      1739 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$6.class
      1942 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$7.class
      1517 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$8.class
      1445 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$9.class
      1398 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$DefaultProgressImpl$1.class
      2914 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$DefaultProgressImpl.class
      2254 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl$ProgressHelper.class
      8288 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/DownloadServiceImpl.class
       900 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtendedServiceImpl$1.class
      1051 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtendedServiceImpl$2.class
      3188 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtendedServiceImpl.class
       707 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtensionInstallerServiceImpl$1.class
       961 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtensionInstallerServiceImpl$2.class
       711 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtensionInstallerServiceImpl$3.class
      5918 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/ExtensionInstallerServiceImpl.class
       787 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$1.class
       820 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$2.class
       928 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$3.class
       791 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$4.class
       792 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$5.class
      1002 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl$6.class
      4353 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileContentsImpl.class
      2155 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileOpenServiceImpl$1.class
      2323 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileOpenServiceImpl$2.class
      1144 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileOpenServiceImpl$WindowsAltFileSystemView$FileSystemRoot.class
      3017 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileOpenServiceImpl$WindowsAltFileSystemView.class
      2974 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileOpenServiceImpl.class
      2847 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileSaveServiceImpl$1.class
      3257 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/FileSaveServiceImpl.class
      1087 Fri Sep 05 10:32:48 EDT 2008 com/sun/jnlp/ImageCache.class
      1937 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPCachedJarURLConnection$1.class
      5559 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPCachedJarURLConnection.class
       940 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPClassLoader$1.class
       928 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPClassLoader$2.class
      1285 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPClassLoader$3.class
    12413 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPClassLoader.class
      2555 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPFileFilter.class
      6074 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JNLPRandomAccessFileImpl.class
       788 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JnlpLookupStub$1.class
      2918 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/JnlpLookupStub.class
      2044 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/MeteredFileOutputStream.class
       938 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$1.class
      1022 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$10.class
      1805 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$11.class
      1023 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$2.class
       845 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$3.class
       877 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$4.class
       981 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$5.class
       875 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$6.class
       871 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$7.class
       885 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$8.class
       974 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl$9.class
      7991 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PersistenceServiceImpl.class
       809 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PrintServiceImpl$1.class
      1189 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PrintServiceImpl$2.class
       969 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PrintServiceImpl$3$1.class
      1717 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PrintServiceImpl$3.class
      2986 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/PrintServiceImpl.class
      1441 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/SingleInstanceServiceImpl$1.class
      1673 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/SingleInstanceServiceImpl$TransferListener.class
      3938 Fri Sep 05 10:32:50 EDT 2008 com/sun/jnlp/SingleInstanceServiceImpl.class
         0 Fri Sep 05 10:32:48 EDT 2008 javax/jnlp/
       258 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/BasicService.class
       251 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/ClipboardService.class
      1392 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/DownloadService.class
       349 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/DownloadServiceListener.class
       309 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/ExtendedService.class
       659 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/ExtensionInstallerService.class
       598 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/FileContents.class
       370 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/FileOpenService.class
       430 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/FileSaveService.class
      1451 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/JNLPRandomAccessFile.class
       688 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/PersistenceService.class
       350 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/PrintService.class
       994 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/ServiceManager.class
       303 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/ServiceManagerStub.class
       185 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/SingleInstanceListener.class
       250 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/SingleInstanceService.class
       472 Fri Sep 05 10:32:50 EDT 2008 javax/jnlp/UnavailableServiceException.class

  • Why isn't jnlp.jar signed by Sun?

    The jnlp.jar in the developer pack is not signed with Sun's certificate. Why is that? An omission or intentional?
    If I'm delivering my app signed with my Verisign cert, I have to now deliver jnlp.jar also signed with my cert, right?
    Thx,
    Max

    The jnlp.jar is part of Java Web Start, so no - you don't have to sign and supply it, the JWS install takes care of it for you.
    Cheers,
    Gavin

  • Jnlp.jar

    Author: bonnaire
    Hello,
    I wanted to make an application usable through JavaWebStart technology, it
    needs to
    read and write files on the local disk so, as I have seen, I need the
    FileOpenService and FileSaveService of the javax.jnlp API.
    But I can't find jnlp.jar ! I use jdk1.4 and I have installed the latest javaWebstart
    pack :
    javaws-1_0_1_02-win-int.exe.
    Can you tell me what have I missed ?
    Thanks
    Richard

    The jnlp.jar can be found in the Webstart Developers Pack it is not part of the Webstart Client.
    On the other hand if your application needs access to the disk you don't need those services. Signing your Jar Files and granting all-permission should do the trick

  • Retrieving Jar path in the HD from within the jar?

    I have a small problem. I wrote a program which is packed in a jar file and this program is able to compile and run java files (Which I do by running javac and java processes) but the kind of files that this program compiles requires some other libraries inside the same package (In the jar file) so I am wondering how can I retrieve the jar path in the harddisk from within this jar because at the moment I ask the user where the program is and I think it is kind of ugly to ask the user where the program is from within the exact same program we are looking for.
    Hope I made myself understandable.
    Best Regards
    NooK

    Thanks for the answer. I mistakenlly ended writing a new thread (New to the forum)
    but if you would kindly look here, I have other problem now which I have been working on for a whole day.
    http://forum.java.sun.com/thread.jsp?thread=524717&forum=31&message=2514471
    Best Regards
    NooK

  • Setting JAR path?

    When trying to deploy an ear on my local machine using the following
    command:
    iasdeploy deployapp -verbose foo.ear
    I am getting the following error:
    Severity 1: The JAR Path is : null
    com.iplanet.ias.tools.buzz.iascom.DeployException: Error getting JAR
    path:
    at
    com.iplanet.ias.tools.buzz.iascom.DeployEngine.deployToHost(Unknown
    Source)
    at com.iplanet.ias.tools.buzz.iascom.DeployThread.run(Unknown
    Source) localhost:Error getting JAR path:
    Is there somewhere in ksvradmin or somewhere else to set the JAR path?
    thanks in advance,
    Matt

    Hi,
    Check the application server class path in
    "Software/iPlanet->Application Server->6.0->Java.
    Regards
    Raj
    [email protected] wrote:
    When trying to deploy an ear on my local machine using the following
    command:
    iasdeploy deployapp -verbose foo.ear
    I am getting the following error:
    Severity 1: The JAR Path is : null
    com.iplanet.ias.tools.buzz.iascom.DeployException: Error getting JAR
    path:
    at
    com.iplanet.ias.tools.buzz.iascom.DeployEngine.deployToHost(Unknown
    Source)
    at com.iplanet.ias.tools.buzz.iascom.DeployThread.run(Unknown
    Source) localhost:Error getting JAR path:
    Is there somewhere in ksvradmin or somewhere else to set the JAR path?
    thanks in advance,
    Matt

  • To be included jar path containing white space....

    hi,
    I have develop an application which is linked with some jar files at run time. Now those jars are in my application directory and as I have put my project in path c:\program files\proj(which contains white space) so while running the application its producing following error:
    Caused by: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/with space/repro-designer.dir/CO
    NSOLE-INF/lib/ant-1.7.0.jar
    at java.net.URI$Parser.fail(URI.java:2809)
    at java.net.URI$Parser.checkChars(URI.java:2982)
    at java.net.URI$Parser.parseHierarchical(URI.java:3066)
    at java.net.URI$Parser.parse(URI.java:3014)
    at java.net.URI.<init>(URI.java:578)
    at java.net.URI.create(URI.java:840)
    ... 21 more
    14:11:13,734 DEBUG [Application] Application destroying...
    14:11:13,734 DEBUG [Application] ContextFactory destroying...
    14:11:13,750 DEBUG [Application] ContextFactory destroyed.
    14:11:13,750 DEBUG [Application] Application destroyed.
    and if i put the project in such a path where isnt any white space, its working fine. Can any one help me out....
    regards
    Sudip

    try this :
    c:\program%20files\proj

  • How to change Module Jar path for web services

    I got an error when I did -> Generate Web Service Files to create Web Service.
    Error is C:\Document and Settings\user\.jstudio\..\xmlservices.jar doesn't exsit.
    I know I put these jar files in my D:\Sun\...\modules directory. I went to Tools->Options->IDE Configuration->System->Modules->Web Service.
    Look the properties Module JAR. The path value in this property is wrong. It uses c:\Document and Settings\user... I want to change this value to D:\Sun\... But it doesn't allow me to change this value. The field is not editable. Anybody knows where I can change this directory path value?
    Thanks

    I got an error when I did -> Generate Web Service
    Files to create Web Service.
    Error is C:\Document and
    Settings\user\.jstudio\..\xmlservices.jar doesn't
    exsit.
    I know I put these jar files in my D:\Sun\...\modules
    directory. I went to Tools->Options->IDE
    Configuration->System->Modules->Web Service.
    Look the properties Module JAR. The path value in
    this property is wrong. It uses c:\Document and
    Settings\user... I want to change this value to
    D:\Sun\... But it doesn't allow me to change this
    value. The field is not editable. Anybody knows where
    I can change this directory path value?
    ThanksI seem to be getting the same error when clicking on "Generate Web Service Files":
    "Error is C:\Document and Settings\user\.jstudio\..\xmlservices.jar doesn't exsit."
    I am following the example below and I'm just out of ideas. Can anyone help.
    Thanks.
    http://swforum.sun.com/jive/thread.jspa?threadID=53040&tstart=30

  • BasicService.showDocument - Can the URL be in a JNLP JAR Resource?

    I'm trying to use BasicService.showDocument( url ) to display a help file that is part of a JAR file in the JNLP resource list.
    Getting the URL succeeds using...
    url = getClass().getResource( "/com/egh/help/files/tutorial.html" );
    and that file is indeed present relative to my help-s.jar file which is in the JNLP resource list.
    but then IE comes up and reports the page cannot be displayed...
    jar:file:/C:/Program%20Files/Java%20Web%20Start/.javaws/cache/http/Droger.egh.com/P80/DMdemo/RMhelp-s.jar!/com/egh/help/files/tutorial.html
    Would this be expected to work? Or would I have to use an absolute URL for this to work? (which, btw, would defeat the point).
    ... Roger

    That may be true, but it is the BasicService.showDocument call that is building the URL. To me it is a JAR based "relative" resource. And I have no way to know the Java Web Start name/location of the cached jar.
    If there is a simple way to make it work, SUN will hopefully do so in the BasicService, otherwise the value of it is completely undermined.

  • JNLP jar (re)download

    Hello All ,
    I might be having a fundamental misconception here ; if so , please help me put it right.
    I have a JNLP file which is automatically generated (automatic here actually indicates that a script will populate a particular field in the file (which holds references to some jar files). The rest of the file does not change)).
    I am using the <version> attribute of the <jnlp> tag to indicate the version of the application.
    My expectation is that each time this version attribute changes , the .jnlp file wlil be re-downloaded and also will be re-downloaded each of the jar files it references.
    Below is a representative code sample :
    <code>
    <?xml version="1.0"; encoding="utf-8"?>
    <jnlp
    spec="1.0+";
    codebase="$$codebase"
    href="$$name"
    version="%VERSION%">
    <!-- version to be filled in by a script-->
    <information>
    . <!-- Some information here -->
    </information>
    <security><all-permissions/></security>
    <resources>
    <j2se version="1.6+"; initial-heap-size="32m" max-heap-size="512m" />
    <jar href="my.jar";/>
    <jar href="my2.jar";/>
    <property name="property1" value="value1" />
    <extension href="another.jnlp"; /> <!-- another .jnlp contains a list of jars that is generated by another script -->
    </resources>
    <application-desc main-class="my.main";/>
    </jnlp>
    </code>
    The following scenario is what I am trying to implement :
    a)Deploy the jnlp application on a server and access it by using http://localhost:XXXX/myapp
    b)It downloads and installs and runs.
    c)I close the app.
    d)I now change one of the jar files referenced in another.jnlp and also some contents in my.jar and my2.jar.
    e)I now repeat steps a) and b) (the .jnlp files "version" attributes are updated accordingly)
    EXPECTATION : The jnlp file is re-downloaded and so are all the referenced jars[of particular interest my2.jar and any referenced jars in another.jnlp].
    OBSERVATION : The jnlp file is re-downloaded but the OLD jars are still being used (I know its the old jars because I change something in the jar on the server and the change is not reflected in the client browser).
    If I clear the java cache by doing a "javawas - uninstall" , I get the behaviour I seek in EXPECTATION ; however I do not want to clear the cache everytime I update some jar or other ; I want jnlp to detect that a jar has changed and re-download it.
    How do I go about achieving this?

    elie_nasrani wrote: I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Web start offers lazy downloads, as well as the DownloadService* (DS) to help with this kind of problem.
    'Lazy' means the resource is only downloaded when needed, but using the DS offers even greater control, even to the extent of manually blocking a download - if needed.
    * e.g. of the Download service, be sure to follow the links.
    <http://www.physci.org/jws/#ds>
    As far as 'signing' goes, I cannot imagine how that would help for your problem. Not only are signed Jar's (at least slightly) larger, but they can also be used by JWS apps. coming from other domains! If your app. is sandboxed, I strongly recommend keeping it as unsigned code.
    Why is your JNLP file exposed to the general public? Don't the users have to log in before they can get to the page with link to the application JNLP?
    If that is the case, the only chance for users who are not logged in to launch it, is if a friend sends them a direct link to the JNLP file.
    As an aside, I generally do not have time to look at posts with no 'dukes' assigned (see links at upper left), if getting a solution is important to you, it is a good idea to add some.

  • Application jar path??

    Hi all:
    I have the following situation:
    We're writting an application where all the class files are jar'ed together.
    We're supplying html help with the application.
    The file structure will look like this after installation:
    appDirectory
    - app.jar
    - helpDirectory
    --- aBunchOfHelpFiles.html
    The problem I have is this. I want to be able to get the path of the helpDirectory from within the application so that I can display them in some html enabled frame. getting the user's current directory is easy, getting the user's home directory is easy, but how do you get the directory where the jar is located? I've been trying to use this approach:
            URL urlAppDir = ClassLoader.getSystemResource("package/App.class");
            File fileAppDir = new File(urlAppDir.getFile());
            while(!fileAppDir.isDirectory()){
                fileAppDir = fileAppDir.getParentFile();
                System.out.print("fileAppDir = " + fileAppDir);
                System.out.println(" :  " + fileAppDir.isDirectory());
            }but it produces this output...
    fileAppDir = file:\C:\A\B\C\app.jar!\package : false
    fileAppDir = file:\C:\A\B\C\app.jar! : false
    fileAppDir = file:\C:\A\B\C : false
    fileAppDir = file:\C:\A\B : false
    fileAppDir = file:\C:\A : false
    fileAppDir = file:\C: : false
    fileAppDir = file: : false
    fileAppDir = null
    <null pointer exception because fileAppDir became null and tried to execute isDirectory() method>
    Why doesn't this walk up work? And is there a better approach for getting the directory in which an application's jar file exists?
    Thanks in advance,
    Jeremy

    I found the solution to the walk up problem I was having, but I'm not exactly sure why the solution works. I needed to get the AbsoluteFile of the ParentFile. If anyone could explain this, or offer a simpler/better way of attaining an application's jar file's directory, I'd appreciate it.
            URL urlAppDir = ClassLoader.getSystemResource("package/App.class");
            File fileAppDir = new File(urlAppDir.getFile());
            while(!fileAppDir.isDirectory()){
                //  Get the AbsoluteFile of the parent file... 
                //  I'm not entirely clear what the difference is, but it works.
                fileAppDir = fileAppDir.getParentFile().getAbsoluteFile();
                System.out.print("fileAppDir = " + fileAppDir);
                System.out.println(" :  " + fileAppDir.isDirectory());
            }Thanks,
    Jeremy

  • Control JNLP jar files download time

    Hello,
    I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Any Help would be appreciaetd
    regards

    elie_nasrani wrote: I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Web start offers lazy downloads, as well as the DownloadService* (DS) to help with this kind of problem.
    'Lazy' means the resource is only downloaded when needed, but using the DS offers even greater control, even to the extent of manually blocking a download - if needed.
    * e.g. of the Download service, be sure to follow the links.
    <http://www.physci.org/jws/#ds>
    As far as 'signing' goes, I cannot imagine how that would help for your problem. Not only are signed Jar's (at least slightly) larger, but they can also be used by JWS apps. coming from other domains! If your app. is sandboxed, I strongly recommend keeping it as unsigned code.
    Why is your JNLP file exposed to the general public? Don't the users have to log in before they can get to the page with link to the application JNLP?
    If that is the case, the only chance for users who are not logged in to launch it, is if a friend sends them a direct link to the JNLP file.
    As an aside, I generally do not have time to look at posts with no 'dukes' assigned (see links at upper left), if getting a solution is important to you, it is a good idea to add some.

  • Jnlp .jar download

    Hi,
    I am making a java web start application. I have so many jar files, which are being used by that application...I am adding the jar files like this:
    <jar href="lib/appframework-1.0.3.jar"/>
    <jar href="lib/swing-worker-1.1.jar"/>
    Actually When I try to run the application offline, it works fine. But when I try to run the application online, it gets very slow...it takes time to download jar files(I think so).....and it takes five minutes to execute a functionality by the application. I don't know how can I fix this. The size of some of the jar files in the resources are big...
    Please let me know the solution of this problem!
    Thank you.

    Please post full JNLP file here.
    How big is "big" here?
    Do you have <update check="background"> in your JNLP file?
    Debug hints:
    * Enable java console, enable verbose tracing (http://download.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html#gcexdf)
    and see what is going on when application takes longer than you expect
    * Use http sniffer tools to trace network connections on startup (e.g. wireshark). Your goal is to have 0 network connections when application is cached.

  • JNLP Jarring - Class Not Found

    Hi,
    And again, java web start is one step ahead of me ;p
    (re the last post)
    I have simplified my requirements and have restricted my application to just one look and feel. That is in the original downloaded jar it came with (signed).
    My application has now gone through several versions, and each version has had several jar files containing different classes and things. I have never yet needed to specify a jar file in the manifest of another jar file to make it work.
    However, it cannot load the look and feels now. In the main class, I use:
    UIManager.setLookAndFeel("com.incors.plaf.kunststoff.KunststoffLookAndFeel");- where the look and feel is in a jar file pointed to in my classpath. Run locally, it works fine, but run over JNLP it throws a ClassNotFoundException.
    If I change it to:
    UIManager.setLookAndFeel(new com.incors.plaf.kunststoff.KunststoffLookAndFeel());Then the look and feel loads ok in both local and jnlp modes, but now it cannot find UI classes for things like JButtons when running over JNLP.
    Im using exactly the same jar file each time. Can anyone help?
    DS

    Got to stop doing this..
    Those of you having problems in this area take a look at these two links..
    http://developer.java.sun.com/developer/bugParade/bugs/4155617.html
    and
    http://forum.java.sun.com/thread.jsp?forum=38&thread=166873
    Its a botch method round it (and should have been fixed by now..?) but it basically entails providing a class loader gotten from a JComponent.
    Ive created a little class subclassing JApplet:
      private static class LFLoader extends JApplet
        public LFLoader() {}
        public void load()
          try
            UIManager.setLookAndFeel(new com.incors.plaf.kunststoff.KunststoffLookAndFeel());
            UIManager.getLookAndFeelDefaults().put( "ClassLoader", cl );
            aei.gui.components.JJSetup.setSimpleLFUsed(false);
          catch(Exception e)
          { System.out.println(e.getMessage()); e.printStackTrace(); }
      }You cant just call new Applet().getClass().getClassLoader() for some reason.
    The type of classloader displayed when the application starts..? sun.misc.Launcher$AppClassLoader if running locally, or com.sun.jnlp.JNLPClassLoader if over JNLP.
    My app now works but .. subclassing an applet to get it going .. eech!
    DS

  • About tools.jar path

    Hi
    What is the path for tools.jar
    Where should it place in Tomcat folder
    Give path in detail.
    Thanks in advance

    Hi, I have a problem using the getProperty("user.dir") in a jPanel; in main when I run it works fine; but i need the directory to draw a image in the Jpanel so when i try to use this without running when I'm drawing a menu it returns not the class directory but my netbeens directory. Help me, cause I'm new in this lands.
    Edited by: Pedro_G on Jan 6, 2008 11:45 AM
    Edited by: Pedro_G on Jan 6, 2008 11:51 AM
    Edited by: Pedro_G on Jan 6, 2008 11:52 AM

Maybe you are looking for

  • I am having keyboard problems when trying to boot up an OS (bootcamp on Mac Mini Server)

    I recently tried using bootcamp on my new Mac Mini Server. I uploaded a windows ISO Image perfectly the way it asked, Windows 7, I followed the correct steps, euqally divided one of the hard drives, and I was ready to actually set up the new Windows

  • How do I install Boot Camp drivers without the Mac OS disc?

    When I installed OS X Lion for my Macbook Pro, I purchased it off the Apple Store (so I don't have the disc.) Is there any way possible to download the drivers I need without the disc?

  • How to adjust VCORE in MSI Pro-E X58?

    Hey guys; I've built my first rig and I'm interested in overclocking the i7 I've bought. I've already read a lot on OC'ing and the potential hazards that come with it. In any case, I own the MSI Pro-E X58 and was looking to OC. I've steadily increase

  • Two OO options but is either right?

    I posted something similar on LAVA recently, but this is slightly different, and since different people frequent different forums, I thought I'd throw it out over here. Sorry to those of you that have read something similar already. I have some class

  • Mail.app will not reopen after closing app

    I am using a MacBook Pro with OS X 10.5.8 and Mail.app 3.6 (936). I have all current updates installed. My problem is that I will be using mail.app (configured as an IMAP account) all day and close the application without any issues, but if I reopen