One Click Windows 10

0 views
Skip to first unread message

Niklas Terki

unread,
Jul 26, 2024, 2:42:44 AM7/26/24
to actionml-user

What is listed in right-click-> Open With ?Is some other program listed as the default program ? Is a Java Runtime listed ? If a Java Runtime is listed, you can open with it, and make it the default program to run with.

In my case, one jar file was being opened by double click while other was not being opened. I examined those files and the probable reason was that which was being opened, was created using JAVA SE 6 and the one not being opened was created using JAVA SE 7. Although, the problematic jar file was being run via command prompt (java -jar myfile.jar).

I had the same problem with .jar files not opening on a double click. It turned out that I had two versions of Java installed (Java 6 and 7). Uninstalling Java 6 from Control Panel-> Uninstall a Program was what finally allowed .jar files to open on a double click without using the command window.

The root cause for the problem above is, that a program has stolen the .jar association. If you have installed the Java Runtime Environment the first time, the file type called "jar" is assigned to javaw.exe correctly. "jar" is an abbreviation for "java archive" and javaw.exe is the correct program to execute a .jar. However, on Windows any program can steal a file type at any time even if it is already associated with a program. Many zip/unzip programs prefer to do this, because a jar is stored in the .zip format. If you doubleclick on a .jar, your pack program opens the file, rather than javaw runs the program, because your pack program ignores the meta information which are also stored in a .jar. In the Oracle bug database there is the low-priority report 4912211 "add mechanism to restore hijacked .jar and .jnlp file extensions", but it has been closed as "Closed, Will Not Fix".

I had the problem that windows was blocking it from running (Windows 10 Pro). Right click icon> properties> in the bottom right corner it might tell you "Windows has blocked the functionality........" next to it there is a check box labeled "Unblock"> uncheck the box> apply> option to block goes away and then you can run it.

