You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Lazarte, Ivan" <iv...@away.com> on 2006/05/22 00:19:52 UTC

[commons vfs] Mapping a network drive?

I'm a little confused about how I would do this...  I would like to expose a remote computer (through SSH) as a local drive on my Windows machine.  This way any application I have would be able to connect to the remote computer without worrying about it's networking capabilities.  

Can VFS do this?  I did a little research into the networking stuff, but since I'm very new to networking it's all pretty foreign to me.



Re: [commons vfs] Extracting tar fails

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> Right. Sorry guys. I'd better buy new pair of glasses.
>   
:-D

> Nevertheless, exactly same error occurs with "tar:file://C:\src.tar!".
>   
Sorry, no windows here, but I use
tar:file:///home/im/tmp/log4j.tar!/
and this works. (tar:file:///home/im/tmp/log4j.tar! too)

Ok, do you use VFS.getManager()? If so, do you have commons-compress in
your classpath?
This is a requirement for tar.

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Extracting tar fails

Posted by hrjk <ha...@zeniitti.net>.
> Hi!
>>> Try this way:
>>>
>>> tar:file://C:\src.tar!
>>>
>> That was the third one I had tried:
>>
> No, it was not. I also need some time to figure it out ;-)
>
>> org.apache.commons.vfs.FileSystemException: Badly formed URI
>> "tar:file//C:\src.tar!".
>>
> see - there is the ":" missing after "file" - its "file://"
>

Right. Sorry guys. I'd better buy new pair of glasses.

Nevertheless, exactly same error occurs with "tar:file://C:\src.tar!".

BR,
-hrjk


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Extracting tar fails

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
>> Try this way:
>>
>> tar:file://C:\src.tar!
>>     
> That was the third one I had tried:
>   
No, it was not. I also need some time to figure it out ;-)

> org.apache.commons.vfs.FileSystemException: Badly formed URI
> "tar:file//C:\src.tar!".
>   
see - there is the ":" missing after "file" - its "file://"

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Extracting tar fails

Posted by hrjk <ha...@zeniitti.net>.
One more thing. StackTrace gives following info:

org.apache.commons.vfs.FileSystemException: Badly formed URI
"tar:file//C:\src.tar!".
	at
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:84)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:583)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:528)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:498)
	at ...
...
Caused by: java.net.MalformedURLException: unknown protocol: tar
at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:65)
	... 12 more


>> Hi,
>>
>> Try this way:
>>
>> tar:file://C:\src.tar!
>>
>
> That was the third one I had tried:
>
> org.apache.commons.vfs.FileSystemException: Badly formed URI
> "tar:file//C:\src.tar!".
>
> Is this a bug, or am I missing something?
>
>>>
>>> I've been trying to resolve file with:
>>> "tar://C:\src.tar!/"
>>> "tar://C:\src.tar!"
>>> "tar:file//C:\src.tar!"
>>> "tar:file//C:\src.tar!/"
>>>
>
> -hrjk
>


-- 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Extracting tar fails

Posted by hrjk <ha...@zeniitti.net>.
> Hi,
>
> Try this way:
>
> tar:file://C:\src.tar!
>

That was the third one I had tried:

org.apache.commons.vfs.FileSystemException: Badly formed URI
"tar:file//C:\src.tar!".

Is this a bug, or am I missing something?

>>
>> I've been trying to resolve file with:
>> "tar://C:\src.tar!/"
>> "tar://C:\src.tar!"
>> "tar:file//C:\src.tar!"
>> "tar:file//C:\src.tar!/"
>>

-hrjk


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Extracting tar fails

Posted by Robert Enyedi <re...@gmail.com>.
Hi,

Try this way:

tar:file://C:\src.tar!

Regards,
Robert

On 5/24/06, hrjk <ha...@zeniitti.net> wrote:
>
> Hi.
>
> Is there some kind of a bug in handling tar files with VFS? I'm getting
> badly formed uri constantly with trying to access TAR file contents.
>
> org.apache.commons.vfs.FileSystemException: Badly formed URI
> "tar:file//C:\src.tar!".
>
> I've been trying to resolve file with:
> "tar://C:\src.tar!/"
> "tar://C:\src.tar!"
> "tar:file//C:\src.tar!"
> "tar:file//C:\src.tar!/"
>
> Zip files are working file. My VFS snapshot is dated 27.4.2006.
>
> Thanks for any help.
>
> BR,
> -hrjk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

[commons vfs] Extracting tar fails

Posted by hrjk <ha...@zeniitti.net>.
Hi.

Is there some kind of a bug in handling tar files with VFS? I'm getting
badly formed uri constantly with trying to access TAR file contents.

org.apache.commons.vfs.FileSystemException: Badly formed URI
"tar:file//C:\src.tar!".

