I have a java program that copies files from one location to another, i have enhanced the general way of copying like able to copy multiple files at the same time , means when the user presses paste , he will be given a list of files to be pasted, since for the mere purpose of copying the user probably do not want to run my jar file.So i want my Jar file to run when the user goes to right click on the file(windows explorer).Is there any way i can achieve this ?
Asked
Active
Viewed 141 times
-5
-
simply create files you want to your desired location , and you could access it from windows explorer , what exactly is your requirement – Hussain Akhtar Wahid 'Ghouri' Mar 10 '13 at 13:09
-
If you copy file to any location, it will be automatically available to windows explorer. Just you need to open windows explorer that's it. But your question is unclear. – Pradeep Simha Mar 10 '13 at 13:09
-
If you only wish to support Windows based programs, why program in Java? Also, given the Explorer can already copy files, this seems rather pointless. – Andrew Thompson Mar 10 '13 at 13:09
-
@AndrewThompson can you recheck my edit – Mar 10 '13 at 13:15
-
i have edited my question @PradeepSimha can you recheck ? – Mar 10 '13 at 13:16
-
vamsi, Do you wish to add yourCopy program as part of context menu, while clicking any file, so that instead of using Windows copy program, you can use yourCopy program to do the copying? If you wish to modify the context menu, here are some pointers: http://www.howtogeek.com/forum/topic/add-any-application-shortcut-in-desktop-context-menu – a3.14_Infinity Mar 10 '13 at 13:17
-
@vamsi, this question may help you http://stackoverflow.com/questions/394616/running-jar-file-in-windows – Pradeep Simha Mar 10 '13 at 13:17
-
1possible duplicate of [Integrating into Windows Explorer context menu](http://stackoverflow.com/questions/1838856/integrating-into-windows-explorer-context-menu) – meriton Mar 10 '13 at 13:19
-
Stackoverflow is not a "let me google this for you" service. As clearly outlined in http://stackoverflow.com/questions/how-to-ask, you are expected to search for a solution yourself before asking a question here. – meriton Mar 10 '13 at 13:23
-
@meriton i did , but mines condition is a jar file – Mar 10 '13 at 13:26
-
1If you did, it is not apparent from your question. Quoting http://stackoverflow.com/questions/how-to-ask: "Tell us what you found and why it didn’t meet your needs." – meriton Mar 10 '13 at 13:28
-
@meriton i have found the answer to my question , java programs can't be triggered from non java components , so all the people who advised that my question is duplicate are wrong , and there ain't a solution for my question – Mar 10 '13 at 13:36
-
lol ... if that were true, Windows (a non-java program) could never execute a Java program. I can assure you that it's possible to run Java programs on Windows. – meriton Mar 10 '13 at 13:42
1 Answers
1
i found the answer as . Go for c or c++. Java can not directly interact with the hardware/OS, and it can not handle events that aren't triggered from within a Java component.

Vamsi Pavan Mahesh
- 240
- 1
- 8
- 30