Menu

start path

Help
2015-04-17
2015-04-17
  • barry mcgillin

    barry mcgillin - 2015-04-17

    I have a jar file which I start with a bat file and java normally has the path of where the executable got started from is available for use.

    For example: assume I have a build setup like this

    C:\myproduct\bin\newapp.bat
    C:\myproduct\bin\newapp.exe

    but if I start the newapp.exe from anywhere else, I am looking for the path of where I started it from. eg,

    C>newapp

    and newapp is on the path. I want to be able to find that dir in the app, rather that just the location of the exe.

    Is there a way to do that or something I can set in env variables to identify where you started the app from?

    Many Thanks
    Barry

     
  • barry mcgillin

    barry mcgillin - 2015-04-17

    And the answer is use

    -Dstartup.directory="%OLDPWD%"
    Once it was available, we added it to our path provider!
    Tx so much, Gregorz, I missed the answer to the previous post.
    B

     
  • Grzegorz Kowal

    Grzegorz Kowal - 2015-04-17

    OK :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.