How to get the installation path or ms word using forms 6i

dear all
i want to know the client side full path with exe file name of ms word or acrobat reader e.t.c. from forms 6i
actually i want to run word file on button click. according to the type of file extension. if the file is related to .doc then open the file in word, and if the file extension is .pdf then run the file in acrobat.
how can i do this in forms 6i. without using any utlity like d2k.
regards
Asif iqbal ( Software Engineer )
Lucky Tex
Karachi, Pakistan

Assuming that you are using client/server forms6i, you can use the HOST command to start a DOS session and then use START.
e.g.
start xyz.doc - starts Word and opens xyz.doc
start abc.pdf - starts Acrobat, etc..
start bcd.log - starts Notepad, etc..

Similar Messages

  • How to get the file path of selected file using JFileChooser

    Hi All,
    I am trying to store the file on my FTP server after selecting the file from the user workstation using JFileChooser. But I am not able to write the file on FTP server or on user local machine where application is running. I am new to this FTP server coding. Can anyone help me in this.
    This is the code I wrote on button click user will able to select the file:
    String filename1;
    File file;
    JFileChooser fc = new JFileChooser();
    fc.showOpenDialog(this);
    file = fc.getSelectedFile();
    filename1 = file.getPath();
    txtFilePath.setText(filename1);
    Below is the code to write the file on my local machine first:
    BufferedWriter outFile = new BufferedWriter( fileName ) );
    outFile.write();
    outFile.flush( );
    outFile.close( );
    Any help will be greatly appriciated

    rp0428 wrote:
    >
    BufferedWriter outFile = new BufferedWriter( fileName ) );
    >
    There is NOTHING named 'fileName' in any of the code you posted so that code can't possibly compile let alone actually run.
    How can anyone help you if you won't post the actual code you are using?Its just a random snippet of other code that is totally irrelevant to this thread if you ask me.

  • How to get the current path of my application in java ?

    how to get the current path of my application in java ?
    thanks

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • How to get the absolute path of logicalhost server domain on Windows Sun

    i am reading a file from Xsql Folder, that is located in the logicalhost Sun\AppServer\domains\domain1\applications\j2ee-apps.(IN Sun Application Server)
    I am pretty sure that using the absolute path will solve this issue, so my first question is: How to get the absolute path of logicalhost server domain on Windows?
    i tried with System.getProperty("com.sun.aas.instanceRoot").
    but i am able to retrive Sun\AppServer\domains\domain1 upto this .i am unable to retrive Sun\AppServer\domains\domain1\applications\j2ee-apps.
    please suggest me how u can get absolute path in sun application server

    Take a look here

  • How to get the absolute path of logicalhost server domain on Windows?

    My logicalhost server domain behaves strangely. I am reading a file from collaboration definiton, that is located in the logicalhost/is/domains/domain1/config folder. I thought, that this folder is used as an application root folder so I can read files like ./file from there. And it worked.
    But then I've installed the domain as a Windows service, restarted the PC. When the domain1 gets started, I get exceptions saying that the file can't be found. Then I restart the domain (in domainmgr.bat) and it works again.
    I am pretty sure that using the absolute path will solve this issue, so my first question is: How to get the absolute path of logicalhost server domain on Windows?
    And my second question is: Why does this happen?

    The default folder for a Windows Service is the system32 folder contrary to the instance root folder when starting it as a normal process.
    That's the why, haven't tried the how, but you should be able to get the value by calling System.getProperty("com.sun.aas.instanceRoot").
    Hope this helps
    Paul

  • How to get the full path instead of just the file name, in �FileChooser� ?

    In the FileChooserDemo example :
    In the statement : log.append("Saving: " + file.getName() + "." + newline);
    �file.getName()� returns the �file name�.
    My question is : How to get the full path instead of just the file name,
    e.g. C:/xdirectory/ydirectory/abc.gif instead of just abc.gif
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo extends JFrame {
    static private final String newline = "\n";
    public FileChooserDemo() {
    super("FileChooserDemo");
    //Create the log first, because the action listeners
    //need to refer to it.
    final JTextArea log = new JTextArea(5,20);
    log.setMargin(new Insets(5,5,5,5));
    log.setEditable(false);
    JScrollPane logScrollPane = new JScrollPane(log);
    //Create a file chooser
    final JFileChooser fc = new JFileChooser();
    //Create the open button
    ImageIcon openIcon = new ImageIcon("images/open.gif");
    JButton openButton = new JButton("Open a File...", openIcon);
    openButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showOpenDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would open the file.
    log.append("Opening: " + file.getName() + "." + newline);
    } else {
    log.append("Open command cancelled by user." + newline);
    //Create the save button
    ImageIcon saveIcon = new ImageIcon("images/save.gif");
    JButton saveButton = new JButton("Save a File...", saveIcon);
    saveButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showSaveDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would save the file.
    log.append("Saving: " + file.getName() + "." + newline);
    } else {
    log.append("Save command cancelled by user." + newline);
    //For layout purposes, put the buttons in a separate panel
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(openButton);
    buttonPanel.add(saveButton);
    //Explicitly set the focus sequence.
    openButton.setNextFocusableComponent(saveButton);
    saveButton.setNextFocusableComponent(openButton);
    //Add the buttons and the log to the frame
    Container contentPane = getContentPane();
    contentPane.add(buttonPanel, BorderLayout.NORTH);
    contentPane.add(logScrollPane, BorderLayout.CENTER);
    public static void main(String[] args) {
    JFrame frame = new FileChooserDemo();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);

    simply use file.getPath()
    That should do it!Thank you !
    It takes care of the problem !!

  • How to get the absolute path of a file from the local disk given the file n

    how to get the absolute path of a file from the local disk given the file name

    // will look for the file at the current working directory
    // this is wherever you start the Java application (cound be C: and your
    // application is located in C:/myapp, but the working dir is C:/
    File file = new File("README.txt"); 
    if (file != null && file.exists())
        String absolutePath = file.getAbsolutePath();

  • How to get the ablolute path of the web application in WebSphere?

    How to get the ablolute path of the web application in WebSphere?
    For example:
    I have installed IBM WebSphere on D:\WebSphere\Appserver, and I created a new appliction named "myapp" on D:\myapp,. How can I get the absolute path of application "myapp"? In other words,how can I get the absolute path of the application's
    root directory?

    In the WebSphere(default), what directory is the Java Bean's root directory ?

  • How to get the document path of the pictures uploaded for products?

    Hi Gurus,
    How to get the document path of the pictures uploaded for products uploaded through tcode COMMPR01?
    Many Thanks,
    Neeraj

    client path.
    I need to get the client path in order to download files form server to client.
    Best regards,
    Huy.

  • How to get the project path ?

    In my servlet, how do I get the project path ?
    I have the following dir structure :
    Web_App
      + build
        lib
      + nbproject
      + src
        test
      + web ( index.jsp , my.jsp , my.html )
        + Dir_Docs ( my file : ABC.txt ) My Servlet is :
    public class My_Servlet extends HttpServlet
      public void init(ServletConfig config) throws ServletException
        super.init(config);
      public void destroy() { }
      protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
        response.setContentType("text/html");
        PrintWriter out=response.getWriter();
        out.println(System.getProperty("user.dir"));   
    }What I got was : C:/apache-tomcat-6.0.14/bin/
    How to get the project path ? Which is : C:/Web_App/ ?

    Yes, config.getServletContext().getRealPath("index.jsp"); got the job done !
    Thanks.

  • How to get the application path?

    Does some body know how to get the application path in Java? Here is an example about what I'm thinking: Let's imagin the application is on "c:\try" or "c:\ProgramFiles\MyApp". My question is how can I find the path where the application is. Please give an example if you know the answer. Thank you so much.

    Those two replies give you some useful directories, it's true, but maybe not what the OP asked. However the OP asked for something that doesn't have a meaning (applications don't have to be "on" any directory, whatever that might mean).
    Would the OP like to describe what the actual problem is here?

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to get the customize url of an portlet using PLSQL

    How to get the customize url of an portlet using PLSQL.

    Are you trying to call the portlet Customization form directly from the browser?

  • How to get the size of physical memory by using system call ?

    how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • How to know the full path which is being used in the dataconnection .

    How to know the full path which is being used in the dataconnection without going and looking into coding.
    I am new to crystal reports.
    Plz advice.Thanks in advance
    Jay

    This forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.
    As you do not want to do any coding, this query is in the wrong forum. However, in most versions of Crystal Reports, you can look up the database connection information by simply opening the report in the CR designer. Then go to the database menu and select "Set Datasource Location..."
    Ludek

Maybe you are looking for