Hello! This is my first post, I'm new to java and I found when I search for things this site often shows itself on google results so why not join? Anyways I'm creating a text editor in java and I want to find out how to in for example windows explorer you can right click --> Open with --> (program / browse for one). I want that ability, i mean you can obviously do that but it won't open the file. Anyone have any idea? Thanks for any help!

Which GUI are you working with? if its default swing, then you need JFileChooser to do that. Also you will need to know about actions that activates the right clicking.

Put something there and we will assist you. We dont give codes here. We are not free code factory. We only assist.

Nor sure exactly what you are asking here... is this about writing your Java program, or how to configure Windows shell to add items to the right-click explorer context menu?
For the Java side - you can accept the file name into your program as a string parameter on your main method. Then you can configure the menu to invoke your program with the file names as a parameter.

The question is about getting what file the user selected to open my program with to open.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.