Calling applications from javafx

hi,
how to call other application such as winamp, firefox, etc from javafx.

Have a look at the documentation of java.lang.ProcessBuilder [http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html]
General pointer for processes in Java:
- you DO need to consume the content of the standard output and error output (if any) in order for your app to execute correctly.
- "consuming" means empting their content (getting rid of it, saving it to a log, exporting it to the GUI, whatever). Can be done in separate Thread or task (see FX pointers below).
- standard ouput stream is returned by getInputStream() in the Process class (I know the name is misleading but from Java's point of view, the process' output is an input stream).
- error ouput stream is returned by getErrorStream() in the Process class (same)
Pointers for processes in JavaFX:
- use javafx.async.JavaTaskBase and javafx.async.RunnableFuture to create an async FX task to start & launch the process and to consume its streams.

Similar Messages

  • Calling SOAP From JavaFX

    Hi to all,
    Is there any way to Calling SOAP From JavaFX? How?
    Thanks in advance.

    I am not sure about SOAP, but you can use REST-based web services with Javafx.

  • Calling javahelp from javafx

    I have JavaHelp accessed from a Java application. I am moving the application to JavaFX. I have tried rewriting the code I have but cannot make it work.
    Does anyone have a working example?

    The following code compiles but gives a runtime error on the HelpSet line. It doesn't like the null which appears to ask to system to find the default classloader.
    public class myHelp {
    static public HelpBroker startJavaHelp()
    HelpBroker hb = null ;
         URL url = null;
    try
         {   url = new URL("file://help/help.hs");
    HelpSet hs = new HelpSet(null,url);
    hb = hs.createHelpBroker();
    System.out.println("created help broker");
         catch(Exception e)
         {   e.printStackTrace();
    System.out.println("Url error here " + url);
         return hb ;
    I can use ClassLoader instead but cannot determine what to load.
    static public HelpBroker startJavaHelp()
    HelpBroker hb = null ;
         URL url = null;
    String helpHS = "help/help.hs";
    ClassLoader cl = ecowand.Main.class.getClassLoader();
    try
         {   url = HelpSet.findHelpSet(cl, helpHS);
    HelpSet hs = new HelpSet(null,url);
    hb = hs.createHelpBroker();
         catch(Exception e)
         {   e.printStackTrace();
    System.out.println("Url error here " + url);
         return hb;
    The line
    ClassLoader cl = ecowand.Main.class.getClassLoader();
    flags an error in netbeans. It appears to only want .java file here, not .fx
    In my fx program, I call startJavaHelp() on startup, the idea being that this would give me the required HelpBroker that I could use, somehow, in the action when the Help button is pressed.
    bye

  • Calling application from other database

    It's possible to call an application on another database, without informing user and password again?

    Sorry for being fastidious, but I don't think you can "call" an Apex application as you would call a database procedure for instance. So I assume you mean navigate from one Apex application to another Apex application in a different database.
    If you use single sign-on (SSO), that is a piece of cake.
    If you don't, there is no straightforward way I think. You can use some ingenious ways to get round it though, for instance:
    - In the calling application, using a database link, insert a token in some table in the other database along with the username and a timestamp.
    - Pass that token and the username in the URL as a parameter to an "auto login page" in the other application
    - In the "auto login page" of the other application, check whether the token/username combination is valid and, if it is, auto-login the user using the provided username.
    You also could use other fancier techniques like queues. Maybe others may have other suggestions.
    I hope this helps
    Luis

  • Call application from VB

    Hi guru!
    We have developed an application with forms 10g. Is it possible to call our application from another application which is developed in VB.From VB user wants to send some parameters also.How can I get this parameter value from my application which is developed in forms10g
    please help me!
    Mokarem.
    ======

    Hi there
    Oracle forms runs in a browser. You can call it will an URL contain all the parameters you require for the application as well as various environmental parameters such as form userid etc.
    e.g. http://testserver:7777/forms90/f90servlet?config=myConfig&otherparams=userid=bla/bla@dev&form=test.fmx&myparam1=hello&myparam2=world
    From my example my form test.fmx will contain parameters param1 and param2.
    Cheers
    Q

  • Calling javascript from JavaFX

    This is well documented, yet I am having trouble communicating with JavaScript from JavaFX. The relevant snippet is:
    WebView wv = new WebView();
    WebEngine we = wv.getEngine();
    String content = FileUtils.readFileToString(new File("test.html"));
    we.loadContent(content);
    we.executeScript("changeBackground();");Which reads the following content:
    test.html:
    <html>
    <body>
    <script type="text/javascript">
    document.bgColor = "#cccccc";
    function changeBackground()
      document.bgColor = "#ff0000";
    </script>
    </body>
    </html>giving error:
    netscape.javascript.JSException: ReferenceError: Can't find variable: changeBackground
         at com.sun.webpane.platform.WebPage.twkExecuteScript(Native Method)
         at com.sun.webpane.platform.WebPage.executeScript(WebPage.java:1438)
         at javafx.scene.web.WebEngine.executeScript(WebEngine.java:811)
         at com.javainc.tmi.WebTest.init(WebTest.java:30)
         at com.javainc.tmi.WebTest.start(WebTest.java:44)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
         at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
         at java.lang.Thread.run(Unknown Source)I've tried it without the semi colons at the end as well as every permutation I can think of.
    When I remove the executeScript code, the webview displays and turns the screen grey as it should.
    Is this a bug or am I missing something obvious?
    I am using 64 bit jdk1.7.0_09 on Windows 7.
    - Pat

    The document loads into the WebEngine asynchronously.
    You have to wait for it to finish loading before you try to run a script on it.
    For example, you can listen to the document property:
    we.documentProperty().addListener(new ChangeListener<Document>() {
      @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
        if (newDoc != null) {
          we.documentProperty().removeListener(this);
          we.executeScript("changeBackground();");
    });Or you could grab the WebEngine's LoadWorker and listen for it's state change.
    Some shorthand where you provide the load or loadContent method with a CallBack to be executed in the event of a successful page load might be convenient, so you could file a request in jira if you'd like that, but the listener methods work ok too.
    Full executable example (using your test.html):
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.web.WebEngine;
    import javafx.scene.web.WebView;
    import javafx.stage.Stage;
    import org.w3c.dom.Document;
    import java.io.*;
    public class ScriptExecutive extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(final Stage stage) {
        final WebView wv = new WebView();
        final WebEngine we = wv.getEngine();
        we.documentProperty().addListener(new ChangeListener<Document>() {
          @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
            if (newDoc != null) {
              we.documentProperty().removeListener(this);
              we.executeScript("changeBackground();");
        String content = FileUtils.readFileToString(new File("test.html"));
        we.loadContent(content);
        stage.setScene(new Scene(wv));
        stage.show();
      static class FileUtils {
        public static String readFileToString(File file) {
          try {
            StringBuilder builder = new StringBuilder();
            String line;
            BufferedReader reader = new BufferedReader(new FileReader(file));
            while ((line = reader.readLine()) != null) builder.append(line);
            return builder.toString();
          } catch (FileNotFoundException e) {
            System.out.println("Cannot find: " + file);
            return "";
          } catch (IOException e) {
            System.out.println("Oh snap, it broke: " + e);
            return "";
    }

  • Calling application from a servlet

    Hi,
    I am having trouble sending automated email messages from a servlet. Someone else in this office has had luck with getting an application to send email. I was wondering if my servlet could call the application .class file? It is possible for a servlet to call an application and if so how do I do it?
    Thanks

    // you need activation.jar in you class path
    // also note that your SMTP host may have to allow relaying from your
    / ip address
    import java.io.*;
    import java.net.InetAddress;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    * @author Scott Shaver
    * @version
    public class EMailMessage {
    private static String mailHost = null;
    private static String to = null;
    private static String subject = null;
    private static String from = null;
    private static String text = null;
    private static String cc = null;
    private static String bcc = null;
    private Vector attachments = new Vector(2);
    private boolean bodyIsHTML = false;
    /** Creates new Message */
    public EMailMessage() {
    /** Creates new Message */
    public EMailMessage(String to, String from, String subject, String text) {
    setTo(to);
    setFrom(from);
    setSubject(subject);
    setText(text);
    /** Creates new Message */
    public EMailMessage(String to, String from, String subject, String text, String host) {
    setTo(to);
    setFrom(from);
    setSubject(subject);
    setText(text);
    setMailHost(host);
    public void sendNoExceptions() {
    try
    send();
    catch(Exception x)
    public void send() throws AddressException, MessagingException {
    try
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailHost);
    MimeBodyPart msgTextBP = null;
    Multipart content = new MimeMultipart();
    Session session = Session.getInstance(props, null);
    javax.mail.Message msg = new javax.mail.internet.MimeMessage(session);
    if(from!=null)
    msg.setFrom(new InternetAddress(from));
    if(to!=null)
    msg.setRecipients(javax.mail.Message.RecipientType.TO,InternetAddress.parse(to, false));
    if(cc!=null)
    msg.setRecipients(javax.mail.Message.RecipientType.CC,InternetAddress.parse(cc, false));
    if(bcc!=null)
    msg.setRecipients(javax.mail.Message.RecipientType.BCC,InternetAddress.parse(bcc, false));
    if(subject!=null)
    msg.setSubject(subject);
    if(text!=null)
    msgTextBP = new MimeBodyPart();
    if(bodyIsHTML)
    msgTextBP.setContent(text, "text/html");
    else
    msgTextBP.setText(text);
    content.addBodyPart(msgTextBP);
    //msg.setText(text);
    msg.setHeader("X-Mailer", "EMailMessage");
    msg.setSentDate(new Date());
    int fac = attachments.size();
    for(int loop=0;loop<fac;loop++)
    File file = (File)attachments.elementAt(loop);
    DataSource source = new FileDataSource(file);
    MimeBodyPart bp = new MimeBodyPart();
    bp.setDataHandler(new DataHandler(source));
    bp.setFileName(file.getName());
    content.addBodyPart(bp);
    msg.setContent(content);
    Transport.send(msg);
    catch(AddressException ax)
    System.out.println("EMailMessage.send() AddressException");
    System.out.println(ax);
    ax.printStackTrace();
    catch(MessagingException mx)
    System.out.println("EMailMessage.send() MessagingException");
    System.out.println(mx);
    mx.printStackTrace();
    public void addAttachment(File a) {
    attachments.addElement(a);
    public void setMailHost(String host) {
    mailHost = host;
    public String getMailHost() {
    return mailHost;
    public void setTo(String to) {
    this.to = to;
    public String getTo() {
    return to;
    public void setSubject(String subject) {
    this.subject = subject;
    public String getSubject() {
    return subject;
    public void setFrom(String from) {
    this.from = from;
    public String getFrom() {
    return from;
    public void setBodyIsHTML() {
    bodyIsHTML = true;
    public void setText(String text) {
    this.text = text;
    public String getText() {
    return text;
    public void setCC(String cc) {
    this.cc = cc;
    public String getCC() {
    return cc;
    public void setBCC(String bcc) {
    this.bcc = bcc;
    public String getBCC() {
    return bcc;
    public static void main(String[] args) {
    /*EMailMessage m = new EMailMessage(
    "[email protected]",
    "[email protected]",
    "This is the subject of a test message.",
    "This is the text of the message.\nThis is another line.",
    "mail");
    try{
    m.send();
    catch(Exception x)
    x.printStackTrace();

  • Start JavaFX application from Java

    Hello,
    I have the following scenario:
    I have a small JavaFX application and a big Java application. Now the Java App should call the JavaFX App to start up.
    Further the JavaFX App has to call some methods from the Java App. Is this possible?
    What is the best approach for my scenario?
    Maybe somebody has made some experiences ..
    thanks!
    Edited by: 799878 on 03.11.2010 07:54

    "Now the Java App should call the JavaFX App to start up."
    I'm assuming that the JavaFX code and the Java code are in the same application, correct? If so, then there are hacks available, but no standard way to start up JavaFX from Java will exist until the APIs have been ported from JavaFX script to Java.
    "Further the JavaFX App has to call some methods from the Java App. Is this possible?"
    Yes. Java can be called from JavaFX just fine. Just be careful if you use multi-threading or time consuming operations, since JavaFX script is apparently single threaded. Also be aware that netbeans normally compiles JavaFX applications with JSE version 1.5, so library features that did not exist until later versions will not be available by default.

  • How to Call a AIR application from Flex Application

    Hi,
        I have Used AIR (Desktop application) in Flex Builder to Upload a File from a local path and save it it a server path.
    I need to Call this AIR(Desktop application) from my Flex Application.... i.e
    I am using a link button to send a event using Script and Forward that Desktop application  from Flex Screen
    But it doesnot load that (Desktop application)  in Screen. Only Balnk screen is loaded from path
    Here is the code
    AIR(Desktop application)
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="openBrowseWindow();">
    <mx:HTTPService id="urlpath" showBusyCursor="true" useProxy="false" method="
    POST" url="http://localhost:8080/nat/FlexAction.do?method=UrlPath"result="pathresult(event)"
    fault="faultHandler(event)"
    >  
    </mx:HTTPService> 
    <mx:Script>
    <![CDATA[
    import mx.events.FileEvent; 
    import mx.rpc.events.ResultEvent; 
    import mx.rpc.events.FaultEvent; 
    import mx.utils.ObjectUtil;  
    import mx.controls.Alert;
    private  
    var openFile:File = new File() 
    private  
    function openBrowseWindow():void{openFile.addEventListener(Event.SELECT, onOpenFileComplete);
    openFile.addEventListener(Event.OPEN, load);
    openFile.browse();
    private  
    function load():void{Alert.show(
    "load"); 
    var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png"); 
    //var textTypes:FileFilter = new FileFilter("Text Files (*.txt, *.rtf)", "*.txt; *.rtf"); 
    var allTypes:Array = new Array(imageTypes);openFile.browse(allTypes);
    private  
    function faultHandler(event:FaultEvent):void { 
    //Alert.show("Fault")Alert.show(ObjectUtil.toString(event.fault));
     private  
    function pathresult(event:ResultEvent):void{Alert.show(
    "res") 
    //Alert.show(ObjectUtil.toString(event.result));}private  
    function onOpenFileComplete(event:Event):void{ 
    //mx.controls.Alert.show("event: "+event.target.nativePath +"UR!!!"); 
    var pPath = event.target.nativePath; 
    var parameters:Object = {FlexActionType:"PATH",path:pPath};  
    // Alert.show("Image Selected from Path : "+pPath); urlpath.send(parameters);
    //Alert.show("Passed.."+parameters);}
    ]]>
    </mx:Script>
    <mx:Button click="openBrowseWindow();onOpenFileComplete(event)" name="Upload" label="Upload" x="120.5" y="10"/> 
    Here is Mxml Code for Flex Application
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="http://ns.adobe.com/air/application/1.0.M4" >
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    private function Upload():void{ 
    // CursorManager.setBusyCursor();  
    //var url:String = "HomeAction.do?method=onLoad"; 
    //var url:String = "assets/Air.swf"; 
    var url1:URLRequest = new URLRequest("assets/Air.swf");navigateToURL(url1,
    "_self"); 
    // CursorManager.removeBusyCursor(); }
    ]]>
    </mx:Script>
    <mx:LinkButton id="up" click="Upload()" x="295" y="215" label="UpLoad"/>
    In this code i forward using s url to Open tat  Desktop application but a blank screen appears with out the proper output...
    Please Help me in this to forward AIR from Flex Screen..
    Thanks in Advance
    With Regards
    Gopinath.A
    Software Developer
    First Internet Systems Pvt. Ltd.,
    Chennai

    try this
    http://www.leonardofranca.com/index.php/2009/09/17/launching-an-installed-air-application- from-the-browser/
    regards
    Leonardo França
    Adobe Certified Expert Flex 3 with AIR
    Adobe Certified Expert Rich Internet Application Specialist v1.0
    Adobe Certified Expert Flash CS3 Professional
    Certified Professional Adobe Flex 2 Developer
    Adobe Certified Professional Flash MX 2004 Developer
    http://www.leonardofranca.com
    http://twitter/leofederal
    Manager AUGDF - Adobe User Group do Distrito Federal
    http://www.augdf.com.br
    http://twitter/augdf

  • How to call a VB application from Java

    Hi,
    does anybody know how to call a VB application from java.
    Would appreciate if you can provide me with an example.
    thanks

    try exec()ing the cad program with the name of the file as a command line parameter...
    Runtime.getRuntime().exec("CADProg.exe Test.prt");
    i have no clue if this will work but it seems like it's worth a try.

  • How to call an applescript application from Office 2011 Excel VBA

    All:
    I have been pounding my head how to implement a working VBA application into the Mac environment. I have tried a number of approaches calling applescript from VBA. I would like to call my applescript application and pass one argument. My applescript application is as follows:
    <code>
    on run argv
    set theURL to (item 1 of argv)
    set p_path to do shell script "echo ~"
    set m_path to POSIX file p_path
    set theName to text -((offset of "/" in (reverse of characters of theURL) as text) - 1) thru -1 of theURL
    set theFile to (p_path & "/Downloads/" & theName)
    set macPath to (POSIX file theFile)
    do shell script "/usr/bin/curl " & theURL & " -o " & quoted form of POSIX path of macPath
    end run
    </code>
    My last attempt within VBA is:
    <code>
    Sub SaveMetaDataFile(URL As String, shortFileName As String)
    Dim scriptToRun As String
    Dim posixcmd As String
    posixcmd = ThisWorkbook.Path
    scriptToRun = "tell application " & posixcmd & ":MetaDataFileDownloadScript.app " & URL
    MsgBox "[" & scriptToRun & "]"
    MacScript (scriptToRun)
    </code>
    I first tried to call the script directly without the "tell application" and I still obtain an error. I also tried the following in VBA and I get the same error with the last lane of code:
    <code>
    scriptToRun = "set theURL to " & """" & URL & """" & Chr(13)
    scriptToRun = scriptToRun & "set p_path to do shell script " & """" & "/bin/echo ~ " & """" & Chr(13)
    scriptToRun = scriptToRun & "set m_path to " & """" & posixcmd & """" & Chr(13)
    scriptToRun = scriptToRun & "set theName to " & """" & shortFileName & """" & Chr(13)
    scriptToRun = scriptToRun & "set theFile to (p_path & " & """/Downloads/""" & " & theName)" & Chr(13)
    scriptToRun = scriptToRun & "set macPath to (POSIX file theFile)" & Chr(13)
    scriptToRun = scriptToRun & "do shell script " & """" & "/usr/bin/curl " & """" & " & " & " theURL " & " & " & """" & " -o " & """" & " & " & " quoted form of POSIX path of macPath"
    MsgBox scriptToRun
    'scriptToRun = scriptToRun & "do shell script " & """/usr/bin/curl """ & " & " & " theURL " & """ -o """ & " & " & " quoted form of POSIX path of macPath"
    MacScript (scriptToRun)
    </code>
    The above code is from the applescript application. The applescript application works well using the terminal via osascript. For example:
    xenas-imac:Census Work Xena$ osascript MetaDataFileDownloadScript.app http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls
    xenas-imac:Census Work Xena$
    The whole goal is to download a file into the Download directory from Excel to allow the next step to import the file into Excel for the user. Any help here would be great!
    Thank you;
    Lori

    Update:
    Ok have the module almost working and matches the syntax within the test applescript I had created, but the VBA code via the MacScript() call is generating an invalid procedure or argument call. The following is the test applescript to compare the created string to be passed to VBA MacScript() function:
    <code>
    set appPath to quoted form of POSIX path of "Macintosh HD:Users:Xena:Desktop:Census Work:"
    do shell script "/usr/bin/osascript " & appPath & "MetaDataFileDownloadScript.app " & "http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls"
    </code>
    The following is the VBA module that generates the above word for word as far as I can tell:
    <code>
    Sub SaveMetaDataFile(URL As String, shortFileName As String)
    Dim scriptToRun As String
    Dim posixcmd As String
    posixcmd = ThisWorkbook.Path
    posixcmd = posixcmd & ":"
    scriptToRun = "set appPath to quoted form of POSIX path of " & Chr(34) & posixcmd & Chr(34) & Chr(13)
    scriptToRun = scriptToRun & "do shell script " & Chr(34) & "/usr/bin/osascript " & Chr(34) & " & appPath & " & Chr(34) & "MetaDataFileDownloadScript.app " & Chr(34) & " & " & Chr(34) & URL & Chr(34)
    MsgBox "[" & scriptToRun & "]"
    MacScript (scriptToRun)
    End Sub
    </code>
    The message box in the above VBA code matches my test applescript file and I have taken the output of the MsgBox and used it in a test applescript and it works great, but VBA is throwing "Run-time error '5': Invalid procedure call or argument".
    Looking at Microsoft's definition it takes a string argument and I have made sure that scriptToRun is a string type, so at this point I suspect there is something wrong with the MacScript() funciton, or I am missing something above. Is there another way to call an applescript application from VBA outside the MacScript() function? Or is there something I am missing? Any help or suggestions is needed.
    Thank you;
    Lori (CodeXena)

  • Calling Portal application from current webdynpro java application

    Hi Experts,
    We are having Portal 7.4 SP6 framework.
    Application-A -> Web-dynpro java program pushing data into R/3 using BAPI.
    Application-B -> Std. WD-ABAP iView template.
    Currently, I am working in web-dynpro java program, where I am pushing some data into R/3 using BAPI in Application-A. And this BAPI data is getting displayed in another z-Tcode and displayed in portal using web-dynpro Abap iView template, which is Application-B
    Now I want to align this application, so that Application- A should call Application-B from within the WD-Java framework. And here Application-A should get closed and open application-B.
    Is there any standard process using Web-dynpro Java to handle such scenario.
    Regards,
    Hanif

    Hi Siddharth,
    Well, I think you can go for Portal Navigation concept.
    Please check the required source code in WDR_TEST_PORTAL_NAV Web Dynpro component. That will illustrate both Page based Navigation and Object based Navigation.
    Hope that should solve your problem.
    Regards
    <i><b>Raja Sekhar</b></i>

  • How to call a WD JAVA application from a WD ABAP application

    Hi experts,
    Here I have two applications with me. One has been created through WebDynpro ABAP while the other one has been created through WebDynpro JAVA. Now i have to call upon the JAVA aplication from my ABAp application. In other words in need to integrate both the applications so as to have an easy navigation in between them.
    In the whole process I need to take care that the data is not lost from both ABAP or JAVA side.
    Please help me someone knows the solution.
    Regards,
    Kaustubh Maithani

    Hi,
    Usally to run WebDynpro for Java Application, we get the Application URL.
    If you want to call this WebDynpro Java Application from Webdynpro Abap, then create UI element like Link to Action or LinktoURL and give the url as WebDynpro for Java URL.
    Regards,
    Lakshmi Prasad.

  • Calling Webdynpro Java Application from Webdynpro ABAP Application.

    Hi,
    We have developed one Application using Webdynpro Java and I m in need to call the Webdynpro Java application from Webdynpro ABAP.
    Require Suggestions to acheive this.
    Thanks In advance.
    Reg,
    Ajay.

    Dear Ajay,
    Assuming that both your applications WDA & WDJ are in the portal & you don't have to pass any parameters to the WDJ application.
    Write the following code on the action  where you would call the WDJ application.
      DATA:
            lr_compcontroller TYPE REF TO ig_componentcontroller,
            l_component TYPE REF TO if_wd_component ,
            lr_port_manager TYPE REF TO if_wd_portal_integration ,
            wa_navigation TYPE navigation.
      lr_compcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_component = lr_compcontroller->wd_get_api( ).
      lr_port_manager = l_component->get_portal_manager( ) .
    * The value inserted into the navigation-target field can be found in the Portal
    * content administration tab of your portal. It is the ID or PCD Location field
      wa_navigation-target = pcd. " Please provide the PCD Location of the WDJ Application here.
      wa_navigation-mode   = '0'.  "0 = INTERNAL(same page) and 1 = EXTERNAL(new page).
      CALL METHOD lr_port_manager->navigate_absolute
        EXPORTING
          navigation_target = wa_navigation-target
          navigation_mode   = wa_navigation-mode.
    You can get the PCD from the Page properties of the WDJ application page in the Portal.
    Hope it helps!
    Warm regards,
    Upendra Agrawal

  • Calling java application from Oracle forms button

    Hi all,
    I have a problem. The idea is to call Java desktop application when button is pressed. I have used this (above) line of code, but there is no results. When I start form in local everything is fine but when I start from server it doesn't work. Does anyone has that kind of problem and how is solved?
    Thanks in advance.
    __Code is:__
    DECLARE
    v_path VARCHAR2(1000);
    BEGIN
    v_path:= '\\location\Java_Application.jar';
    HOST(v_path);
    END;

    First, please start here:
    http://blogs.oracle.com/shay/2007/03/02/
    As for what you are doing and the problem, it will be difficult to give an exact reason, but here are a few comments which will apply regardless of the platform, version, and installation type.
    1. In most case, when calling HOST from Forms the shell that is started does not include all of the system environment variables. This means for example, if a java.exe is needed (on Windows), you would need to specify its path as part of the call or use a batch file rather than calling a command or app directly. The batch file would first set all the needed environment variables (i.e. PATH, CLASSPATH, etc)
    2. If you are running a newer version of Forms, you have a middle tier. This is were your HOST call will be executed. So, if you are expecting this to occur on the client it will not work. You would need WebUtil for client side calls.
    3. Calling a network resource (i.e. shared drive) is not permitted on Windows platforms when called from a Windows Service. Doing so can be seen as a security vulnerability. This can be overridden, but I would suggest that doing so is not a good idea. All files needed to run your app should be made available locally. If files exist on a remote machine, they should be temporarily brought to the machine (e.g. using ftp, sftp, etc) where they are needed and removed later if necessary. If you are running a newer version of Forms, the Forms runtime process belongs to a Windows Service, even if indirectly as a child.
    4. Calling a jar directly is not the proper way to call a java app. Refer to the following:
    http://download.oracle.com/javase/tutorial/deployment/jar/run.html

Maybe you are looking for

  • LCD goes blue/black after login;  fine in Safe Mode

    My mom's mac mini is experiencing a very frustrating problem. She has an Acer 19 inch LCD. After startup she'll start up Safari or iChat or Mail, etc. and her display will go all blue and then just go black. Sometimes it will flicker back to usable a

  • Problem with parameter and sql query

    I've a problem with te query of my report. The query is: SELECT [DESCRIPTN]       ,[LOGTIME]       ,[STATUS]       ,[CARDNO]       ,[LOGDATE] FROM [Granta5P0].[dbo].[TIMELOG32] where cardno in ({?cardNo}) the parameter as multiple values checked so I

  • Changing the default to location of Archiver data

    Hi, Is there any way that we can change the default location of the Archiver data. By default is goes to archives folder, i want it to goto some other folder. Similarly when u take up the backup of site. i want it also to be stored in some other fold

  • Flash recovery area issue. I can not open the database??

    Hi all I am using oracle 11.2.0 .1.0 on windows when i tried to start the database I got the following error. ORA-03113: end-of-file on communication channel I clear out all information in Trace file. I cleared out all operating system level audit tr

  • How to burn an iPhoto slide show to a DVD

    is it possible to burn an iPhoto slide show to a dvd ?