CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    2

    Application path

    Hi :
    How do I determine what path my java main application class is loaded from. "user.dir" is the current working directory, but if the actual jar or class file is loaded from some other directory, how can I determine that directory inside the program?
    TIA,Rima Parikh.


  2. #2
    Join Date
    Oct 1999
    Location
    CT, USA
    Posts
    18

    Re: Application path

    What r u using ?
    If JSP, the application object is available implicitly, inside JSP, application.getRealPath(""), will return you what you want.
    FYI, application object is part of javax.servlet.ServletContext package

    rgds


  3. #3
    Join Date
    Oct 2005
    Posts
    1

    Smile Re: Application path

    Thank you sjeevan I spent quite a while looking for this little code. It was very helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured