Get Application Path

Dear All,
In my Application, i want to save a File where the Application is installed.
How the get  the Path of the Application ?
 Thanks,
Ritesh
Solved!
Go to Solution.

Use the Current VI's path function in your main VI. Please read this document.

Similar Messages

  • How to get application path in java bean

    hi all,
    We will be using <%= application.getRealPath("/") %> for getting the application path in jsp. is there any similar way to find the path using a bean. Please do help....
    thanx
    Message was edited by:
    end

    I try to use application.getRealPath("/") in my .java file, but gets an error "application can't be resolved". Do you need to include any library in order to use "application.getRealPath("/")"?
    Thank you.

  • Getting application path when launching a Jar

    Hi,
    very simple
    how do you get the application path when launching a jar file?
    NNiol

    Unless you mean the standard application folder. That application path is an OS specific concept. On Windows systems, for example, you can get the application path by using System.getenv("ProgramFiles"); but that won't work on other systems.
    If you're looking for a constant location to store data files, you'd do better to create an application-specific directory under System.getProperty("user.home");.
    And if you're just looking for the place where your jar file is, you can successfully follow the previously given advice.
    --DNP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get Application path? Urgent!!!!

    Hai!
    I have developed one application in Swing. I want take application path in that application. How can I get? Anybody pls help to me.
    Thanks in advance
    Joseph

    You can try this code to get all properties:
    Properties props = System.getProperties();
    Enumeration enum = props.propertyNames();
    while(enum.hasMoreElements()){
         String name = (String)enum.nextElement();
         System.out.println("Prop Name: " + name + "\tValue: " + props.getProperty(name));
    }And to find more about printing you can check this URL:
    http://java.sun.com/j2se/1.4/docs/guide/jps/spec/jpsOverview.fm.html

  • Get application path directory

    hy,
    i'm trying to create a plug-in that run an application located in the same directory of the plug-in file.
    If i do
    system("./Rec.app/Contents/MacOS/AlbumExpressRecord");
    the application search the file in my home directory.
    Is there a function in the SDK that say me wath is the path of Photoshop directory???
    Thank you

    An FSSpec is the best we can do? Please tell me there's a way that doesn't use deprecated types and supports 64-bit? (Sorry, that's more of a rhetorical question to Adobe than directed at you).
    #if __LP64__
    typedef struct SPPlatformFileSpecification { /* this handles unicode file names */
    FSRef mReference;
    }  SPPlatformFileSpecification;
    #else
    typedef struct SPPlatformFileSpecification { /* Various things are casting this to FSSpec, so make sure the layout matches */
    /** The version number. */
    FSVolumeRefNum vRefNum;
    /** The unique identifier. */
    SInt32 parID;
    /** The file name string.  */
    StrFileName name;
    } SPPlatformFileSpecification;
    #endif
    typedef struct SPPlatformFileSpecificationW { /* this handles unicode file names */
    FSRef mReference;
    } SPPlatformFileSpecificationW;
    So I guess we only get modern types if we're 64 bits. I haven't touched an FSSpec in the last 8 years...

  • Getting application path

    Hi there! I'm developing a taglib and given a
    PageContext object, how can I get the relative path for my application? Like http://myhost/myapplication ???
    Thanks

    request.getRequestURL() will give you the url.
    have a look at http://javaalmanac.com/egs/javax.servlet/GetReqUrl.html?l=new
    for more details
    Christoph

  • Getting application Name

    Hi Experts,
    I have PCD path of portal page. Can I get application path(the full path with project path and application name) of the application that portal page is holding?
    Regards,
    Gopal

    Hi  Gopal,
    Check this [thread|how do i retrieve the url for external window;
    It may be useful to you.
    regards,
    Siva

  • How to find Application Path

    Hi
    How to get Application Path from form module (Any Built Ins)

    Hi,
    declare
    curform varchar2(100);
    begin
    curform:=get_application_property(current_form);
    end;
    hope it helps u..
    navneet jain
    [email protected]

  • How do you get the web application path from the servlet?

    I have created a web application which is installed in
    /webapps/myApplication
    /webapps/myApplication/data/users.xml
    /webapps/myApplication/WEB-INF/classes/myServlet
    How can you get the path to the "users.xml" file from the "myServlet" file?
    The code below doen's seem to return the xml file. anybody knows why?
    public class myServlet extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
    File myXmlFile = new File("/data/users.xml");

    Try this..
    String FileName = getServletContext().getRealPath("\\data\\users.xml");
    File myXmlFile = new File(FileName);
    hope this helps..

  • Probelm in getting absolute path of the application folder?

    I have problem in getting the absolute path of the application folder.
    I wriiten the following line in my action class:
    String absPath = getServlet().getServletContext().getRealPath("/");
    when i run my application 'DTH' in Tomcat server, I am getting correct path :
    C:\Tomcat\jakarta-tomcat-5.0.25\webapps\DTH
    But when i run this application in weblogic server, I am getting null value for the above line.
    Can any one help me in this?

    public java.lang.String getRealPath(java.lang.String path)
    This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).
    so, getRealPath() might not be a very good approach because of its different behavior when used from a war or exploded application.
    What you could do is:
    1. pass the path as a parameter inside web.xml (config files, log files etc)
    2. For dynamic lookup of files you could make use of ClassLoader.getResource().
    Hope it helps.

  • 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?

  • Get installation path of web application from class file

    Can anybody tell me how I can get the path on disk to the root of my web application from a class file. Im running under Tomcat 5.5 and I have 3 copies of the same webapp under 3 differenet directories:
    C:\xxx\dev\yyy
    C:\xxx\test\yyy
    C:\xxx\prod\yyy
    Based on which directory the web-app, I need to do a lookup on a properties file to pull the right jdbc connection to connect to the appropriate database. So it would be similar to using getServletContext().getRealPath("/") from a .jsp file.
    Thanks,
    Jason

    Sorry for not clarifying. I have a properties file with name/value pairs. I know where this properties file is and I can do a lookup in it. In this file, I have jdbc connection names which point to corresponding jdbc resources in my context.xml file.
    jdbcDevDatabase=jdbc/tfmDev
    jdbcTestDatabase=jdbc/tfmTest
    jdbcProdDatabase=jdbc/tfmProd
    These connections are for dev, test and prod databases. Now based on where the web-app is installed on disk, i.e-dev dir, test dir, prod dir, I want to retrieve the corresponding connection. The problem is I don't know how to get a handle to the web apps real path on disk without access to the request object or using getServletContext().getRealPath("/") which are not available to me in a class file.
    Thanks,
    Jason

  • Get SBO Application Path

    Good Morning,
    I am looking for a method to get the path of my SBO application.
    I need the path to automatically start a SBO-process.
    Thanks for helping. Have a nice day!
    Sebastian

    Hi Sebastian,
    In order to get the installation directory you need to take two steps:
    Under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\sap" read the GUID of the required product, for example if you wish to get the installation directory of the client read the value of "SAP Business One Client Setup" – the value is the installer GUID.
    Under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GUID" (where instead of GUID you need to put the GUID from step 1) read the "InstallLocation" value.
    Hope it helps
    Trinidad.

  • Get current path in Java LINUX?

    Hi,
    I m trying to get the current path of file using the getAbsolutePath.Its works fine (gets the current working directory) in Windows both in debug & release mode.Whereas, in LINUX ,It is not working.
    i.e.,It gets home path instead current path while running in release(by clicking jar file).
    File objfile = new java.io.File("SampleCloud.txt").getAbsoluteFile();
    JOptionPane.showMessageDialog(null, objfile.getAbsolutePath());
    Message box display home path instead of current path on linux.
    I dont know why its so.Ur help would be appreciated.
    System.getProperty("user.dir")
    I used it but its also taking the home dir path on linux
    Sonal
    Edited by: 850979 on 13-Apr-2011 06:04

    Thanks for your reply.
    I have copied the .jar file in a new directory under <user name>/Documents. The SampleRTLCloud.txt is also in the same directory. How do I get the path of the directory where the application is run from?
    Your help will be much appreciated.
    Sonal

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

Maybe you are looking for

  • Need_help_in_making_a_smart_bar

    hi all, can anybody please help me in making a smartbar ? sory if it sounds stupid, actualy i searched it alot on google but didnt find any help. i can make menu and menu items. but i need help in how to make a smartbar... plz help me in taking a sta

  • Question on Planning File entry

    Hi all, Whenever a material master is changed with relevant MRP data, there will be a planning file entry for NETCH, NETPL. And after the MRP run, it will be reset. So I would like to know whether the materials which are reset (there is not entry for

  • My Illustrator CC is exporting my files over 4x larger than I set them to export as.

    I really need this ixed. I'd rather not uninstall and redownload. It takes ages. basically, I'll set my artboard to export as sayyy 100x100 pixels, it'll export as 417x417 pixels.

  • Data Transfer Workbench can copy sales & purchase modules's data?

    Hi, Just wondering that,any way to copy the Sales & Purchase Modules's data from existing company to new company? Copy Express can't do it. But how about Data Transfer Workbench can copy? Thanks Regards, Danny Edited by: Danny Gan on Mar 18, 2008 5:2

  • Fetch Insert / Update Query From Table Trigger

    Hi everyone !, I have a situation, is there any way where I can get insert/update query by before-insert / after insert trigger when a user inserts/updates any row in the table. Plz....help me....champs..... Regards, Naushad