Is there any java code or an algorithm can use it to make an application (wrote in netbeans) take any path itself for any text or folder etc... , without making browse or fileChooser? ( for example : like winrar , it can take the path itself to make compress for the text that click on ).
Asked
Active
Viewed 48 times
-2
-
yes, what have you tried? Are you talking about the command line or in a GUI program? – Peter Lawrey Apr 20 '15 at 18:11
-
possible duplicate of [JFileChooser embedded in a JPanel](http://stackoverflow.com/questions/259575/jfilechooser-embedded-in-a-jpanel) – TheBlastOne Apr 20 '15 at 18:19
-
GUI program , i make a compress and extract program , and i add it to context menu , so i need when i click on it , to take a oath itself and making compress without make browse – Noor Alaref Apr 20 '15 at 18:20
1 Answers
-1
I think what you mean is the "right-click integration" of WinRAR:
If so, you can do that with any program. How this is implemented depends on your operating system:
- For Windows, Add a Registry Key
- For Mac OSX, Add it in the system-settings
- For Linux, there is no "one fits all" solution, as it depends on the file-browser you're using (Nautilus, Thunar, etz). Have a look at their documentation.
These are just some results that came up by searching for [operating-system] right click integration
. Go see for yourself.

Community
- 1
- 1

Lukas Knuth
- 25,449
- 15
- 83
- 111
-
yes , that is what i mean , i add it in the "right-click integration" , but the problem that i want to make it take the path for the text for example , without i make browse when i click on compress – Noor Alaref Apr 20 '15 at 18:51
-
You'll get the path to the file the user clicked on as a parameter in your `main(String[] args)`-method. Check the `args`-array. – Lukas Knuth Apr 21 '15 at 08:34