Launch multiple WS apps from a local Java application?

I should develop a local Java application that on demand launches webstart applications. Obviously it could be done with a simple HTML file, but the requirements are that launched apps be monitored by the launching app, so they need to be in the same JVM.
I tried
java -Djnlpx.home="C:/programfilesdir/Java Web Start"
-classpath ".;..\classes;..\lib;..\lib\javaws.jar" Launcher
Then Launcher.java calls com.sun.javaws.Main's main method passing the JNLP URL as a parameter.
This launches Java Web Start and then the child app, but for some reason I ignore the Launcher app is exited without exceptions as soon as javaws starts.
Provided that the Java WS app manager is itself a Java app that launches WS app's, any clue on how to do the same thing? Or can the source code be inspected?
Thanks.

I should develop a local Java application that on
demand launches webstart applications. Obviously it
could be done with a simple HTML file, but the
requirements are that launched apps be monitored by
the launching app, so they need to be in the same
JVM.You might check out netx, a open-source JNLP client that has extra support for running multiple apps in a single JVM. It includes a SecurityManager that can catch System.exit and close the calling app's windows and resources (applet sounds, etc) instead of closing the JVM. It has other support too like separate look and feels for each app.
It doesn't yet implement all of the spec though, but it does run most JNLP apps.
http://jnlp.sourceforge.net/netx/

