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
Solved

How to open a JAVA program when another program is opened

Posted on 2008-10-30
7
586 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 62
table example 4 32
web application structure 18 95
throw exception 21 57
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

766 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