Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know the absolute path of folder in ubuntu

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.

like image 558
Adarsh Avatar asked Nov 07 '12 06:11

Adarsh


2 Answers

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..

like image 82
Konza Avatar answered Sep 25 '22 12:09

Konza


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.

like image 27
Bhavesh Shah Avatar answered Sep 25 '22 12:09

Bhavesh Shah