Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help Me Please Mark !!!  RSS feed

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get current drive
Say that I had mentioned that my "db.db" file is in c:\scjd\starting\server\suncertify\db\db.db but
when the Application will run from some another drive say from d:\ drive then it will give error that database file not found. So tell me how to get the current drive on which the programme has been installed and how to mention that in my application.
Anurag Mishra
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that it is:

It will return the path in a String.
Yep that's it.
Mark
 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark
You got a great mind.
Anurag Mishra
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!