aspose file tools*
The moose likes Java in General and the fly likes To build a java repository for binary files or not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "To build a java repository for binary files or not?" Watch "To build a java repository for binary files or not?" New topic
Author

To build a java repository for binary files or not?

Rooks Forgenal
Ranch Hand

Joined: Jun 05, 2009
Posts: 82
Ok, here is my dilemma. I have a single BINARY file that needs to be edited by myself and one other. We live hundreds of miles away from each other. We do not want this binary file to be located on our local PCs but instead somewhere we have access to anywhere there is an Internet connection. We want the ability to "lock" or "check out" the file to prevent parallel editing. We don't want to have to merge the file. Most importantly we want this to be free.

Here is my proposed solution. I have access to a bit of hard-drive space provided by my school. We use SSH via Putty to gain access. This is where I would like to store this binary file so we both have access to it. Then, I want to write a Java program that uses Putty to retrieve the file and to rename the "school" copy to [name].out. If my partner tries to use his version of this program, it will see that there is a file named [name].out and will return a message that the file is checked out thus denying access. When the file is checked in, it checks the upload was successful and if true deletes the [name].old. Now my partner can check the file out and that would mean I would be denied access.

Here is my problem. How in the heck can I get java to start Putty, log in via SSH, check a file name extension to check fo "checked out" status and if able, use commands to download a file from a specific directory and then rename the remote file?

I could get a scripting language to do it but then I have to get him setup with that engine (like ruby). I want to be able to give this to anyone as an executable (or Jar) and they would have the ability to check out this file.

Do I have any suggestions?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Geez, just put it in a Dropbox public folder and use a lock file.
Rooks Forgenal
Ranch Hand

Joined: Jun 05, 2009
Posts: 82
David Newton wrote:Geez, just put it in a Dropbox public folder and use a lock file.


While you might know what that string of words means, I do not.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42585
    
  65
This may help: http://en.wikipedia.org/wiki/Dropbox


Ping & DNS - my free Android networking tools app
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

jake benn wrote:
David Newton wrote:Geez, just put it in a Dropbox public folder and use a lock file.


While you might know what that string of words means, I do not.

I guess that wasn't a question, so I won't answer.
Rooks Forgenal
Ranch Hand

Joined: Jun 05, 2009
Posts: 82
While your statement is that you will not provide an answer to a non-question, your actions were to reply to the post and make the written statement of your unwillingness to answer a statement and that in an of itself qualifies as a response A.K.A an answer. Bazinga.

Ulf Dittmer, thanks for the link.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*yawn*
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To build a java repository for binary files or not?