How to find out the absolute folder path in ubuntu

I made a Java application in NetBeans for Windows that I need to deploy to Ubuntu. In my java application, I gave the path where the Excel file will be saved with the click of a button. My address path is similar to this D: // Excel. This works fine on Windows, and the file is saved at the given address. Now my problem is that I do not know how to get the address path in ubuntu. Any help would be greatly appreciated.

+4
source share
2 answers

take your terminal and enter

pwd 

This will give the path to your home folder. Use this in your program .. It will be something like this / home / adarsh ​​..

+9
source

The question is as follows: How to build a relative path in Java from two absolute paths (or URLs)?

Please refer to the link. Hope this helps you.

+1
source

Source: https://habr.com/ru/post/1444512/


All Articles