Launched thru Java web Start...?

Is there a way to find out whether my application is launched through Java Web Start or as a stand-alone application?
I have think of 2 round about ways -
- Getting the service names using javax.jnlp.ServiceManager.getServiceNames(), which returns null if launched as a standalone application.
- Getting the classloader name.
But, I am looking for one more concrete way of doing it, if any?

Akhil,
I was looking for a solution for this very problem and came across a FAQ in another thread that was helpful. See http://vamphq.com/jwsfaq.html and more specifically http://vamphq.com/jwsfaq.html#under

Similar Messages

  • Override the launch of Java Web Start

    How can we stop the auto launch of Java web start and prompt the user to enter the desired location to download the jars.
    And then launch the jars from that location.
    Is there any solution for this.
    Please help me in this regard
    Nandita

    The whole idea of WebStart is to relieve the user of the burden of downloading binaries themselves. The whole point is, they just click a link on a web page, some magic happens, and their app starts up.
    Your idea is a complete waste of time.

  • How to add scroll function in  the applet launched by  Java Web Start?

    I have Java Web Start installed in order for the applet to launch.The applet size: width:700 height:1000
    my compuer resolution:800*600
    the applet launched by Java Web Start can only be seen partly,especially height.How to add scroll function in the applet launched by Java Web Start?
    Thanks for help.
    email:[email protected]

    You can very easily add a JScrollPane manually between the Applet and your content. Perhaps it would be beter if javaws did this automatically. In the browser, an applet can be any size. In Java Web Start an applet is directly contained within a JFrame, so it cannot be smaller than the minimum size of a JFrame, or Larger than the max.

  • Refresh an open web page on closing an applet launch from Java Web Start

    Hi
    I launch an aplication via Java Web Start from a link in a web page. I am looking to a solution to refresh my web page when I close my applet.
    Thanks in advance to give me the solution or only to let me know if it's possible or not.

    everything's possible. but this is not trivial. there is no direct connection between the html page that launched the app and the app. You can create an indirect connection by having the app notify a server process when it closes and having the page periodically polling the server for the app's status.

  • Error while launching of the application thru java web start

    I have java webstart 1.2. While opening one of the application, its showing me following error message,
    "javaws.exe has generated error and will be closed by Windows. You will need to restart the program. An error log is being created."
    After that application works fine(It does not close the application) and no log file is generated.
    Can any one tell me what is the cause of this problem.
    Regards,
    Pravanjana

    You shouldn't give up without studying the source of JMF.
    JMFSecurityManager blocks opening the webcam when it recognizes that the application is executed as an applet. JMF - in fact JMFSecurityManager - cannot distinguish between an applet and a java webstart application because it only evaluates System.getSecurityManager().
    If the application is deployed via webstart the System.SecutityManager is NOT null and so JMFSecurityManager makes problems.
    So the easiest solution of this problem is to call System.setSecurityManager(null) before any static function of JMF is executed or any class of the Framework is instanciated - e.g in the main-function. Java webstart allows to execute the command if the .jnlp-file requests all-permissions.
    Another possibility is to read the properties. Therefore jmutil.dll has to be deployed and in C:\WINDOWS\java\.jmfdir the first line must contain the path of jmf.properties. This should be an alternative but I haven't checked if it works.

  • Java console doesn't launch when starting Java Web Start app from Firefox

    Updated my Linux desktop from RHEL to Fedora 12 with resultant upgrade of Firefox to 3.5.9 and now when I launch our Java Web Start application, no Java console appears. The Java Control Panel still shows "Show Console" as set. My app uses Java 1.5 which I have installed on my desktop.
    What do I do to properly configure my browser/desktop to support use of the Java console?
    Please help, I need to debug our app!
    Ilane

    IlaneMarie wrote:
    ..Please help, I need to debug our app!Cannot tell you the answer to your FF hassles (because I have no idea why you're seeing that behaviour(1)), but note that you might be able side-step FF by launching a JWS app. using the javaws tool directly from the command line or an Ant build file.
    1) Though you might try rebooting the machine if any installation/configuration changes have occurred since last boot.
    Also note that many problems with JWS apps. can be sorted be checking the JNLP using JaNeLA.

  • Java Web Start and JAAS

    Has anybody tried to use JAAS in an application launched via Java Web Start?
    I'm experiencing problems with it. (The application works fine when being launched directly on the client.)
    If somebody already successfully tried, please let me know.
    Do I need to modify tags in the JNLP file? Do I need to re-configure my webserver or servlet engine?

    OK I got a response from the Java Web Start engineering folks. It sounds like using JAAS directly, to login to an ejb app server or whatever, is out of the question with Java Web Start on JDK1.3:
    << begin Sun's email >>
    The problem you got is due to JAAS 1.0 (jaas.jar) uses systemClassLoader to load
    classes that are defined in the JNLP application jar files, which should be
    loaded by the contextClassLoader instead. For more information on classLoading
    with JWS, look at:
    http://java.sun.com/products/javawebstart/faq.html#54
    http://java.sun.com/products/javawebstart/docs/developersguide.html#dev
    The new JAAS that comes with JDK 1.4 fixed this problem, which uses
    contextClassLoader in their class.
    Thanks for your interest in Java Web Start.
    << end of Sun's email >>
    FYI our workaround: We use a SOAP servlet as a proxy for the app server and we've defined a SOAP xmlrpc api between our client and the application server. This has the advantage of being able to get thru firewalls, as our variant of SOAP is transported on HTTP. Java Web Start installs and starts the SOAP client.
    I would hope the JWS folks would search the Sun provided services and see which ones ignore the current thread's class loader and fix them.
    David Harvey
    Siemens Energy and Automation, Inc.
    Gardner Systems Business Unit

  • Java web start in Windows vista

    Hi,
    1)
    When i tried to launch my Java Web start application in Windows Vista (32bit) With Jre 1.6_06 the java web start did not loaded. the process terminates at certain points.
    By Remote debugging got to know,: It was exiting the application at different points at different time
    At some points it says ClassNotFoundException. No logs at cache location also.
    Is it due to the jars are not loaded properly?? Jnlp is pasted bellow
    2) another problem here is the system did not have the jre installed earlier. how does system identified the jnlp file format if no jre available first time??
    So rather auto download I have installed jre manually and was launching the application
    thanks a lot,
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp
      spec="1.0+"
      codebase="$$codebase" href="main.jnlp">
      <information>
        <title>Panel</title>
        <vendor>nc.</vendor>
        <homepage href="/index.html"/>
        <description>Panel</description>
        <description kind="short"></description>
         <icon href="$$context/images/Logo.gif" width="64" height="64" kind="default"/>
         <icon href="$$context/images/topLogo.jpg" kind="splash"/>
        <shortcut online='true'>
          <desktop/>
          <menu submenu="Panel"/>
        </shortcut>
        <related-content href="jar:app.jar!/conf/readme.pdf">
         <title>Readme</title>
         <icon href="images/Logo.gif"/>
      </related-content> 
      </information>
         <security>
          <all-permissions/>
       </security>
      <update check="always" policy="always"/>
      <resources>
            <java version="1.6.0._05+"  href="http://java.sun.com/products/autodl/j2se"/>
         <jar href="app.jar" version="1.0+" main="true"/>
         <jar href="common.jar" version="1.0+" download="lazy" main="false"/>
         <jar href="ext.jar" download="lazy" version="1.0+" download="lazy" main="false"/>
         <property name="jnlp.url" value="$$context/url"/>
      </resources>
      <application-desc main-class="com.app.MainPanel"/>       
    </jnlp>

    >
    2) another problem here is the system did not have the jre installed earlier. how does system identified the jnlp file format if no jre available first time??>See the latest [deployment advice|https://jdk6.dev.java.net/deployment_advice.html#JavaScript_used_for_deploying_Ja].
    Edited by: AndrewThompson64 on Jun 22, 2008 1:20 AM

  • How to convert existed standalone APP to java web start app?

    hello:
    I didn't find useful information about how to convert an existed java
    app into app which can be launched using java web start from the sun java developer's guide.
    I have designed a simple java applcation and want to lauch this program with
    java web start techniques(on local machine only). Is there any easy way that i could convert my program to the one which support java web start, so i can double click the *.jnlp file to launch my java applcation.
    thank you
    -Daniel Mark

    i just found a great place to resolve my question.
    If you had the same question, please refer to
    http://www-106.ibm.com/developerworks/java/library/j-webstart/
    thank you
    -Daniel

  • Java web start and xforms

    Hi,
    I've written an application which uses Xforms to fill in and save a set of fields to a file and then uses an Xforms submission to launch a java web start application which reads in the saved data. This approach allows me to provide a simple forms gui and process the resultant data on the client side.
    However, this solution is limited and it would be much nicer if my web start application could read the xml instance data direct from the xforms submission (and provide data back to the form).
    I know it's a long shot, but is there a way of doing this? An XForms submission with a post or put simply overwrites my jnlp file if it has permission to do so (as one might expect).
    At the moment I do the following ...
    <xf:submission id="RunJava" method="get" action="http://www..../myfile.jnlp"/>
    If it were possible to do this then Xforms and java web start would make powerful allies imho.
    Thanks for any wisdom.
    -- Rupert

    bump

  • How import policy file with Java Web Start

    hi everybody,
    I wrote an application launched by Java Web Start.
    This application encrypt data on the client side and POST them to the server.
    To encrypt I use JCE packages including sunjce_provider.jar, jce1_2_1.jar and
    local_policy.jar and US_export_policy.jar.
    local_policy.jar and US_export_policy.jar are not packages, each of them contains
    a policy file.
    When I test encryption on local no problem, but when I test with Java Web Start
    I've got this exception :
    java.lang.ExceptionInInitializerError:
    java.lang.SecurityException: Cannot set up certs for trusted CAs
    It's because the application launched by Java Web Start doesn't find local_policy.jar
    and US_export_policy.jar.
    There's a problem in my JNLP file :
    <jnlp spec="1.0+" href="http://myserver/sources/test.jnlp" codebase="http://myserver/sources">
         <information>
              <title>Java Web Start TEST</title>
              <vendor>NLE Intech</vendor>
              <description>cryptage then upload</description>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.3" />
              <jar href="sunjce_provider.jar" />
              <jar href="jce1_2_1.jar" />
              <jar href="local_policy.jar" />
              <jar href="US_export_policy.jar" />
         </resources>
         <application-desc main-class="HelloWorldSwing" >
              <argument>c:\myfiletoencrypt</argument>
         </application-desc>
    </jnlp>
    thank you for your answer

    Hi Nicolas,
    If you migrate to JDK1.4 and use the signed Bouncy JAR, you could resolve the problem,
    if you don't want to use unlimited cryptography.
    See my posting on your other question.
    Agnes
    PS. There is a mistake in my other reply, the "local_policy.jar" and the other files must have
    to go into JRE/LIB/SECURITY directory

  • Unable to Launch Integration Builder: Java Web Start problem

    Hi,
    I am unable to launch the integration builder. I am using JDK 1.4.2_05. The java Web Start gives the following error:
    Unsigned application requesting unrestricted access to system
    Unsigned resource: http://<XIHostName>:50000/rep/repository/aii_util_rb.jar
    I have tried deleting the Java web start cache, and even reinstalling the JDK.
    Can someone suggest a workaround this problem ?
    thanks,
    Manish

    The Java Web Start cannot accept unsigned jars. If the jars are signed, it will ask in a dialog box if it should allow unrestricted access to this jar.
    In my case, I upgraded XI SP0 to SP4, which included updating the Adapter Core, Adapter Framework, and the XI TOOLS to SP4.
    On launching the Web start, it seemed that the jars were not getting signed. JWS cannot allow unsigned jars to the client.
    These jars are maintained in:
    \usr\sap\<SID>\SYS\global\xi\directory_server\javaws\directory
    I am having problems with my XI upgrade to SP4, and it is probably not signing the jars.
    Do you know why this may be happening ...
    thanks,
    Manish

  • Unable to launch Integeration Builder - Java Web Start - Unexpected Error

    Hi there,
    I am not able to launch the Integeration builder. The ESR has no problem and is working fine though.
    Here is the exception :- com.sap.aii.ibdir.gui.appl.ApplicationImpl
    I have tried below options already :
    1. Cleared the java cache under - javaws -logviewer
    2. Go into administration and inside Directory --> Java Web Start Administration clicked "Restore archives and generate new sign."
    Strange part is some of my colleagues here doesnt have any issue while opening the Integeration Builder. In fact I dont have any such issue in QA and PROD environment. The issue is only in DEV environment. Please advice.
    Anshul

    Hello,
    Usually restoring the archives will help resolve the issue.
    If the issue is occurring for just yourself maybe you could check that you are using the correct java version. e.g. for for 7. 1 java version 5
    Also please refresh the Java Web Start:
    If it's a Windows terminal, select Start - Run - javaws to launch Java Web Start and then clear the cache. File -> preferences ->
    advanced -> clear folder button
    If you have later versions of Java and doing the
    Start -> Run doesn't give you anything, then select Start - Run and type Control and hit Enter. Double-click Java in the list
    that displays to view the more up-to-date Java Control Panel. In the General tab, select Settings from the Temporary Internet Files section. Click Delete Files to clear the cache and then log into the Integration Builder again (download will be longer as jars will be cached locally again).
    If the problem still remains I would advise to check that the latest patches have been applied for XI_TOOL, and also the other components MESSAGING  SAP-XIAFC SAP_XIAF SAP_XIESR SAP_XIGUI
    Regards,
    Sarah

  • Unable to launch application with java web start (OILOM)

    I'm connecting to a remote Oracle console from a server, using "oracle integrated lights out manager". I go to "Remote Control" and click on "Launch Console". After that, it download a JNLP file, called "jnlpgenerator-16". I open it with Java7 -web starter- update 5.
    After a while hanging I get this error:
    Error: Unable to load resource: https://XXX.XXX.XXX.XX:443/Java/JavaRConsole.jar.
    In Exception:
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: https://XXX.XXX.XXX.XXX:443/Java/JavaRConsole.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.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    In Wrapped Exception:
    java.net.SocketException: SOCKS server general failure
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
         at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
         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.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    It happens the same under Windows 7 and Linux -using openJRE and icedtea as substitution of Java Web Start-.
    I'm behind a proxy. In my browser -Chrome, IE and FF- putted the info of the proxy and I can browse. Aldo tried to put the info in the Java "Network Settings". It did not work -the launching of the console-.
    I installed the last Java Web Start in Windows 7 -Java7 Update5-. I disabled my anti-virus and firewall. Always the same result.
    Could you help me please. I don't have idea of what is going on.
    Greetings.
    PD: I tested from other machines of the company and it works. So, I guess is my laptop. I exported the oracle certificates from those machine and imported them into mine.

    AndrewThompson64 wrote:
    I am not used to seeing references to a local server that do not include a port number.
    E.G. http://localhost:8080/LottoMadness/
    I have deployed the following HTML (HelpMe.html) to the web server:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>Untitled</title>
    </head>
    <body>
    Help Me!
    </body>
    </html>When I attempt to render the URL in IE, I see the page just fine. The URL is use is:
    http://localhost/LottoMadness/HelpMe.htmlSo, I think my web server setup and usage is ok.
    >
    As an aside, what happens if (your MS IIS is running and) you click a direct link to..
    [http://localhost/LottoMadness/LottoMadness.jnlp|http://localhost/LottoMadness/LottoMadness.jnlp]
    When I click this link I get the error and exception I cited in my previous post.

  • Java Web Start- Cannot launch Application. Pls help

    HI
    Ia m beginner in java web start. I creaate a simple swing application and try to launch it through web start. But I failed. My application jar file (sample.jar)contains only class files. No menifest file. Then I sign my "sample.jar" file and placed inside tomcat server: "webapps/root/WebStart/Sample". I also placed the "sample.jnlp" file in the above directory.The name of my main class is :"Sample" .Here is the content of sample.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
      codebase="http://165.231199.164:8080"
    >
    <information>
      <title>Sample Launching Test</title>
      <vendor>FMO</vendor> 
      <homepage href="www.sun.com" />
      <description>Demonstration of JNLP</description>
    </information>
    <offline-allowed/>
    <security>
      <all-permissions/>
    </security>
    <resources>
      <j2se version="1.2+" />
      <jar href="/WebStart/Sample/sample.jar"/>
    </resources>
    <application-desc main-class="Sample" />
    </jnlp>Whenever I try to launch this application from the browser , it shows me following :
    An error occurred while launching/running the application.
    Title: Sample Launching Test
    Vendor: FMO
    Category: Unexpected Error
    RED
    Anybody pls help me here about how to Launch my application. Am I missing something?

    I fixed the porblem by modifying the sample.jnlp file. Here is the latest version:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase=http://[my-ip-address]:8080/WebStart/Sample>
    <href="sample.jnlp">
    <information>
      <title>Sample Launching Test</title>
      <vendor>FMO</vendor> 
      <homepage href="www.sun.com" />
      <description>Demonstration of JNLP</description>
      <offline-allowed/>
    </information>
    <security>
      <all-permissions/>
    </security>
    <resources>
      <j2se version=1.4+ />
      <jar href="sample.jar"/>
    </resources>
    <application-desc main-class="Sample" />
    </jnlp>

Maybe you are looking for

  • HOW DO I KNOW IF THE DATABASE SERVER IS RUNNING?

    Hi guys, How do i write a java code to determine if my database server(s) (eg : Oracle or mySQL or postGRESQL, msSQL etc) are (is) running. I want to know how to code in java to determine if a certain database server is running when i start the java

  • Photoshop stopped running, other CS4 programs ok

    I started getting the error message "Adobe photoshop CS4 does not run under this version of the operating system" TODAY 6/20/10.   The program ran correctly yesterday.  Same computer, same setup, same programs.  The computer is Dell Insperon 1.66GHz

  • Apache 2.x

    Hello everyone, I have some doubts, I hope you can vanish them: 1) Does Apache 2.x support ssl ? 2) Does weblogic have an apache 2.x plugin module? like they have for 1.3? I mean, they have mod_wl_20.so for apache 2 , but they don't have one for ssl

  • Problems opening/updating/installing Spotify

    Hi. I've been having problems with Spotify freezing and not closing unless I restarted my laptop completely for a while now. I've tried to update it and this just seems to make the whole problem worse. I can open the log in window and then I get a "P

  • Airport Issues migrating from a Powerbook w/10.3 to MacBook Pro w/10.4

    I purchased a MacBook Pro about a month ago. It's my first experience with Tiger, so I don't now if my issues are related to Tiger or the Intel Platform. Issues: - Powerbook would ALWAYS automatically connect to my "hidden" Airport Extreme network. M