Results 1 to 5 of 5
- 04-02-2009, 07:49 AM #1
How do I open a file with a class, or can I?
I am trying to make a program, where when I double click on an xml file, it will load up my program. My program then need to know the name and location of the xml file.
What I am clueless at is the part where I retrieve the name and location of the file. I just don't know how this part works.
The idea is to open foo.xml with xmlFilter.class? xmlFilter.class would then use the filename and location to perform various tasks...
This is something completely new to me, and I greatly appreciate all of your help!-- www.firemelt.net --
Cheer up, the worst has yet to come...
- 04-02-2009, 08:08 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
In basis, to open a file in double-click you should have an executable file installed in the Windows OSs. So you have to think about that how to workaround with your application. But it cannot be the best approach. Because of other OS, like Linux and so on.
- 04-02-2009, 09:27 AM #3
Well, I know I could probably use a batch or shell script to lunch it from the command line without any problems...
I would really like to do it like the "big programs" do it. Does notepad, word, or firefox use a batch script to launch?
That and I only learn by doing...
Fortunately, this program only has to run on windows...-- www.firemelt.net --
Cheer up, the worst has yet to come...
- 04-02-2009, 09:29 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Most of the applications have specific start-up process. May be a batch file or something else(script).
- 04-02-2009, 09:59 AM #5
Well, I'm not going to worry about it now... I just thought it would be neat that way.
Anyways, I got to get this stupid thing to work via command line before I can make a batch file for it...
This program is killing me!
Thanks for your response though.-- www.firemelt.net --
Cheer up, the worst has yet to come...
Similar Threads
-
[SOLVED] Open a different class from the same package when button clicked.
By mainy in forum AWT / SwingReplies: 4Last Post: 02-16-2009, 03:20 PM -
how to open a file through URL
By katie in forum New To JavaReplies: 3Last Post: 07-13-2008, 02:53 AM -
Open File
By JavaLerner in forum SWT / JFaceReplies: 5Last Post: 07-12-2008, 06:41 PM -
To open an image file such as Jpeg file using JAva Program
By itmani2020 in forum Advanced JavaReplies: 10Last Post: 07-11-2008, 09:57 AM -
Is it possible to open a txt file?
By jason27131 in forum New To JavaReplies: 20Last Post: 08-07-2007, 01:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks