You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating bat and sh files with assemble there should be possibility to force script to set up working directory before java execution. The problem here is that when executing bat file from different directory then app/bin application base path is set to that other directory rather than app directory. An example:
When we create new File(".") in our application and print its absolute path D:\test_app> bin\test_app.bin -> D:\test_app\.
but when we try to run the same bat file but from different current directory: D:\other_dir\my_stuff> D:\test_app\bintest_app.bin -> D:\other_dir\my_stuff\.
This can be done with: pushd %BASEDIR% before calling java and then popd and the end of the script to revert this change. This will ensure that app always has set correct working directory and for example logging libraries that are using relative paths will log to correct directory inside our app folder and not inside current user directory.
The text was updated successfully, but these errors were encountered:
When creating bat and sh files with assemble there should be possibility to force script to set up working directory before java execution. The problem here is that when executing bat file from different directory then app/bin application base path is set to that other directory rather than app directory. An example:
When we create
new File(".")
in our application and print its absolute pathD:\test_app> bin\test_app.bin
->D:\test_app\.
but when we try to run the same bat file but from different current directory:
D:\other_dir\my_stuff> D:\test_app\bintest_app.bin
->D:\other_dir\my_stuff\.
This can be done with:
pushd %BASEDIR%
before calling java and thenpopd
and the end of the script to revert this change. This will ensure that app always has set correct working directory and for example logging libraries that are using relative paths will log to correct directory inside our app folder and not inside current user directory.The text was updated successfully, but these errors were encountered: