Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Help Me Please !!! Confused

Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys
I am very much confused regarding this problem. I have taken a path for database file called db.db as Data data=new Data("c:/scjd/starting/client/suncertify/db/db.db") and it is working fine in the windows platform, but if I have to execute my application from some other drive i.e from d: drive then it show's an error (Database file not found) and also when I run my application in some another operating system (Linux) other than windows than also my application won't work properly because of mentioning c: drive in the path. So please tell me the solution how to get a current drive name of any O/S and how i have to mention this in my application.I will be very much thankful to you.
Anurag Mishra
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a relative path, or make the location of the database file a command-line argument.
- Peter
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic