Solved

password protecting folders using api in java

Posted on 2011-03-02
3
249 Views
Last Modified: 2012-05-11
Hi,

I have some files in a folder which needs to be password protected using java. So i need to stop direct access from other users to open the folder but should be only accessible using the api.
This needs to be implemented in java only.

Please help me.

Thanks
0
Comment
Question by:ranga_kartik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 35024756
What is the operating system you are talking about - is it Window, Unix?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35024795

On Unix system you can create folders and make them accessible only to the user
who created them. Then you could allow other people to access them through your Java
program and may require credentials to do so. In this way these folders
will become accessible only after authentication.
Of course Unix administartor will still have access to this data.

This is a java-centric discussion about password protected files:
http://www.dreamincode.net/forums/topic/22760-creating-password-protected-files-through-java/
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 200 total points
ID: 35024916
This isn't practicably possible: access control to a file system is done at operating system level and therefore makes little sense for a cross-platform language like Java.

Consider instead using storage outside the file system, which of course you can implement in a platform-independent way
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question