Solved

How to open a JAVA program when another program is opened

Posted on 2008-10-30
7
583 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
Comment Utility
This is not easy at all.
0
 
LVL 6

Expert Comment

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

Expert Comment

by:RishadanPort
Comment Utility
Actually... A really important questions what is your operating system?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:mahonym
Comment Utility
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
Comment Utility
Why don't you just password-protect the Word & Excel spreadsheets?
0
 

Expert Comment

by:cwrdy12
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

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…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now