I made a java application in NetBeans on Windows which I need to deploy on Ubuntu. In my java application I have given the path where an excel file will get saved on the click of the button. My address path is like this D://Excel. This is working fine in windows and file is getting saved at the given passed address. Now my problem is this i don't know how can I get the address path in ubuntu. Any help will be highly appreciated.
take your terminal and type
pwd
This will give your home folder path. Use that in your program.. It will be something like this /home/adarsh..
The question seems like : How to construct a relative path in Java from two absolute paths (or URLs)?
Please refer above link. Hope this helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With