Classpath from Web Start

Hello!
I need make following funcionality : from GUI application, opne new JFrame in another JVM.
I do it like ->
                String mainClass = MainClass.class.getName();
                String classPath = System.getProperty("java.class.path");
System.out.println(" classpath -> " + classPath ); // when run it from Web Start in output see :   claspath -> C:\Program Files\Java\jre6\lib\deploy.jar
                ProcessBuilder pb = new ProcessBuilder( "java", "-classpath", classPath, mainClass );
                try {
                    taProcess = pb.start();
                } catch (IOException e) {
                    e.printStackTrace();
                }When I run it from my IDE - everything working fine. I can run something in other JVM.
But if I run it from Java Web Start, I get wrong classPath (web starts classPath)
Question is : How can I get my application class path, when I run it from Web start?? ( press on jnlp link)

You code make use of manifest of the jar file to reload the classpath.
THanks,
Jyno

Similar Messages

  • Capturing audio using jmf from web start

    Hi everybody,
    Currently im working on a project related with audio capturing in client side. Clients will access the application from web start. jmf will be used to capture audio. Additionally, i dont want users to install jmf.
    At first, for testing purposes i wrote a small and simple program that only captures audio and plays it again. It works fine as a standalone application. However, it did not work if i deploy the same program on the web start, doing all required configurations carefully for web start deployment.
    I found the problem is that required capture devices could not be detected when the program is run from web start.
    I searched forums and internet and made some trials to solve and idendify the problem. i want to share you the results:
    At first , i installed jmf to my machine, some jars (jmf.jar, sound.jar,...) and a jmf.properties file are extracted to a directory in my machine. Then, after copying jmf.jar and jmf.properties file to some folder, i uninstalled jmf. Then i created a simple project for testing purposes that captures audio and plays it back.i created this project from eclipse IDE and and set its classbath to the folder which contains only jmf.jar and jmf.properties. It runs successfully. However, if i remove jmf.properties from this file, project does not run, no device can be found. I strongly think, this means that, this jmf.properties file is necessary to detect any audio capture device and hence to run any jmf program that captures auido.
    If i deployed the same project from web start, it did not work as i mentioned, since no audio device can be found because of the lack of jmf.properties file. However, if i install jmf again, since the jmf.properties is created, the project runs from web start too. The interesting thing is that, if i uninstall jmf
    but only create the directory that only contains jmf.properties again, project still runs from web start. If i remove this file from that directory projects does not run again.
    It seems that, this jmf.properties file is impornt for detecting audio capturer devices. It is created in the phase of jmf installation by jmfregistry or jmfinit and is unique for the machine.
    Finally, i conclude that in order to run any project that captures auido from web start without installing jmf, a jmf.properties file should be created for each client machine automatically (in a silent way) before execution which means that jmfregistry or jmfinit should be run silently before execution to create this jmf.properties. Is there anybody that knows antying to  achieve this ?
    Any suggestions about the topic rather than the answer to the specific question above will also be appreciated greatly. Thanks a lot in advance.

    Hi
    I am working on a similar requirement. Please let me know if you have a solution.
    Thanks in advance.

  • How to get data passed back to server from Web Start client ?

    dear experts,
    my web application allows users to launch a web start window from the jsp page, after users enters some data in the web start page and press "OK", the data entered should be passed back server for process. i just have not much clue how to do this....
    thanks.

    Use the java networking library to send a request to a url that takes the arguments you want to pass in.
    Example:
    URL url = new URL("http://yourserver/yourhandler.do?arg1=foo&arg2=bar");
    HttpURLConnection conn = (HttpURLConnection) URL.openConnection(url);
    ... any output testing, etc...
    conn.disconnect();It's not the prettiest, but it ought to get the job done.
    You should probably (at least) use the BasicService to get the codebase back to the server that served up the jnlp file.
    -Mike

  • 2 way communication - talk to server from web start app and vice versa

    I want to send status messages between my web start application and services running on the web server computer. I havent been able to find any examples on this. Can I communicate over http? Do I need to set up a separate connection to a port and communicate on my own? any ideas on how to do this?
    thanks

    ''Roland Tanglao [[#answer-698502|said]]''
    <blockquote>
    Hi scruffy90:
    You wrote "LG G2 and Samsung Galaxy Note 3. Both on Android 4.4.2 Firefox for Android Ver. 35.0.1 "
    I just tried switching between HSPA+ aka 3G and WiFi on a Galaxy S5 running Android 5 and have had no issues but I think this may have been an issue in the past (I did a search for a bug in bugzilla.mozilla.org but couldn't find anything).
    Are there any other details you could provide that could help us debug?
    e.g.
    # Are you using a proxy?
    # Who is your WiFi provider?
    # Have you tried other WiFi (e.g. the Wifi both at home and work)
    Cheers!
    ...Roland
    </blockquote>
    Hello Roland,
    No proxy on the phone or wi-fi network.
    My ISP is Time Warner, but I supply my own router (Linksys e4200)
    And this happens on every wi-fi network, at home and away from home.

  • How to call Web Start app from Web Start app?

    Is there a way to call another Java Web Start Application from a running
    Java Web Start Application, possibly from a different JNLP file?
    Could this be done in a way that there won't be another virtual machine
    launched; i. e. that the started Application will run in the same virtual
    machine as the calling one?
    Cheers,
    Tobias

    Im not sure about running in the same Jvm however there are two ways I know of to start another jnlp app. I am using this to essentially restart my application however, you dont have to do that and can start another web application by either using BasicService.showDocument with the jnlp file ( should start a webs tart app) or usign runtime exec with javaws and the jnlp as the argument.
        String jnlpUrlString = "commpartnersapp.jnlp?COMPANY="+COMPANY_ID;
        try {
          try {
            // Lookup the javax.jnlp.BasicService object
            //get the codebase
            //This will work on both Unix and Windows
            BasicService basicService = (BasicService) ServiceManager.lookup(
                "javax.jnlp.BasicService");
            URL codeBaseURL = basicService.getCodeBase();
            log.config("basicService.getCodeBase()=" + codeBaseURL.toString());
            basicService.showDocument(new URL(codeBaseURL, jnlpUrlString));
          catch (UnavailableServiceException ue) {
            //here for testing purposes since we are not started from jnlp in IDE
            log.log(Level.SEVERE,
                    "ClientFrame:jMenuItemResetUserId_actionPerformed", ue);
            //when we are in the development environment
            String codeBaseString = "http://compub.cms/web/webportal/soft/";
            //Note this will work on windows only, javaws always in path
            //see http://java.sun.com/developer/community/chat/JavaLive/2005/jl0301.html
            //works on windows
            String execString = "javaws " + codeBaseString + jnlpUrlString;
            log.config("execString = " + execString);
            Process application = Runtime.getRuntime().exec(execString);
          catch (MalformedURLException ex) {
            log.log(Level.SEVERE,
                    "ClientFrame:jMenuItemResetUserId_actionPerformed", ex);
        catch (IOException ex1) { //runtime exec throws IOException
          log.log(Level.SEVERE, "ClientFrame:jMenuItemResetUserId_actionPerformed", ex1);
        //pass a false param to not store profile at end of shutdown
        this.shutdown(0, false);  //calls System.exit(0);R
    S

  • Launching external applications from web start

    Hi!
    I am currently working on a management system and I need to launch other management systems from my Java Web Start application. The other systems are either based on web applications (URLs), telnet - needs to set up a telnet session, or running shell scripts or batch files.
    URLs are ok. I am using Desktop.browse in Java 1.6 or I can use BasicService.showDocument in javax.jnlp API.
    My application may run on both windows and linux (ie its launched from the browser). It interacts with a java app on a linux server over RMI.
    How can I lauch a telnet session from my client app?
    Do I have to include apache commons.net and create a telnet module in my app or can i lauch c:\windows\system32\telnet.exe in windows (if my app is lauched on win) and /usr/kerberos/bin/telnet (if my app is lauched in Linux)?
    How can I launch an external .exe application in window and how can I launch any shell script or program in Linux?
    (same as how do i lauch telnet)
    As long as the user is prompted I can see no risk of denying these kind of things so I hope and think that this should be possible!
    PS. I have managed to do it by using Runtime.exec() when running as a non JWS application, but I cannot do it when running as JWS:
    java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)I dont want to sign the application either. The reason for choosing webstart was to not have to renew certificates at our customers.
    Please help.
    Thanks for taking interest and reading this.. and I hope that someone has some helpful answers for me :)
    Edited by: Tomas_Andersen on Feb 5, 2008 6:34 AM

    Do you know how to launch Java applications (not applets) from web pages ? Thank you.
    you can setoff a java servlet from a webpage.Is that what you are talking about ??? activeateing a server side app ????

  • Java 7 Update 25 Client App Downloaded From Web Start Can't Connect Out

    Since Java 7 update 25, I have an issue where my client Java application, downloaded with Java Web Start, can no longer connect to a remote server. (The client uses remote EJB to connect various servers). The issue I believe is that the client application is being blocked by security features of this Java update.
    A very quick (random?) fix around the problem is to show the Java console. If the Java console is enabled to be shown, the client application can connect fine.
    Although showing the Java console is a quick fix, it's not one we particularly want to keep asking customers to do. I understand we may need to define the Codebase and Permissions in the manifest file as described here: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/no_redeploy.html..
    I have defined the Codebase and Permissions in the manifest of the client jar's we build ourselves. I believe this has worked as we no longer see "Missing Codebase manifest attribute for...." in the console for our own jar's. However, the application still cannot connect out. I'm stumbling around somewhat on this issue and trying various things in an attempt to get this to work. Assuming i'm on the right lines and the problem is some jars missing the Codebase and Permissions in their manifests, my question is, should I and how can I modify the manifest of 3rd party jars to include this information? For example, the client app requires many JBoss and EJB client jars - do I need to somehow modify the manifest of all of these jars to include the codebase and permissions?
    It goes without saying that all the jars are signed - the application would not start at all if there was a problem here. So the application starts with it's login box - but it simply cannot connect out to the servers.
    If anybody can offer any help on this issue i'd be most grateful. As a quick fix, is there a way to get this to work via adjusting Control Panel settings (other than showing the console)? I have played with a lot but not stumbled on a way to get this to work other than showing the console, although ideally i'd like to be able to get this to work without having to do any tweaks to clients Java control panel.

    We're also seeing this. The 7u25 update completely derailed a trial program we were conducting, because no one could log in to our application via WebStart once they upgraded Java.
    Our login code crashes because SwingUtilities.isEventDispatchThread() throws an NPE.
    We tried theskad81's fix but it didn't work for us. We worked around the issue by hosting u21 on our site and pointing our WebStart page there instead of at Oracle's update site.
    *** ORACLE: PLEASE FIX THIS ISSUE USING APPLE'S FIX (mentioned in an earlier post - see above) ***
    Slightly edited stack trace:
         javax.security.auth.login.LoginException: java.lang.NullPointerException
        at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
        at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
        at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)
        at java.awt.Toolkit.getEventQueue(Unknown Source)
        at java.awt.EventQueue.isDispatchThread(Unknown Source)
        at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)
        at com.abc.ConsoleAuthUI.handle(ConsoleAuthUI.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
        at com.sun.proxy.$Proxy1.handle(Unknown Source)
        at com.abc.ms.rmi.MsLogin$1.handle(MsLogin.java:100)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(Unknown Source)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler.handle(Unknown Source)
        at com.abc.ms.auth.abcLoginModule.login(abcLoginModule.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at javax.security.auth.login.LoginContext.invoke(Unknown Source)
        at javax.security.auth.login.LoginContext.access$000(Unknown Source)
        at javax.security.auth.login.LoginContext$4.run(Unknown Source)
        at javax.security.auth.login.LoginContext$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
        at javax.security.auth.login.LoginContext.login(Unknown Source)
        at com.abc.ms.rmi.MsLogin.authenticate(MsLogin.java:111)
        at com.abc.ms.rmi.MsLogin.login(MsLogin.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        at javax.security.auth.login.LoginContext.invoke(Unknown Source)
        at javax.security.auth.login.LoginContext.access$000(Unknown Source)
        at javax.security.auth.login.LoginContext$4.run(Unknown Source)
        at javax.security.auth.login.LoginContext$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
        at javax.security.auth.login.LoginContext.login(Unknown Source)
        at com.abc.ms.rmi.MsLogin.authenticate(MsLogin.java:111)
        at com.abc.ms.rmi.MsLogin.login(MsLogin.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
        at com.sun.proxy.$Proxy0.login(Unknown Source)
        at com.abc.abc.ui.console.Main.attemptLogin(Main.java:488)
        at com.abc.abc.ui.console.LoginDialog$7.run(LoginDialog.java:182)
        at com.abc.util.GrayTimer$GrayTimerTaskWrapper.run(GrayTimer.java:84)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)

  • How to send image from web start application to my servlet

    Hi all,
    I have uploaded image in my web start application and now i want to send that image to my servlet. I have created URL connection and using output stream i am able to send data in String as well as numeric format but i have to send image also.
    please help.
    thanks in advance.

    I have done it. contact [email protected]

  • Latest Java 7 update 25 prevents JMF from working in Web Start application

    Has anyone else had a problem getting the JMF to work in a Web Start application since updating to Java 7 update 25?
    I can successfully run our application on my local machine via Eclipse and the webcam image loads. When I run my application from Web Start it does not load any image and errors out with the following error:
    java.lang.NullPointerException
        at javax.swing.RepaintManager.currentManager(Unknown Source)
        at javax.swing.RepaintManager.currentManager(Unknown Source)
        at javax.swing.RepaintManager.currentManager(Unknown Source)
        at javax.swing.JComponent.repaint(Unknown Source)
        at java.awt.Component.repaint(Unknown Source)
        at java.awt.Component.repaint(Unknown Source)
        at com.sun.media.renderer.video.AWTRenderer.doProcess(AWTRenderer.java:236)
        at com.sun.media.renderer.video.BasicVideoRenderer.process(BasicVideoRenderer.java:118)
        at com.sun.media.BasicRendererModule.processBuffer(BasicRendererModule.java:727)
        at com.sun.media.BasicRendererModule.scheduleBuffer(BasicRendererModule.java:499)
        at com.sun.media.BasicRendererModule.doProcess(BasicRendererModule.java:400)
        at com.sun.media.RenderThread.process(BasicRendererModule.java:1114)
        at com.sun.media.util.LoopThread.run(LoopThread.java:135)
    Any help would be appreciated
    Thanks,
    Mike

    Hi - I have exactly the same issue. Referring to Java 1.7_25 release note, i have also included permissions/codebase attributes in jmf jar manifest file but it did not help. With the permissions attributes i dont see the warning missing permissions, but it not solve the actual problem. JMF throws following NPE exception in my case
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler" java.lang.NullPointerException
        at sun.awt.image.FetcherInfo.getFetcherInfo(Unknown Source)
        at sun.awt.image.ImageFetcher.add(Unknown Source)
        at sun.awt.image.InputStreamImageSource.startProduction(Unknown Source)
        at sun.awt.image.InputStreamImageSource.addConsumer(Unknown Source)
        at sun.awt.image.InputStreamImageSource.startProduction(Unknown Source)
        at sun.awt.image.ImageRepresentation.startProduction(Unknown Source)
        at sun.awt.image.ImageRepresentation.prepare(Unknown Source)
        at sun.awt.SunToolkit.prepareImage(Unknown Source)
        at java.awt.Component.prepareImage(Unknown Source)
        at java.awt.ImageMediaEntry.startLoad(Unknown Source)
        at java.awt.MediaEntry.getStatus(Unknown Source)
        at java.awt.ImageMediaEntry.getStatus(Unknown Source
    Please let me know if you have any solution for the above problem. Appreciated your help.
    Thanks
    Sri

  • Java Web Start and IE6 as the default browser on win2k

    Hi,
    I need to access web pages from my java web start app. These pages are on the save server and the same webapp context as the jsp page to launch the web start app, and are protected.
    I have tried with basic auth and servlet filter with cookie to control the access to the web server. When I need to access web server resource from web start app, I create the URL to the page I want to access, set the auth header or cookie and call the web start BasicService to open it in the default browser.
    With Netscape 4/7 or Firefox as the default browser, I have no problem to send the auth header or cookie from the web start app to the webserver for security checking and get access to the resource on the server.
    But it seems not woking when IE is set to be the default browser. I am always asked for userid/password if I use basic auth; or redirected to the login page if I use servlet filter and cookie.
    If anybody knows a solution for this IE dfficulity, could you please share it?
    harry

    How did you even get k9 on your iPad...it does not show up in my iTunes apps? So I
    Had to download it on my computer ...transfer it to my iPad... Now it's in my Dropbox
    On the iPad...but I can't figure out how to install it from here......I want a browser on my
    iPad that ihas parental controls...I see quite a few should be in the iTunes store..even
    Firefox....but not a one show up in my iTunes app store?????

  • Getting Web Start to use JDK's javaw.exe, not JRE's

    On Windows, I need a Web Started app (actually, my Glossitope desklet) to run with the JDK's javaw.exe, not the JRE's, because I use the Java Compiler API, which is more or less a no-op in the JRE. I've tried using the Java Control Panel to change the Java Application Runtime Settings path to use the JDK path rather than the JRE's, but the change never takes. What, if anything, can I do to get JNLP's to run with the JDK?

    Well, using ToolProvider is exactly what I'm trying to do. The program lets you type some Java code, then compiles it and runs it (with help from a custom class-loader). The problem is that when run from Web Start on Windows, ToolProvider.getSystemJavaCompiler() returns null. I can see from the Control Panel that Web Start's path to Java uses the JRE path, not the JDK, and I suspect that's the reason I'm getting null for the compiler.
    I suspect bundling the tools jar is exactly what I need to do, and I also suspect the license forbids that.
    Works great on the Mac, FWIW.
    Thanks for the reply.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Why sun leader do not think about  "Why Java Web Start not be used widely"

    {color:#ff0000}Why sun leader do not think about "Why Java Web Start not be used widely"
    {color}
    Java Web Start was instruduced in jdk1.2, it's about ten years ago,But it's still not widely used--WHY?
    it's not because the design, it's becasue the code--the garbage code-- even the last version not work in many user computers,
    just not work suddendly -- noboday know reason--- if you do not believe, please google internet, many people suffered and suffering from web start!
    It's incredible that a famous big company like sun can not resolve an deployment problen in ten years that some very small company can do good work in much more short time !!!
    That' sun-- always say and design good things, then publish trouble and pain to their users. I really do not know what the sun's engineers are doing in so
    many years! -- why they do not know deployment is so important than others -- if deployment work fine, then the wrong thing can be correct easy !
    Sun, please do an famous big company -- give happy to user rather than pain !!! Please give us -- your users an stable and fast java web start to save us.
    {color:#ff6600}(Note: I use java web start to depoly our application, then receive endless complains, not work, slow and so on. now, we has no way just to give it up--design ourself's deployment-- that's also done by many pained people---just google it){color}
    Here is an desing suggestion:
    Client-end should be simple and stable, should let the server-end do complex thing .(now sun do opposite thing, they make Client-end complex, but server simple) ---it's because that Client-end will take widely effect on user's computer. update a few server is much more easy then update a amount of clients!
    Edited by: Jethro-Soft on Jun 30, 2008 8:49 PM
    Edited by: Jethro-Soft on Jun 30, 2008 8:52 PM

    Please check:
    http://joust.kano.net/weblog/archive/2006/04/06/why-i-will-never-deploy-with-java-web-start-again/
    http://kylecordes.com/2006/04/08/auto-update-no-web-start/

  • Jmf on web start

    Hi friends,
    Currently I am dealing with a project which includes distribution of JMF(java media framework) over the web. For this purpose, web start seems a nice approach.
    Moreover, JMF requires some native libraries which should be deployed from web start. I had problems at this point and strongly need help. I could not achieve deploying these libraries from web start hence running JMF from web start.
    I had no problem at running JMF from local JRE in standard java desktop applications. This means that required dlls can be successfully loaded and linked from standard applications but not from web start applications.
    I have read lots of forums and web sites and did what is said (at least I think I did), but could not solve the problem. Most probably, I need to do some simple configurations but at this point I totally don�t know what to do. Below, I want to mention shortly what I did to deploy JMF over the web start and the exceptions and error I faced with. I will be very happy if you find something wrong in these steps and tell me what to do:
    1. I jared all dlls related with the JMF : To do that, from Eclipse ee, I selected about 15 jmf dlls, right clicked them, chose �export� as jar, and obtained a jar from these dlls.
    2. Then, I signed them using keytool and jarsigner tools of java to give the project unrestricted access for media processing.
    3. Then, I added this jar to the webcontent folder of the project with other jars and files.
    4. After that, I added following tag to the jnlp file of the project: <nativelib href="http://193.140.214.29:8080/jmfproject/jmf-native-all.jar"/>
    5. I also added required System.loadLibrary() methods to my code in the order which gives no problem. (In the forums I read previously, these codes are required to load native dlls to the environment in which project will be run.)
    Note: I deployed project on Apache Tomcat Server.
    Below, I give my complete jnlp file;
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0" codebase="http://193.140.214.29:8080/jmfproject" href="http://193.140.214.29:8080/jmfproject/jmfproject.jnlp">
    <information>
    <title>jmfproject</title>
    <vendor>Techneon ltd.</vendor>
    <icon href="http://193.140.214.29:8080/jmfproject/techneon.jpg" kind="default"/>
    <icon href="http://193.140.214.29:8080/jmfproject/techneon.jpg" kind="splash"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources OS = "Windows">
    <j2se version="1.6.0_03" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="http://193.140.214.29:8080/jmfproject/jmf.jar"/>
    <nativelib href="http://193.140.214.29:8080/jmfproject/jmfnative.jar"/>
    </resources>
    <application-desc main-class="JmfprojectStarter"/>
    </jnlp>
    And below is the cronical exception I faced with:
    java.lang.NullPointerException
    at Jmfproject.<init>(Jmfproject.java:241)
    at JmfprojectStarter.main(JmfprojectStarter.java:9)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Hi Andrew,
    Thank you very much for your attention,
    My simple project contains 2 classes: JmfprojectStarter, which contains only main method and Jmfproject which is a swing GUI
    Below is JmfprojectStarter:
    +public class JmfprojectStarter {+
    +     /**+
    +     * @param args+
    +     */+
    +     public static void main(String[] args) {+
    +          +
    +          new Jmfproject();+
    +     }+
    +}+
    And below is the System.loadlibrary part of the Jmfproject class:
    +/*+
    * Java(TM) SE 6 version.
    some import statements
    +@SuppressWarnings("serial")+
    +public class Jmfproject extends JFrame implements ControllerListener {+
    +     some gui component declarations+
    +     +
    +public Jmfproject() {+
    +     +
    +     System.loadLibrary("jmacm");+
    +     System.loadLibrary("jmdaudc");+
    +     System.loadLibrary("jmmpegv");+
    +     System.loadLibrary("jmutil");+
    +     System.loadLibrary("jmvcm");+
    +     System.loadLibrary("jmvfw");+
    +     System.loadLibrary("jmmpa");+
    +     System.loadLibrary("jmmci");+
    +     System.loadLibrary("jmdaud");+
    +     System.loadLibrary("jmcvid");+
    +     System.loadLibrary("jmam");+
    +     System.loadLibrary("jmjpeg");+
    +     System.loadLibrary("jmh263enc");+
    +     System.loadLibrary("jmh261");+
    +     System.loadLibrary("jmgdi");+
    +     System.loadLibrary("jmg723");+
    +     System.loadLibrary("jmddraw");+
    +     System.loadLibrary("jmvh263");+
    +     System.loadLibrary("jmfjawt");+
    +     System.loadLibrary("jmgsm");+
    +.+
    +.+
    +.+
    some gui component initiliazations
    +.+
    +.+
    +.+
    below is code block where I got the exception(statement in bold throws the exception)
    +try {+
    +          URL mediaURL = getClass().getResource("media/ungreedy.wav");+
    +          player = Manager.createPlayer(mediaURL);+
    +          player.addControllerListener(this);+
    +     }catch (Exception e) {e.printStackTrace();statusField.setText("player error");}+
    player.start();+
    As you see, System.loadlibrary methods are not called from main method(although from the same thread). Moreover, I guess there is no problem in the order of method calls since I changed the order untill I do not get "dependency" errors which are thrown when one dll depends on some other one. But in some way, these dlls can not be used by web start according to the part of exception thrown :
    at sun.reflect.*NativeMethodAccessorImpl.invoke0*(Native Method)
    at sun.reflect.*NativeMethodAccessorImpl.invoke*(Unknown Source)
    at sun.reflect.*DelegatingMethodAccessorImpl.invoke*(Unknown Source)
    I have no idea at this point:(
    Thank you very much again
    Edited by: alperyesilyurt on Jan 9, 2008 5:35 AM

  • Unofficial Web Start/JNLP FAQ updated

    Hi,
    I updated and added new entries to the Unofficial FAQ:
    * Is Web Start available for Macintosh?
    * Does Web Start support downloading jars using FTP?
    * How can I start Web Start's app manager (aka Web Start Player) automatically at boot time/restart time?
    * How can I start Web Start's app manager from a web page?
    * How can I tell Web Start to use either a hotspot or classic virtual machine?
    * How can I connect to a database?
    * How can I reference a Java Help helpset?
    * How can I change the proxy configuration in javaws.cfg?
    * How can I retrieve the proxy settings from Web Start?
    * How can I call other programs or shell scripts in Java?
    * How can I pass dynamic command line arguments to Web Start on the command line?
    * Why doesn't my app run under Web Start?
    Thanks to everyone for posting their insights.
    Note, that I cannot answer your individual questions.
    Please, post your questions on Sun's forum instead of mailing me.
    Any corrections or suggestions, however, are more than welcome, please send them to [email protected]
    - Gerald Bauer
    PS: Here is the Unofficial Web Start/JNLP FAQ link just in case:
    http://www.vamphq.com/jwsfaq.html

    Hi,
    I updated and added new entries to the Unofficial FAQ. Here is this months line up. New Entries:
    * How can I list all resources in a jar?
    * How can I talk to servlets from my Web Start app?
    * How can I use Web Start and RMI together?
    * How can I detect if my app is offline?
    * Can I use Web Start to deploy server apps?
    * Can I use Web Start to deploy apps to mobile devices (J2ME)?
    * Why can't I start Web Start's app manager under Windows? Why does the app manager's preferences dialog fail to appear?
    * Why doesn't Web Start reprompt for proxy logins?
    * Can Web Start handle multiple XML parsers at once?
    Updated Entries:
    * How can I add JNLP MIME-types to my ISP's Apache Web Server?
    * Is Web Start available for Macintosh?
    * How can I connect to a database?
    The Unofficial Java Web Start/JNLP FAQ is located at
    http://www.vamphq.com/jwsfaq.html
    A free 40 page pdf booklet is available as well for offline consumption and printing.
    As always thanks to everyone for posting their insights.
    - Gerald Bauer

  • Can not launch swing application from Java Web Start 1.6.0_37

    I have a dynamic generated jnlp file from a serlvet. When I used Java Web Start to start the swing application, it failed. The exception showed
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://xxxx.xx.com:9080/dilpipweb/Test-1.0-SNAPSHOT.jar
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I used janela to validate the generated jnlp file. It was valid. I also checked the tomcat access log, it showed that the Test-1.0-SNAPSHOT.jar file was accessed correctly (with a 200 return code).
    Can anyone help me what was the problem?
    Thanks,

    Hi.
    I got a different problem. My Corba application works in JRE 1.6, but doesn't works in JRE 1.5.X. I got an unexpected error and my console shows:
    getSubjectX500Principal NoSuchMethodError: java.lang NoSuchMethodError
    #### Java Web Start Error:
    #### null
    Can you help me?

Maybe you are looking for