Solved

How to open a JAVA program when another program is opened

Posted on 2008-10-30
7
585 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
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
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 163
Java - Why doesn't this JFrame work 3 59
how to add new optional parameter to JSP 1 42
going to wrong jsp page 2 21
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

809 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