Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Accessing the network drive real path in applet

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have a mapped driver letter g: that referes to
\\servername\d\foldername

How do I get java to convert it from g: to the real path(\\servername\d\foldername) so I can use
it in my applet?
My applet is signed applet I can access local resources in it.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you use the actual server name directly? The jCIFS API can do that cross-platform (only a Windows JRE knows how to do that using the java.io classes).
 
ParagS Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Ulf, for the suggesting one of the way.

I got a simple solution. I don't know it will be considered as good practice or not.
My solution is:
My target platform is window only & it will be windows.
I did one thing I issued a command "net use" on command prompt through the code. Captured its output & parsed the required String there.
My applet will be called 5-10 times only in a day. So this should not hit the performance.

Still I will work on jCIFS.
 
The moustache of a titan! The ad of a flea:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic