Getting path to the app (using java)

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

  1. macrumors newbie

    Jun 30, 2008

    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


    Jun 6, 2003
    Solon, OH
    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

    Jun 30, 2008

Share This Page