Solved

How to open a JAVA program when another program is opened

Posted on 2008-10-30
7
587 Views
Last Modified: 2013-11-23
I'm writing a simple JAVA program to password protect files/folders on my computer. Nothing crazy, I own a clothing company and I would like to hide the confidential information that I'm storing in Word doc's and Excel spreadsheets. What I want to do is when certain files are opened, I'd like my JAVA password program to be triggered to ask a password to open the file. Is there code I could add to my program that when certain files are opened the program is triggered or is there a way to link my written program to files on click? Thank you!
0
Comment
Question by:mahonym
[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
7 Comments
 
LVL 6

Expert Comment

by:RishadanPort
ID: 22846346
This is not easy at all.
0
 
LVL 6

Expert Comment

by:RishadanPort
ID: 22846357
Why not instead on your machine create a seperate Windows Account, that has access to these files.
0
 
LVL 6

Expert Comment

by:RishadanPort
ID: 22846365
Actually... A really important questions what is your operating system?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mahonym
ID: 22846419
I'm using Windows XP Pro. This isn't for other users, it is so if someone were to get onto my computer while logged in they couldn't access this information. Just an added level of security.
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 22849326
Why don't you just password-protect the Word & Excel spreadsheets?
0
 

Expert Comment

by:cwrdy12
ID: 22878559
You can lock your workstation when you leave it unattended (Ctrl-Alt-Delete -> Lock Computer) and also cause a workstation lockout to occur after a user-defined idle time (right-click Wallpaper -> Properties ->Screen Savers). You simply retype your logon credentials to unlock the computer.
0
 
LVL 2

Accepted Solution

by:
mkopka earned 125 total points
ID: 23146321
Agree with the other commenter. The solution suggested in the question is simply not feasible. Too difficult, too clunky. The best way to deal with this is to add password protection to the Word / Excel docs.  Excel can definitely password protect a sheet as part of the Excel program and pretty sure word also can.

Furthermore, you could use a tool to apply an external password to a file (there are free ones out there that encrypt your document and apply a password to it).

What you are asking for (i.e.: trigger a Java app to run when you open word or excel docs) is very tricky as you would need some sort of constantly running listener that would have to know that a word or excel doc has been opened (and that it is one that should be protected as well) and to then ask for a password which it would need to have originally stored along with what document the password is for.

Further to this, just having a listener java tool wouldn't be enough since killing the listener would stop your level of protection as would copying the file to another location (machine) and opening it there where the listener didn't exist). To get around this you would also then need to write a tool to encrypt and later decryupt your docs, and hence need encryption algorithms...etc..etc.

All of that is done by the free windows (and other OS) tools that are already free and out there:

http://www.truecrypt.org/ 
http://www.snapfiles.com/Freeware/security/fwencrypt.html 
http://cc.uoregon.edu/cnews/summer2006/encrypt.htm

These links provide listins of tools for this.

Using such a encryption tool, along with the ideas mentioned above, ie: password protect the doc and also lock your PC when leaving will provide you ample level of protection (as well as ofcourse having firewall setup if your connected to the network, anti-virus, anti-spyware/malware, and all latest security patches for XP installed).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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:
This video teaches viewers about errors in exception handling.

749 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