I've been trying to resolve file with:
"tar://C:\src.tar!/"
"tar://C:\src.tar!"
"tar:file//C:\src.tar!"
"tar:file//C:\src.tar!/"

Zip files are working file. My VFS snapshot is dated 27.4.2006.

Thanks for any help.

BR,
-hrjk


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons vfs] Mapping a network drive?

Posted by Robert Enyedi <re...@gmail.com>.
By "my applications" I think that Ivan meant any application from his
computer and not his own developed applications.

Regards,
Robert

On 5/22/06, Mark A Fortner <ph...@yahoo.com> wrote:
>
> This could be done, but not exactly the way you're thinking. :-)
>
> In VFS you can use SFTP to access different volumes.  You can create and
> save a simple text file that contains all of the URLs that you want your
> applications to have access to.
>
> When your apps startup, they read the file, and use VFS to create
> connections to those volumes.  This approach should work on any operating
> system, and doesn't rely on any platform specific code.
>
> HTH,
>
> Mark
>
> Robert Enyedi <re...@gmail.com> wrote: Hi,
>
> In short, this is not handled by VFS. Since network drive mapping is a
> Windows specific operation the mapping can be achieved only by using
> native
> code. The J2SE core libraries do not have this feature implemented and nor
> does VFS.
>
> Regards,
> Robert
>
> On 5/22/06, Lazarte, Ivan  wrote:
> >
> > I'm a little confused about how I would do this...  I would like to
> expose
> > a remote computer (through SSH) as a local drive on my Windows
> > machine.  This way any application I have would be able to connect to
> the
> > remote computer without worrying about it's networking capabilities.
> >
> > Can VFS do this?  I did a little research into the networking stuff, but
> > since I'm very new to networking it's all pretty foreign to me.
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
>

Re: [commons vfs] Mapping a network drive?

Posted by Mark A Fortner <ph...@yahoo.com>.
This could be done, but not exactly the way you're thinking. :-)

In VFS you can use SFTP to access different volumes.  You can create and save a simple text file that contains all of the URLs that you want your applications to have access to.

When your apps startup, they read the file, and use VFS to create connections to those volumes.  This approach should work on any operating system, and doesn't rely on any platform specific code.

HTH,

Mark

Robert Enyedi <re...@gmail.com> wrote: Hi,

In short, this is not handled by VFS. Since network drive mapping is a
Windows specific operation the mapping can be achieved only by using native
code. The J2SE core libraries do not have this feature implemented and nor
does VFS.

Regards,
Robert

On 5/22/06, Lazarte, Ivan  wrote:
>
> I'm a little confused about how I would do this...  I would like to expose
> a remote computer (through SSH) as a local drive on my Windows
> machine.  This way any application I have would be able to connect to the
> remote computer without worrying about it's networking capabilities.
>
> Can VFS do this?  I did a little research into the networking stuff, but
> since I'm very new to networking it's all pretty foreign to me.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


Re: [commons vfs] Mapping a network drive?

Posted by Robert Enyedi <re...@gmail.com>.
Hi,

In short, this is not handled by VFS. Since network drive mapping is a
Windows specific operation the mapping can be achieved only by using native
code. The J2SE core libraries do not have this feature implemented and nor
does VFS.

Regards,
Robert

On 5/22/06, Lazarte, Ivan <iv...@away.com> wrote:
>
> I'm a little confused about how I would do this...  I would like to expose
> a remote computer (through SSH) as a local drive on my Windows
> machine.  This way any application I have would be able to connect to the
> remote computer without worrying about it's networking capabilities.
>
> Can VFS do this?  I did a little research into the networking stuff, but
> since I'm very new to networking it's all pretty foreign to me.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: [commons vfs] File information?

Posted by Robert Enyedi <re...@gmail.com>.
Among these only last modified date is accessible from VFS (
FileObject.getContent().getLastModifiedTime() ). Again, this is mostly
because the limitations of java.io.File used for local files.

Regards,
Robert

On 5/22/06, Lazarte, Ivan <iv...@away.com> wrote:
>
> Another question, where do I get information like last modified date, last
> access, and owner?
>
>

Re: [commons vfs] File information?

Posted by Robert Enyedi <re...@gmail.com>.
Among these only last modified date is accessible from VFS (
FileObject.getContent().getLastModifiedTime() ). Again, this is mostly
because the limitations of java.io.File used for local files.

Regards,
Robert

On 5/22/06, Lazarte, Ivan <iv...@away.com> wrote:
>
> Another question, where do I get information like last modified date, last
> access, and owner?
>
>

[commons vfs] File information?

Posted by "Lazarte, Ivan" <iv...@away.com>.
Another question, where do I get information like last modified date, last access, and owner?