[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using Files Without Mounting A Share From Another System



Liam, I've read your posts on this thread, but I'm replying in kind of a reverse order -- or skipping the earlier ones if my comments on those make it in here.

On Apr 24, 2011, at 4:33 PM, Liam O'Toole wrote:

> On 2011-04-24, Camaleón <noelamac@gmail.com> wrote:
>> On Sun, 24 Apr 2011 18:08:47 +0000, Liam O'Toole wrote:
>> 
>>> On 2011-04-24, Camaleón wrote:
>> 
>>>>> Java technology offers a standard way of doing that: Java Web Start.
>>>>> It is possible to deploy a third-party application using a JNLP
>>>>> file[1].
>>>> 
>>>> Yes but no, that's a completely different approach (AFAIK, the
>>>> application has to be prepared/packaged to use it and most of the java
>>>> apps out there are not intended for that purpose, meaning they are not
>>>> going to be launched/run "online").
>>> 
>>> It is simply a means of lauching an application over the network.
>> 
>> Most specifically over http protocol, I'd say.
> 
> It is most commonly used over HTTP, but other protocols are available
> (see below).
> 
>> 
>>> Whether the application was intended to be launched in that way is
>>> irrelevant. 
>> 
>> Nope, it isn't :-)
> 
> Oh yes it is. Try it.

A couple points here.  I checked the source code for the Dynamic Tree Demo that is used as a JNLP demo.  Now I will admit I haven't been using Java for a couple years and have some catching up to do (I think I was using Java 5, but know I've totally missed Java 6), but when I went over the source code for that demo, there was no main() method in the source.  Or, more correctly, there was, but it was commented out.  That, right there, is an indication that if you're writing an app in Java to be launched "normally," there will be different preparations than if you're using JNLP.  (I haven't used JNLP yet, but I did write some applets and even set up a couple Java apps to be both apps and applets.)

I even looked at their more in depth tutorial on deploying a JNLP project, but didn't find any way to launch one, other than through a browser.  (Which I don't want to do -- then I have to figure out the default browser from within a Java class on Windows, Linux, and OS X and launch it.)

>> You need some sort of xml file defining the app to launch and while java  
>> does not (want to) understand the smb:// protocol we are stuck.
>> 
>> I can indeed play JNLP based java applications that are hosted online but 
>> I cannot run the java application I want to run while is on samba share. 
>> At least not directly ;-(
> 
> Try using a UNC path in the JNLP descriptor, e.g.,
> file:////server/share/app.jar. Windows clients will understand that.

This works on Windows, with SMB, but that brings us back to the original point: Accessing a file on a network share without mounting the share.  On Windows, since SMB is built in, you can easily do that.  On Linux, you can't.  You can use smbclient and copy the file over to your system if it's on an SMB share, but nobody yet has provided a way to access a file on a network share from Linux without either mounting the share or copying the file over to the local computer first.

I'm looking at Java RMI, but that involves certificates and so on and I'm still not sure if I will easily be able to put that much on a client system that is trying to run the program.



Hal

Reply to: