Network Folder Mount

hi,can I mount a folder in windows by JAVAi mean when my java program executes it creates a folder mapped to some network drive or even to a local volume for the time beingif possible plzz send me code refferences / code cheers,Yasir.
[276 byte] By [farishtaa] at [2007-10-2 12:33:04]
# 1
Maybe, but it will require non core java, i.e. a shell command or jni.
IanSchneidera at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Trynew File("\\MachineName\shareName\rootDir\You/Folder/here").mkdirs();--Marc ( http://jnative.sf.net)
mdentya at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

> Try

> > new

> File("\\MachineName\shareName\rootDir\You/Folder/here"

> ).mkdirs();

>

>

> --Marc (http://jnative.sf.net)

hi Marc

will u plzz explain the the parameter

i.e rootDir\You/Folder/here

plzz exampled it .. i m working in windows environment

regards

Yasir.

megammera at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

Hi,

I should have wrote

new File("\\\\MachineName\\shareName\\rootDir\\Your/Folder/here".mkdirs();

Have you tried it ?

new File("C:\\foo/bar").mkdirs();

should create 2 directories into C: (foo\bar).

In java, under windows, you can use \\ or / as a path separator.

The best practice is to use File.separator instead of \\ or /.

Please read this : http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#mkdirs()

Hope this help.

--Marc (http://jnative.sf.net)

Plz do not write to me on my sourceforge account for problems that do not involve jnative.

mdentya at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5

> Hi,

>

> I should have wrote

> > new

> File("\\\\MachineName\\shareName\\rootDir\\Your/Folder

> /here".mkdirs();

>

>

> Have you tried it ?

>

> > new File("C:\\foo/bar").mkdirs();

>

> should create 2 directories into C: (foo\bar).

> In java, under windows, you can use \\ or / as a path

> separator.

> The best practice is to use File.separator instead of

> \\ or /.

>

> Please read this :

> http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.h

> tml#mkdirs()

>

> Hope this help.

>

> --Marc (http://jnative.sf.net)

>

> Plz do not write to me on my sourceforge account for

> problems that do not involve jnative.

hi,

its not working

actually plzz get an eye on the problem one again

actually i want to have a folder in my pc which is created and become a mount point (like network drive mapping in windows) for some network share

File("\\\\MachineName\\shareName\\rootDir\\Your/Folder /here".mkdirs();

i m using this code as

File("\\\\10.10.21.5\\wallpapers\\d:\\mymount").mkdirs();

( does it mak sense !!)

now 10.10.21.5/wallpapers is network share name

and d:/mymount is my local drive folder

but this programe dont fulfill my objective

hope u hav got the problem

do u hav solution?

Yasir.

megammera at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6
Ah ! Ok, I see :You want to create a directory the share it on your local network to make it availiable to other computers.Am I right ?--Marc ( http://jnative.sf.net)
mdentya at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 7

> Ah ! Ok, I see :

> You want to create a directory the share it on your

> local network to make it availiable to other

> computers.

>

> Am I right ?

>

> --Marc (http://jnative.sf.net)

o noooooooooooo

man now listen!!

actually , lets say, u have shared a folder "abc" for the network ... right.

now i want to make a folder on MY PC which mounts UR FOLDER

like in "MAPPING A NETWORK DRIVE" in windows ...

i want to create a mountable folder on my pc ... which mounts to ur or some other network share.... GOT...

any ways the think u told earlier ... if u hav its code plzz mail me on

yasir2004@msn.com

or if u hav any related code ... plzz test them b4 sending me

Take Care

bye.

megammera at 2007-7-13 9:32:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...