-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Notebooks
- Notebook Software and How To Questions
- Cannot set Notepad to open files with .java extension

Create an account on the HP Community to personalize your profile and ask a question
10-28-2018 01:32 AM
I am a Studdent learning java. I have installed jdk version 11.0.1on my notebook. I just Simply cannot set Notepad as a default program to open my .java files(not .jar or .jre). I have tried to set notepad as a default via setting and also via right clicking on the files. It just doesn't set notepad as the deafult program. I havealso tried Notepad++or wordpad to set as default. But It doesn't set as default. This problem exist only with .java files.
10-28-2018 10:43 AM - edited 10-28-2018 10:48 AM
.java are Java shell executable files if yuo make them to open by default from Notepad Java will not work.
Right click the some.java file and choose Edit - it will open with Notepad for editing which is what you need. It works and Notepad is deafilt editor for .java files.
You can change default editor program, say to Notepad++, associated with "Edit" for Java shell exec batch files by:
Run RegEdit.
Navigate to HKEY_CLASSES_ROOT\batfile\shell\edit\command.
Modify the Default and change Value Data from %SystemRoot%\System32\NOTEPAD.EXE %1 to
"C:\Program Files (x86)\Notepad++\notepad++.exe" %1
Close RegEdit.
Right-click -> "Edit" should now open batch files in NotePad++.
---->> Please make sure you click Solution button here ↓↓↓ if I have given you the solution.