Results 1 to 8 of 8
Thread: Platform dependent File Path....
- 11-27-2008, 10:00 AM #1
Member
- Join Date
- Nov 2008
- Posts
- 3
- Rep Power
- 0
Platform dependent File Path....
Hi All
i m stuck with this problem:
In my application there is one path for the folder where resultlog is to be stored.it's like--C:\Application\SchedulerApi\Api\results\
Now when the user installs the application,its not neccessary that he has
c:\ as base directory.so what can i do to make this work with any base directory,say d:\ or e:\ or whatever...
any help please..................
thanks in advance..
- 11-27-2008, 10:07 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Without selecting the base directory, how can you define the path? there should be a logic in your application to select the base directory.
- 11-28-2008, 07:19 AM #3
Member
- Join Date
- Nov 2008
- Posts
- 3
- Rep Power
- 0
plz help!!!!
thanks for the reply Eranga,but my problem is that its an automation Framework of java and i have specified the location myself where 'ResultLog' has to be stored:
If the client installs this application in C:\ the path of result file should be :
C:\Application\SchedulerApi\Api\results\
If the client installs this application in D:\ the path of the result file should be :
C:\Application\SchedulerApi\Api\results\
Now if i could know in which drive the client has installed the application,then it would solve my problem...
plz help!!!!
- 11-28-2008, 07:31 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
So why are you stuck on that. What ever the path client define, use the hard-coded path you want on the C:\ drive. I didn't see any difficulties there.
- 11-28-2008, 01:00 PM #5
Ask the client to set an env. variable
YOUR_APPLICATION_HOME
to xxx:\Application\
you can access this variable at run time
and append the rest of the path.DevZ;)
- 11-28-2008, 02:10 PM #6
File.listRoots() then have customer select drive letter, then do StringBuffer.append("\\Application\\SchedulerApi\\ Api\\results\\");
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 11-28-2008, 03:20 PM #7
Mistake?
Eranga, I think the OP made a mistake and meant the following:
sanjayksaini, please correct me if I'm mistaken.If the client installs this application in D:\ the path of the result file should be :
D:\Application\SchedulerApi\Api\results\
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 11-30-2008, 03:12 AM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Is it? I've not get that point clearly. I thought what ever the drive choose by the user, the path should on C:.
Similar Threads
-
how can i give a file path to java stream ?
By sheckoo in forum New To JavaReplies: 2Last Post: 11-05-2008, 08:42 AM -
file path
By Arsench in forum New To JavaReplies: 7Last Post: 10-30-2008, 05:39 AM -
Load class file which resides in local path c:\
By praveen.kb in forum Advanced JavaReplies: 2Last Post: 08-12-2008, 01:55 PM -
Regular expression for file path
By ravian in forum New To JavaReplies: 3Last Post: 01-25-2008, 08:24 PM -
ERROR: Can't find dependent libraries
By baltimore in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 06:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks