Creating a new file extension and then opening it

Hi,

I've been searching for this for hours. I want to create a file lets say

asdf.qxd. asdf.qxd is a text file and i want it to open in a program that I

have made. I don't care about how to get it to open in the program (for

instance I can just tell windows to use my program to open it by default)

but when I need to know is how to pass the file into the program (by

command line arguments or some other way).

Any help would be greatly appreciated.

Thanks

[519 byte] By [n3w813a] at [2007-11-27 10:17:53]
# 1

That's nothing to do with Java, and everything to do with your OS or windows manager

georgemca at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 2

Is this a Java question?

BigDaddyLoveHandlesa at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 3

> Is this a Java question?

If this is a Java answer

(we've gone very Zen here)

georgemca at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 4

Hi, yes sorry this is a java question.

n3w813a at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 5

Disregard this reply.

BigDaddyLoveHandlesa at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 6

> Disregard this reply.

No

georgemca at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 7

> Hi, yes sorry this is a java question.

I disagree. No, really, I'm not kidding. Or being Zen

georgemca at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 8

ok.

thanks

n3w813a at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...
# 9

back to the question:

You could launch your program like this:

java YourApp < asdf.qxd

Then in your program, System.in will be reading from asdf.qxd instead of the console.

BigDaddyLoveHandlesa at 2007-7-28 15:54:17 > top of Java-index,Java Essentials,Java Programming...