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

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 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

  • 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.

  • 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

  • JDeveloper and jnlp.jar or javaws.jar

    Hi, I am developing an applet with the JDeveloper 12c, I am using the JSDK 1.7.
    While implementing the java program I need to use FileOpenService or FileContent classes for that I need to import javax.jnlp.*
    But is not included in the 1.7 JDK,
    My sorce code is like this:
            try {
                FileOpenService fileOpenService = (FileOpenService) ServiceManager.lookup("javax.jnlp.FileOpenService");
                FileContents contents = fileOpenService.openFileDialog(null,null);
    Do you know how can I import this classes at this environment??.
    Thank you in advance.

    what do stacktrace mean??????? Please do not hold down you '?' key.
    One question mark is enough.
    Here is a simple example of a stacktrace..
    If you run this code..public class ShowStackTrace {
      public static void main(String[] args) {
        Object object1 = new Object();
        System.out.println( object1.getClass() );
        Object object2 = null;
        System.out.println( object2.getClass() );
    }It writes this to the console..class java.lang.Object
    Exception in thread "main" java.lang.NullPointerException
            at ShowStackTrace.main(ShowStackTrace.java:6)
    Press any key to continue . . .The first line is program ouput.
    The 2nd & 3rd lines are a stacktrace.
    The stacktrace tells us exactly which line
    of the program failed (line 6), and what
    went wrong (NullPointerException).
    Both Java applets and Java Web-Start
    applications can have a console appear.
    The console will show any stacktraces
    that happen in the code (or it should), and
    you need to find how to open the
    web-start console, on your PC.
    What OS and Java (version) are
    you running?
    And another thing. Please do not
    ignore me. Twice I have asked you
    to post your JNLP file, yet twice you
    have not done so, and not made any
    comment.
    Feel free to ask questions about
    anything I write that is not clear,
    but be warned I will not ask again*,
    for you to show us the JNLP file.
    * Instead, I will just just stop repeating
    myself, and stop trying to help you.

  • Accessing JNLP & jars from webserver through IBM TAM via Webstart

    We have a swing application (running on Windows desktop) that is downloaded from a [Covalent] Apache webserver via webstart. However, when an IBM's Tivoli Access Manager (TAM) authentication server is introduced before the webserver, the webstart download fails since the TAM server is expecting the authentication ID & password. We are not clear on how webstart can provide this authentication information to the TAM server. The swing application uses JRE 1.5 and webstart version is 1.5.
    Has anyone gone through a scenario like this ? Any pointers that help resolve this issue will be greatly appreciated.
    Thanks.

    http://java.sun.com/docs/books/tutorial/deployment/webstart/security.html

  • How do I protect my JNLP, my JARs etc. (with Basic Authentication)???

    hi all,
    i know that there is a FAQ ( [see here|http://lopica.sourceforge.net/faq.html#obfuscate] ) answering a related question with "You can use an obfuscator...". ok, but is there really no other solution?
    this is the simplified folder structure of my application on the server:
    [application]
      [etc]
        xyz.xml
      [jars]
        myapp.jar
      launch.jnlp
    website.jsp
    initial start and basic authentication:*
    my first idea was to secure everything underneath "application" with basic authentication via my web.xml (yes, i'm aware of the security concerns). this means everybody can access my website (here: website.jsp) which contains a start button that links to "launch.jnlp". as soon as the user clicks on it, the browser opens its standard authentication dialog since launch.jsp is in a protected area. after entering the correct credentials the jnlp-file is downloaded and java web start takes over control. first of all it seems as it tries to access the same jnlp-file again (??? --> probably in order to check for changes in the jnlp file --> this is certainly not the case for the initial startup) and then wants to download the relevant jar (myapp.jar). because both resources are protected jws opens its own basic authentication dialog where i have to enter the same credentials the second time. as far as i know, there is no solution to pass the credentials between the browser and the jvm.
    second start and basic authentication:*
    if the user starts my application for the 2nd, 3rd, ... time via desktop-link (set in jnlp-file) there is no need for accessing my website with a browser. therefore only the authentication dialog of jws gets displayed. so far, so good!
    and now the actual problem:*
    during runtime my application (signed with verisign certificate and having all permissions) uses commons-vfs and commons-httpclient to access resources on the same server (e.g. etc/xyz.xml). since they're underneath the protected "application" directory as well, my application needs the same credentials the user already entered in the authentication dialog of jws. now i could retrieve these credentials by calling Authenticator.requestPasswordAuthentication() within my application and passing them to vfs and httpclient. however, doing so opens up jws' authentication dialog again. grrr!!! is there a way to prevent this?
    related thougts:*
    i know i could disable jws' default Authenticatior and set my own Authenticator which might be able to return already entered credentials without opening the dialog a second time. however, it seems that even with <property name="javaws.cfg.jauthenticator" value="none" /> jws still opens its own dialog when acessing the JNLP file and the relevant JARs during the startup/download phase. of course, who else if not jws could handle that phase? my application might not even be downloaded at this point. so i guess setting my own Authenticator would not be a solution either (at least not if i want to secure my jnlp and my jars, too). quite the contrary, it would have to open another dialog... :-(
    my current solution:*
    for the moment i use jws' default Authenticatior which allows me to easily protect all my stuff on the server side (jnlp, jar, etc). i can live with the two login dialogs at the initial startup. and instead of querying the credentials from jws' default Authenticatior at runtime, i set two system properties for username and password in the (protected) jnlp-file, query them at runtime and hand it to vfs and httpclient. this prevents the 2nd (or 3rd) dialog but is definitely not a great solution. most of all i'm not happy with the fact that this somehow "destroys" the container-based security advantage of easily configuring authorized users via a separate mechanism e.g. tomcat-users.xml. now there has to be one master-password that has to be set in the jnlp-file! grrr!
    a possible alternative:*
    i'm not sure but would it be better to secure everything with form-based authentication on the website, and dynamically generate username and password into the jnlp-file? but what happens when the admin changes the password on the server and the user starts its application via desktop-link??? in case of basic authentication i think jws would popup the login dialog again. however, if i use the old username and password generated into the jnlp it won't work. i think the user then has to access the website again. this is not good at all! :-(
    the only real solution:*
    should i write a small application which can be downloaded by everybody and on startup queries the user's credentials, validates them with the help of our server, and uses the javax.jnlp-api to download the secured JARs of my real application? this seems so much overkill! does anybody have experiences with this approach? how difficult is it to implement the whole download/update stuff with javax.jnlp?
    WHAT HAVE I MISSED???
    AM I COMPLETELY WRONG???
    WHAT IS THE EASIEST WAY???
    AND WHAT IS THE BEST WAY???
    thank you so much,
    stephan

    Not sure, whether I understood correctly, what you wanna do - but up to now I can't see any problem.
    if you have a structure like this:
    /ctxroot/
           launch.jnlp
           /app/
               *.jar
               *.whateveryou may use in your web.xml:
         <servlet>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <url-pattern>*.jnlp</url-pattern>
              <url-pattern>/app/*</url-pattern>
         </servlet-mapping>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Application</web-resource-name>
                   <url-pattern>/app/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>bla</role-name>
                   <role-name>fahsel</role-name>
              </auth-constraint>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Subscription</web-resource-name>
                   <url-pattern>*.jnlp</url-pattern>
              </web-resource-collection>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>whatever-realm</realm-name>
         </login-config>
         <security-role><role-name>bla</role-name></security-role>
         <security-role><role-name>fahsel</role-name></security-role>
    ...Than you may use the Service stuff like:
         BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
         URL codeBase = bs.getCodeBase();
         URL pu = new URL(codeBase.toString() + "whatever.bla");
         HttpURLConnection res = (HttpURLConnection) pu.openConnection();
         res.setInstanceFollowRedirects(true);
         res.setRequestMethod("GET");
         res.setConnectTimeout(10 * 60 * 1000);
         res.connect();
         String enc = res.getContentType();
    ...Where is the problem? If you wanna intercept certain "calls" to an app resource, just use a filter, which decides, whether to answer the request directly by itself or to pass it to the JnlpDownloadServlet ...

  • Bug!?! 100% CPU usage when referencing secured JARs in unsecured JNLP

    hi,
    i think i just found a bug in jws but i'm not sure yet. it would be nice if somebody can verify this before i create a bug report.
    this is my JNLP file (test.jnlp):
    <jnlp ...>
      <information>
        <title>Test</title>
        <shortcut online="true">
          <desktop/>
        </shortcut>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="always" policy="always"/>
      <resources>
        <java version="1.6"/>
        <jar href="jar/mySecuredJar.jar" download="eager" main="true"/>
      </resources>
      <application-desc main-class="test.MyTest"/>
    </jnlp>this is the file structure on the server:
    download/      // public folder
       test.jnlp
       jar/        // private folder secured via basic authentication
          mySecuredJar.jarwhen i access the jnlp file for the first time via browser the jws login dialog opens asking me for credentials since test.jnlp internally references a jar that is in a secured area. while this jws dialog is open my cpu usage is normal - javaw.exe takes about 5%.
    however, when i open my application for the 2nd time via desktop shortcut, the jws authentication dialog opens again (jws looks for updates of my jar before the application starts) and javaw.exe takes about 95% of my cpu as long as the dialog is open!!!
    when i put the jnlp file in the secured area as well, everything works smoothly. however, this forces users to enter credentials in a browser authentication dialog (browser needs to access the secured jnlp) as well as in the above mentioned jws authentication dialog.
    can anybody reproduce this? should i file a bug report?
    i tested this on win xp with jre 1.6.0_11.
    regards,
    stephan

    Please, [file |http://javafx.netbeans.org/issues/enter_bug.cgi?component=javafx] an issue on it.

  • How can I create  program JNLP

    I have a program (javafx)
    this program includ swingButton to open SwingFileChooser.
    In netbean6.71 can run this program on standard execution
    run command in command windows
    javafx -jar test.jar the program is ok
    but
    I run the test.jnlp ,swing button is not ok
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/D%3A/JAVA/MyBlog/test2/dist/" href="test2.jnlp">
    <information>
    <title>test2</title>
    <vendor>kevnlin</vendor>
    <homepage href="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/D%3A/JAVA/MyBlog/test2/dist/"/>
    <description>test2</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <property name="jnlp.packEnabled" value="true"/>
    <property name="jnlp.versionEnabled" value="true"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="test2.jar" main="true"/>
    <jar href="lib/customizer.jar"/>
    <jar href="lib/dt.jar"/>
    <jar href="lib/jmf.jar"/>
    <jar href="lib/tools.jar"/>
    <jar href="lib/mediaplayer.jar"/>
    <jar href="lib/multiplayer.jar"/>
    <jar href="lib/sound.jar"/>
    </resources>
    <application-desc main-class="com.sun.javafx.runtime.main.Main">
    <argument>MainJavaFXScript=test2.Main</argument>
    </application-desc>
    <update check="background">
    </jnlp>
    how can I crate jnlp with javafx command

    how can I crate jnlp with javafx command Run javafxpackager
    Note: the generated JNLP is incorrect. Not sure if that's the source of your troubles, but anyway, it is better to add a final slash to the update tag:
    {color:#8000A0}*<update check="background"/>*{color}

  • Deploying Application Without codebase and an extension (installer.jnlp)

    Hi,
    It seems that the deployment file can be relative to launch.html but the extension file requires the codebase attribute.
    This launch fails
    http://www.dksy.net/auctionzoom/downloads/download/jpawebstart-no-codebase/launch.html
    this launch succeeds
    http://www.dksy.net/auctionzoom/downloads/download/jpawebstart/launch.html
    In the second case, the codebase attribute is specified
    <jnlp codebase="http://www.dksy.net/auctionzoom/downloads/download/jpawebstart/" href="installer.jnlp" spec="1.0+">This reference documents the deployment file (launch.jnlp), but not the extension (installer.jnlp).
    http://java.sun.com/docs/books/tutorial/deployment/deploymentInDepth/deployingWithoutCodebase.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
        <head>
            <title>Test page for launching the application via JNLP No Codebase</title>
        </head>
        <body>
            <h3>Test page for launching the application via JNLP No Codebase</h3>
            <p><a href="javascript:deployJava.launchWebStartApplication('launch.jnlp');">Launch Paystation application</a></p>
            <script src="http://java.com/js/deployJava.js"></script>     
        </body>
    </html>
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp href="launch.jnlp" spec="1.0+">
        <information>
            <title>JPAWebStart</title>
            <vendor>AZ</vendor>
            <homepage href=""/>
            <description>JPAWebStart</description>
            <description kind="short">JPAWebStart</description>
            <shortcut online="true">
                <!-- create desktop shortcut -->
                <desktop/>
                <!-- create menu item for this app under the major heading -->
                <menu submenu="JPAWebStart"/>
            </shortcut>
            <related-content href="README.TXT">
                <title>Readme File</title>
                <description/>
            </related-content>
        <offline-allowed/>
    </information>
        <security>
            <all-permissions/>
        </security>
        <update check="background" policy="prompt-update"/>
        <resources>
    <j2se version="1.6+"/>
    <jar eager="true" href="JPAWebStart.jar" main="true"/>
        <jar href="lib/antlr-2.7.6.jar"/>
    <jar href="lib/asm.jar"/>
    <jar href="lib/asm-attrs.jar"/>
    <jar href="lib/cglib-2.1.3.jar"/>
    <jar href="lib/commons-collections-2.1.1.jar"/>
    <jar href="lib/commons-logging-1.1.jar"/>
    <jar href="lib/dom4j-1.6.1.jar"/>
    <jar href="lib/ehcache-1.2.3.jar"/>
    <jar href="lib/jdbc2_0-stdext.jar"/>
    <jar href="lib/jta.jar"/>
    <jar href="lib/hibernate3.jar"/>
    <jar href="lib/hibernate-tools.jar"/>
    <jar href="lib/hibernate-annotations.jar"/>
    <jar href="lib/hibernate-commons-annotations.jar"/>
    <jar href="lib/hibernate-entitymanager.jar"/>
    <jar href="lib/javassist.jar"/>
    <jar href="lib/ejb3-persistence.jar"/>
    <jar href="lib/derby.jar"/>
    <jar href="lib/log4j-1.2.15.jar"/>
    <jar href="lib/jardiff.jar"/>
    <jar href="lib/jnlp-servlet.jar"/>
    <jar href="lib/jnlp.jar"/>
    <extension href="installer.jnlp" name="Installer" version=""/>
    </resources>
        <resources>
            <jar href="JPAWebStartMain.jar" main="false"/>
        </resources>
        <application-desc main-class="demo.main.JPADemo">
        </application-desc>
    </jnlp>
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp href="installer.jnlp" spec="1.0+">
        <information>
            <title>Installer</title>
            <vendor>AZ</vendor>
            <offline-allowed/>
        </information>
        <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.6+" />
            <jar href="installer.jar" main="true" />
        </resources>
        <installer-desc main-class="com.az.installer.Installer">
            <!-- Application Arguments -->
        </installer-desc>
    </jnlp>

    Can't see any question mark and can't actually guess one, you wrote out quite a dissertation on it. Are you giving away 10 dukes for the first one telling you 'CORRECT!' (I really hope so)?
    Bye.

Maybe you are looking for

  • Error while running Cur Trans Package

    Hi Experts, I am getting an error message at the time of running FX Restatement package. SPRunConversion Version 2.08 Warning : No Rate found in the opening period ERROR FX-280 Timeid=20080100 - Nothing Extract from Fact Tables " I saw in the Fact Ta

  • Consuming portlet get error ADF_FACES-60096:Server Exception during PPR

    hi all, i got a strange error when consuming portlet in webcenter portal application. i'm using jdeveloper 11.1.1.5 and webcenter framework extension 11.1.1.4 i have a Portlet Producer Application and a Standards-based Java Portlet (JSR 286) in it. T

  • Preferences, Project, can't change project duration or default layer duration

    Having trouble changing the project duration or default layer duration in Preferences. I change them and restart Motion and nothing is changed. Probably overlooking something. Help

  • Why does the font change when I combine files?

    I am trying to combine PDF files into one document using the "combine files" tool online. The new file that is created changes some of the fonts to different fonts (I think it is having difficulty with times new roman in particular). I need to keep t

  • MDG-S specific UIBB

    Hi As per SAP help Show specific UIBBs for the UI-configuration BS_OVP_BP_ALL Run transaction SE80, select the package MDG_BS_BP_BOLUI and choose Web Dynpro Web Dynpro Applicat. BS_OVP_BP Applic. Configurations BS_OVP_BP_ALL . Double-click BS_OVP_BP_