Similar Messages

  • Launching an AIR app from another (when offline)?

    I have a pair of AIR applications that are meant to work
    together as part of an application suite. One feature is that a
    user should be able to click a button in APP_1 and launch APP_2 (if
    installed). To do this I created a "LaunchButton.swf" that loads
    "air.swf". This works GREAT when the user is online and "air.swf"
    is able to be loaded from "
    http://airdownload.adobe.com/air/browserapi/air.swf".
    I tried to copy "air.swf" locally and use that instance but I am
    guessing that it doesn't work due to security restrictions.
    If there are any AIR engineers reading this (Oliver?) please
    let me know if there is a solution to "Launching an AIR app from
    another (when offline)?"
    Thanks!

    I think theoretically it shouldn't work, and doesn't by the
    response you give. Remember a functional work around isn't always a
    fix. What you've essentially done is loaded the air.swf into a
    sandbox bridge, bridging it between a web sandbox and an
    application sandbox, therefore you're able to call its methods
    without security errors. However, if the air.swf loads in another
    swf, maybe a helper swf, you won't be able to access any methods in
    that swf, neither will the air.swf. To my understanding, it's not
    grandfathered into the sandbox bridge, but retains its web sandbox.
    Before going crazy about the bad news I may have just given,
    wait until Ted returns to give you a response. I could be way off
    par here :) Good luck!

  • Download Multiple Documents App from Solutions2Share

    Hello, I have downloaded the 'Download Multiple Documents App' from Solutions2Share and installed it on several existing site collections on my SharePoint online office 365 tenant. It works without any problems on all sites on all site collections apart
    from one....which is typically the site I need it to work most on.
    When I try to download multiple documents from a document library from this site I get directed to the download multiple documents page and I see the app trying to download the documents but then get message ''Could not retrieve list:Forbidden''
    This happens with every document library on the site. What is strange , when I do this on a document library on the top level site of the same site collection, i.e the default site that is created when creating a site collection - it works fine.
    I've gone through all the site settings and site features and cannot see what would be causing this! I am the Site Administrator and am in the Site Owner/Members permissions groups for this site. Tried it with different browser too.
    kegan1

    Hi,
    According to your error message, it says that the Download Multiple Documents App has permission issue for the list. You can contact [email protected] or go to knowledge base:
    http://wiki.solutions2share.net/category/products/download-muliple-documents/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • What should be done in certmap.conf for 2-way SSL support from a standalone Java application to an SSL enabled LDAP Server

    To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?

    have you out.flush() and out.close() before you call connection.getInputStream()?

  • Pass a table from my webdynpro JAVA application to an RFC in R/3

    Hi All,
    I need to Pass a table from my webdynpro JAVA application to an RFC in R/3. How can I do that?
    Regards
    Sarath

    Hi,
    Please have a look at this thread,
    Pass Table as Input to Adaptive RFC
    Regards,
    Saravanan K

  • Restrictions on local Java applications

    Hello!
    By java 2 security model, all local Java applications run unrestricted as trusted applications by default. but there is a note about security configuration which runs local application with access-control policies applied (similar to applet's and remote application's).
    But there was not reference how this can be achieved.
    Can you pointed me out how to configure such behaviour?
    Thank you!

    Thank you, Martin!
    I did just as stated in security policy documentation, but my policy does not apply to all (in fact to any) localy started application?
    Is there a special trick to make it work?

  • Compiling java code from a running java application

    How does compiling of java code from a running java application work?
    I found a class: com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class works.

    How does compiling of java code from a running java
    application work?Probably most reliably using Runtime.exec().
    I found a class:
    com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class
    works.For a purpose. You are not supposed to use this class. With the next JRE release or implementation, it might not exist anymore - it's not part of the standard API.

  • HTTP form post from Web Dynpro Java Application without opening new window

    Hi Experts,
    We are trying to submit form data to an external URL from Web Dynpro Java application. We are achieving this with the following piece of code.
      try
       strPrintContent="<html>"+
         "<head>"+
         "<script type=\"text/javascript\">"+   
         "function myfunc () "+
         "{"+
         "var frm = document.getElementById(\"paymentForm\");"+
         "frm.submit();"+
         "}"+
         "</script>"+
         "</head>"+
         "<body onLoad=myfunc()>"+
         "<form id=paymentForm  method=post action=\""+merchantURLPart+"\">"+
         "<INPUT type=hidden name=username value="+userName+">"+
         "<INPUT type=hidden name=pass value="+passWord+">"+
         "<INPUT type=hidden name=senderid value="+senderID+">"+    
         "<INPUT type=hidden name=dest_mobileno value="+mobile+">"+
         "<INPUT type=hidden name=message value='"+msg+"'>"+
         "<INPUT type=hidden name=response value="+response+">"+
         "</form>"+
         "</body>"+
         "</html>";    
      IWDWebResource webResource = WDWebResource.getWebResource(strPrintContent.getBytes(),WDWebResourceType.HTML);
      IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(webResource.getAbsoluteURL(),"WBSEDCL");
      window.show();
      catch(Exception e)
      wdComponentAPI.getMessageManager().reportException("Error : "+e.toString(),false);
    But it opens another window. We dont need that. We have to stay on the same window.  Please suggest what can be done.

    Hi,
    You can create a HTML file with the request post parameters and the external URL something like this:
    public java.lang.String GetRedirecturl( )
    // External URL
    String html = "<html><head></head><body onload=\"load()\"> " +
    "<form id=\"form1\" action=\"https://www.abc.com/xyz.jsp\" method=\"POST\">" +
    // Post Parameters
    "<INPUT TYPE=\"HIDDEN\" NAME=\"Param1\"VALUE=\""+Param1Value+"\">"+
    "<input name=\"sap-wd-resumeurl\" type=\"hidden\"/>" +
    "</form> " +
    "" +
    "<script>" +
    "function load(){" +
    "var loc = window.location.search.substring(1);" +
    "var queryString = loc.split(\"sap-wd-resumeurl=\");" +
    "if(queryString.length > 0)" +
    "{" +
    "var resumeURL = queryString[1].split(\"&\");" +
    "if(resumeURL.length >= 0)" +
    "{" +
    " document.forms['form1'].elements['sap-wd-resumeurl'].value= unescape(resumeURL[0])" +
    "}" +
    "}" +
    "document.getElementById('form1').submit();" +
    "}" +
    "</script>" +
    "</body> </html>";
    String redirectUrl = "";
    byte[] byteArrayHtmlData = null;
    try {
      byteArrayHtmlData = html.getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
      wdComponentAPI.getMessageManager().reportException("Internal error occurred. Please try after some time",true);
    IWDResource htmlResource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(byteArrayHtmlData), "Redirect.html", WDWebResourceType.HTML, true);
    redirectUrl = htmlResource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
    return redirectUrl;
    Hope this will be helpful.
    Regards,
    Anurag

  • File Upload from a desktop java application

    Hi,
    what I want to achieve is, to upload a pipe-delimited text file from my desktop java application to my hosting server, and then on the server, I have a PHP page that would parse this file and insert records to the database.
    so, on the server, I can enable write access on the folder which I want to upload the file to,
    but how do I upload a file from my desktop application.
    Thanks

    HttpURLConnection conn = (HttpURLConnection) _url.openConnection();this code open a http connection, and what is left is to fill in http protocol things (e.g. content type, content length, POST/PUT or whatever method...etc). after you set the correct request header then open a output stream and pass your files and flush the connection then close it.... in theory (never tried sending files, only done handling POST http form requests with it but it shouldn't be too much different when it is http protocol)
    you may want to install Fiddler2 into your browser, it can filter out the browser outgoing and incomign information and you can take a little read in their header and see how they interact with each other

  • How to launch a web browser from a MAC java app

    I know, this topic has been brought up over, and over, however I couldn't find info regarding MAC environments. I don't have any former experience with MAC, but now I'm getting desperate for a solution. I need to be able to pop up the default browser showing a certain URL on MAC/OS from a java application. Any clue would be appreciated.
    Thanks a lot,
    michael berdan

    I wrote libraies that will do this:
    http://ostermiller.org/utils/Browser.html
    I also keep a list of other resources to help you out:
    http://dmoz.org/Bookmarks/D/deadsea/Java_Help/Web_Browser/
    Stephen

  • Launch one CS app from another

    Hi all,
    Newbie alert - sorry!
    I am currently stuck on something that seems simple, but I cannot get it to work - it's about coordinating between multiple CS apps.
    I want to cause one Creative Suite app (e.g. Photoshop) open a certain document (say a JPEG file) while running a CS Extension running in another Creative Suite app (e.g. Illustrator).
    I first naively assumed I could just use the app property of the Photoshop class (i.e. 'com.adobe.csawlib.photoshop.Photoshop.app') from an extension hosted by Illustrator, but I am not having much luck. One possible cause is that Photoshop is not necessarily running. When I try to refer to Photoshop.app while 'inside' an Illustrator extension, I do get an object back, but it's full of nulls and empty member variables - it's not properly instantiated, and as soon as I try to refer to something 'in' it (e.g. Photoshop.app.open(...)), a null exception is being thrown.
    I've tried pre-launching Photoshop manually, but that does not seem to help, and any which way, I want to automatically launch Photoshop if it has not been launched yet.
    The next thing I tried was to use an embedded ExtendScript - when one is using ExtendScript, it's fairly simple to talk to other apps in the Creative Suite. There are objects called 'photoshop', 'illustrator' and so on, and there is BridgeTalk.
    But when I call my ExtendScript from within ActionScript using the HostObject, it looks like I am missing all of the normal 'infrastructure' I've grown to expect when running ExtendScript. I suspect it's because I am in a separate engine that does not have the stuff I want to access.
    Then I tried to force things - I noticed the sample code that runs an ExtendScript in ActionScript has a phrase:
    var myBridgeScript : HostObject = HostObject.getRoot(HostObject.extensions[0]);
    and HostObject.extensions[0] is something like 'com.adobe.illustrator'. So I tried other strings here (e.g. running inside Illustrator, I tried 'com.adobe.photoshop') - no luck. Got a null in myBridgeScript.
    I looked at the CSXSEvents - but as far as I understand those would only help me when Photoshop is already running - Bob Stucky's cookbook article
    http://cookbooks.adobe.com/post_Inter_Application_Communication_with_the_Creative-18456.ht ml
    ends with: 'Possible extensions would be to launch Photoshop, if necessary, using Air's NativeProcess'. That sounds like bad news, and seems to indicate I'd have to go search for the Photoshop app path the hard way (keeping in mind that some people install their Creative Suite in odd places, so it's not always in '/Applications/Adobe Photoshop CSsomething' or 'C:\Program Files\Adobe\Adobe Photoshop CSsomething').
    Now, I can go do this the complicated way (calling down to the underlying operating system, try to find the correct Photoshop app (there might be more than one), and launch the document through the OS) - but I was really expecting there would be a simple magical trick to do it in a much more direct manner - it's clear the Creative Suite apps know about each other, so I was hoping to find a way to rely on their internal smarts to launch documents from one CS app into another CS app.
    Any ideas?

    Any ideas?
    Hi Kris!
    Yeah. Wait for Vulcan in CS Next... (sorry I couldn't resist...)
    I first naively assumed I could just use the app property of the Photoshop class (i.e. 'com.adobe.csawlib.photoshop.Photoshop.app') from an extension hosted by Illustrator, but I am not having much luck...
    I'd expect that. The CSAW libs are basically all smoke and mirrors. If you can't do it using ExtendScript, you can't do it in ActionScript. One app does not know another app's DOM...
    The way I'd handle it would probably be using Bridgetalk on the ExtendScript side of things with a (double) callback going back to the ActionScript side of things once the Bridgetalk returns its results to the ExtendScript layer.
    We should probably get together to solve this problem for the long-term...
    Harbs

  • Can you launch an android app from an android app built with air?

    Hi I might a have project coming up soon where one of the requirements is that the android air application can launch another application on the device...
    In pure java this would look something like this....
    Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.rpg.rbar");
    startActivity(LaunchIntent);
    Does anyone no if I can perform a similar method using as3
    Thanks
      Aidan

    Try the below.  Found this at the below link. 
    http://www.blogbyben.com/2013/04/launching-android-app-from-adobe-air-app.html
    var url:String = ("intent:#Intent;" + "action=android.intent.action.MAIN;" + "category=android.intent.category.LAUNCHER;" + "component=com.android.settings/.Settings;" + "end");  navigateToURL(new URLRequest(url));
    Question I have is, is there any way to get a list of currently installed apps?

  • How can I launch an external app from a keynote presentation?

    I'm trying to launch a Prezi presentation ("Prezi.app") from a keynote presentation, but don't know how to do it.
    Links in keynote can only refer to websites or slides within the presentation, but not to start another App, like in - I hate to say it - Powerpoint.
    Any ideas?
    Thanks
    Juergen

    Keynote is specifically prevented from opening applications.
    In Keynote 09 (the previous version), hyperlinks can:
    Jump to a slide in the same presentation
    Open a webpage in the computer’s default web browser
    Open another Keynote document
    Open an email message
    Exit the slideshow
    in Keynote 6 (the latest version) hyperlinks can:
    Jump to a Slide in the same presentation
    Web page
    Mail opens a pre-addressed email message
    Exit the presentation

  • Launch desktop AIR app from swf button

    I have a very simple task. I have an AIR app installed. All I want to be able to do is launch it from a swf button. I am building the swf button in Flash CS6. How do I do this? All it has to do is launch the app. No fancy stuff, no installs, no validation. Just launch the darn app. I can't seem to find a simple solution. Thanks!

    Not sure exactly why yet, but I finally found something that worked!!!! Hope this saves someone else hours of research:
    myCustomBtn.addEventListener(MouseEvent.MOUSE_DOWN, versionDetectCallback);
    var _air:Object;
    var _loader:Loader;
    var appID:String = "thenameofmyapp";
    var pubID:String = " "; 
    function loadAir() : void
    _loader = new Loader();
    var loaderContext:LoaderContext = new LoaderContext();
    loaderContext.applicationDomain = ApplicationDomain.currentDomain;
    _loader.contentLoaderInfo.addEventListener(Event.INIT,onInit);
    _loader.load(new   URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"),loaderContext);
    function onInit(event:Event) : void
    _air = event.target.content;
            //the pubID argument resolves to and empty string ""  
            _air.getApplicationVersion(appID, pubID, versionDetectCallback);
    function versionDetectCallback(event:MouseEvent) : void
           _air.launchApplication(appID,pubID);
    loadAir();

  • How to call a remote external c++ program from a local java program?

    local java program pass some parameters to a remote C++ program and get the result from that C program output.

    You could use a tcp/ip connection (e.g. with Sockets), and pass the parameters as Strings in the socketstream.

Maybe you are looking for

  • Is there a way to open the mic using apple remote desktop

    Is there a way to open the mircophone channel using Apple Remote Desktop so I can listen on anything thats happening at my computer at home? If not is there another software that would work? Also is there a way to use apple's software to control and

  • Can't sync iTunes after installing new hard drive

    My iPhone was working fine, syncing to iTunes with many songs downloaded, until my hard drive crashed. I replaced the drive and added an internal back up and can no longer download anything. I get an error message with words to the effect that I "don

  • Add photos option missing in lightroom widget

    I attached an image from an older tutorial out on YouTube regarding creating a Lightbox in Adobe's Muse. We are running the latest Adobe Muse CC version and whether I try to create a lightbox, blank photo display or anything else for a photo gallery,

  • A question about table model

    I created a table model and use JTable to display content of a database's table with that model. The problem is: when I update a data to data1 in a cell (first column) and hightlight another cell (second column), all cells of first column change cont

  • Is there an easy way to "bulk create" AP Templates

    I'm adding a campus to an existing WCS.  Campus has six buildings, each building has up to 9 floors.  Most floors of the buildings are identical, but every now and then we change the SSIDs deployed on a "per floor basis". I'm wondering if there is a