Your problem might also be inside your Java code setting, I mean, if your program somehow could not realize the main class/main file (entry point), it will not launch the the program/.jar (specially application built on IDE's). To solve that on an IDE :

I renamed Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar_BACK

The problem is when you double click on an associated file the application starts and runs with the file's path as base execution path. Any relative path will be computed from the file path and everything you try to load will probably be missing.

Nothing happens, even if you surround all of your entry point code with try/catch(Exception) because java s throwing Throwables and not Exceptions: to fix this in your java entry point surround the content of the main method with a try/catch(Throwable) (base class for Exception and Error) and debug.

In my case the reason is I have multiple JDK & JRE versions installed on my computer. Since I am a software developer working with several different versions for different clients I need to use multiple JDKs in my PC (Windows 10 Pro). So I do not want to change the system variables (i.e. JAVA_HOME, JRE_HOME or PATH), instead I use command prompt to run java in user process whenever I wanted to use a different version.

Replace JARFile path with your path to javaw.exe, and modul-path with your path to javafx lib. If you are using NetBeans, Eclipse or IntelliJ, after -jar those are VM arguments/options you had to write to run it from application. You can write/copy it to notepad and save it with extension .bat (anyName.bat) right click and run it as administrator. Now if you write again:

and it should work, on your computer. Notice double % and then single. The percent signs are doubled to escape them, because a single percent has a special meaning within a batch file. More about it here:

Microsoft PowerToys Mouse Utilities has this feature. It allows you to customize the diameter, fade speed, transparency, color, and to assign separate colors for right and left clicks. Provides a handy shortcut Win + Shift + H to enable or disable. Been using this for a while now, it's a lovely tool that still occasionally leaves a ghost marker behind that can easily be cleared toggling it on and off by pressing the hotkey twice. Happens maybe once a day, although I do use the computer almost 16 hours a day.

It uses AutoHotkey too, and might even use some of the same mechanics as other posts here, but it's slick, quick, and intuitive to set up and customize. It's part of this YouTube video for a more thorough/visual explanation =kwSqtNvT7to

This is a variant of RJFalconer's answer, incorporating changes from Paolo Fulgoni. I didn't want to always see my mouse when the CTRL button was pressed, and I hoped the DllInfo modification would dynamically switch the setting on and off, but I couldn't get it to work (the script would just exit). No doubt someone more sophisticated in AHK could explain what I was doing wrong, but I went ahead and created my own version.

It dyamically switches the "Show mouse when control is pressed" option ON when the mouse button is pressed, and then switches it OFF afterwards. It works fine in limited testing, although sometimes the mouse pointer disappears aftewards. If anyone knows how to fix it, or has any other improvements, feel free to jump in.

It's (excessively) documented, because I quickly forget things, and when I need to revisit, I like to have my scripts provide enough info that I don't need to search to find all the old references I used in the first place.

@Wim-G I also found that CTRL+Shift worked to open a new window, but on my PC (and this could be from Power Toys) it runs the new instance as Administrator. Not a bad thing overall, but certainly not the function I would be expecting.

@Demotis, the issue is not in lack of support of this feature - it is still there. What is not the same as it used to be in Windows 10 is a simulation of middle-button mouse clicks by using the combination of LeftShiftKey + LeftMouseButton. If you were using a regular mouse, then the middle-button click on the program's icon on the taskbar would open a new instance/window for you as usual.

It is not very difficult to fix this missing part...

@alekzmtz, I am sorry to hear you experienced difficulties with my solution. I have tested it on several computers, and I had no issues at all. Therefore, I suggest you do some troubleshooting: First, check your Windows 11 taskbar tray icons to ensure your AutoHotkey is running. You should see the "H" icon present there, and when you hover over the icon, the name of your AutoHotkey application should appear. Next, please check if the middle-button mouse click simulation is working properly. Online you can find many sites where this test can be performed (e.g., this mouse test). Hold the left Shift and tap/click to see if the tester receives a middle-button mouse click or not. If all works as expected, the problem is somewhere else, and further troubleshooting is necessary. I hope this helps.

Yes, @John_BloggsMyUsernam2345, you are correct. My solution is not perfect. It replaces the simultaneous use of the left shift key and left mouse button click with a simulation of the middle mouse button click. Since many other applications use shift+click combination for other uses, my solution disallow such functionality. After publishing my original solution here, I experienced similar issues with one graphic program, where shift+click is used for multi-select. Since I needed that functionality, I decided to change my AutoHotKey script to use right-shift instead.

Please, please, please bring this feature back. Hopefully it is just an oversight or couldn't quite make the final release. I know it is the smallest thing, but I use this feature all the time and it is going to be hard to wipe that muscle memory. It is how I open multiple console windows, I really don't want to be limited to just one.

Some of my apps won't open from the desktop if I left click them, but rather I need to shift/left click to get them to open. They used to work but a new update of Win11 has caused the problem. I cannot roll back to the previous version of Win11 as in the interim I have had a meltdown of my motherboard and am now opperating with a new motherboard and a fresh install of Win11.

Ok I have read up a lot of posts, but nothing seems to work. The problem....
On windows 10 systems such as my own build 20H2 (19042.985) and some of my clients, when you right click on an icon for example to unpin it or right click on File Manger that is open to open a second instance the menu does not pop up.

All right folks have solved this problem. It's two fold in a sense.
First off I found a link that led me to a registry change at this link... -click-on-taskbars-icon-and-slabs-in-start-will-not-open-context-menu-on-w?rq=1
There are two folders there that will fix the problem in most cases.
secondarily and maybe combined is a program called "StarIsBack" that I use and many of my clients use. In my case removing the two GUID folders didn't solve he problem until I updated StartIsBack. So there is a tie but I have no idea what.

Hi all,

Jumping in here, as our team would like to share some insights that may be helpful:

This issue may be related to other applications on your computer that use the icon overlay and context menu functionality of your Operating System.

If you are on Windows, please note that Windows has a limit of 15 overlay icons that Windows Explorer can load, and the operating system reserves 4 for its own use.

If there are more than 15, then the Dropbox icons or context menus may not show. To fix this and move the Dropbox sync icons to the first 15 positions:

Reply all
Reply to author
Forward
0 new messages