I want to open my java application from the windows explorer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   smita_mangal
Posted On:   Friday, July 13, 2001 04:23 AM

I have to run my java application from the windows explorer, for example: In the windows explorer when we double click the .doc file it opens in the MSWord, similarly i want to open file in my java application.

Re: I want to open my java application from the windows explorer

Posted By:   Dermot_Hennessy  
Posted On:   Friday, July 13, 2001 05:44 AM

Create a batch file containing the executable for your java application like so:

java -classpath yourPackage.yourClassName %1 %2 %3 %4 %5 %6 %7 %8 %9


Let's say you call it myApp.bat. Let's say that you want myApp.bat to open files of type spp.


In Windows Explorer, click once on an spp file (so it gets selected). Hold down SHIFT
and right click. You should see a menu item called 'Open with...' Click on
it and a dialog opens. Select
'Other' and browse for myApp.bat. Click 'Always use this program to open this type
of file' and hit ok. That oughtta do it.

Hope this helps.

Dermot

About | Sitemap | Contact