Results 1 to 2 of 2
- 03-21-2010, 10:53 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 9
- Rep Power
- 0
Openening a File in Any Directory
Hey, so I have a program that when a button is clicked on the GUI, it will open an executable program. The problem is, if I'm going to share it, people may have this executable in a different directory from me.
So for example, I have this in "C:\\Personal\Games" and someone else may have it in "Public\Games".
How would I make it so that my program will open the same file on any computer in any directory?
Thanks
EDIT:**Typo in the title >.<
- 03-21-2010, 11:56 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
> How would I make it so that my program will open the same file on any computer in any directory?
Change the button's behaviour so that it uses the correct file location.
Consider:
(1) Specifying the file's location as an argument to the program
(2) Demanding the user install the file at some particular location
(3) Having the location configurable by the user when they run the program. (Saving the preferences makes for a nice problem.)
Similar Threads
-
Is there a way to read a file directory
By willemjav in forum Java AppletsReplies: 3Last Post: 09-05-2011, 01:01 AM -
How to import file from same directory?
By Splat in forum New To JavaReplies: 5Last Post: 10-14-2009, 04:11 AM -
Read file from directory, update contents of the each file
By svpriyan in forum New To JavaReplies: 2Last Post: 05-11-2009, 10:07 AM -
[SOLVED] File chooser selecting file from directory...?
By prabhurangan in forum AWT / SwingReplies: 12Last Post: 06-18-2008, 04:08 AM -
How to Move a File to Another Directory
By Ada in forum New To JavaReplies: 1Last Post: 05-26-2007, 01:17 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks