Solved

How to open a JAVA program when another program is opened

Posted on 2008-10-30
7
589 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

626 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