Getting path to the app (using java)

Discussion in 'Mac Programming' started by pro100sanya, Jun 30, 2008.

  1. macrumors newbie

    Joined:
    Jun 30, 2008
    #1
    Hello,

    i need to get the path to the application.
    for example: i run application , and inside this application i need to know the path to this application.

    Is there any way to do this?

    Application written on Java. but i interested in any ways (include native methods such as apple script) to get that path
     
  2. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Have a look here - there's some discussion about this very topic.

    That said, if the reason you need the path to the application is because you need a resource inside it (a fairly common thing in Java applications), there's a method of the Class class called getResource() that handles exactly this task.
     
  3. thread starter macrumors newbie

    Joined:
    Jun 30, 2008
    #3
    thank you very much.

    topic closed
     

Share This Page