Open .jar files as a directory [solved]

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
hatalma
Junior Member
Junior Member
Posts: 2
Joined: 2019-08-18, 00:55 UTC

Open .jar files as a directory [solved]

Post by *hatalma »

Hello,
I would like to find a way to open .jar files AS A DIRECTORY with double click/enter (just like normal directories).

I know it is possible with "Control + Page Down", but I want to make it the "default" (because I want to open a lot of jar again and again).
I already tried to remove the file association in system level with removing a registry key, but it did'nt work. (Maybe if I have to MODIFY it? But to what?)

(I deleted the "jarfile" idk-what at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\OpenWithProgids\)


The best would be an internal association (in TotalCMD), but i know nothing about these...
And in rare cases it would be good if i still could somehow execute them as now (with java).

TC version: 8.52a - x64 (windows)

I hope it's understandable :)
Thanks in advance!
Last edited by hatalma on 2019-08-19, 15:02 UTC, edited 1 time in total.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Open .jar files as a directory

Post by *sqa_wizard »

There is no simple way to do this, but you may use a tricky one.
You have to tell TC that there is a packer plugin which will handle this.

- Configuration - Options - Packer
- Press "Configure packer extensions WCXs"
- At "All files with extension ..." enter "jar"
- Select any existing entry at the "Associate with" list for beeing a dummy
- Press OK

All jar files are handled as archive now and you may open them as zip directory by doubleclick.
And in rare cases it would be good if i still could somehow execute them as now (with java).
Just use the context menu of the file and select the very first entry with the filename in bold.

Note: You have to restore the FileExts\OpenWithProgids of jarfile for the last one, but you certainly made a backup before deleting it :wink:
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad »

You can also use TC's internal associaltions ("Files" -> "Internal Associations (Total Commander Only)...") - like this:
http://madsenworld.dk/tcmd/jarassoc.png

Or you can install either the 7zip or the Total7zip plugin
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Open .jar files as a directory

Post by *Usher »

sqa_wizard wrote: 2019-08-18, 14:51 UTC
hatalma wrote:And in rare cases it would be good if i still could somehow execute them as now (with java).
Just use the context menu of the file and select the very first entry with the filename in bold.
Or use Shift+Enter instead of Enter from the keyboard.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open .jar files as a directory

Post by *Horst.Epp »

For me even with a fresh ini file TC already behaves like wanted.
It opens jar files like other archives without any special assigments or actions.
On the OS level it offers to open it with WinRAR if I double click a .jar file.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad »

2Horst.Epp
Horst.Epp wrote:On the OS level it offers to open it with WinRAR if I double click a .jar file
hatalma wrote:it would be good if i still could somehow execute them as now (with java).
Apparantly hatalma - like me - has Java as the default association for jarfile on the OS level:

Code: Select all

[HKEY_CURRENT_USER\Software\Classes\.jar]
@="jarfile"

[HKEY_CLASSES_ROOT\jarfile\shell\open\command]
@="\"C:\\Program Files (x86)\\Java\\jre1.8.0_221\\bin\\javaw.exe\" -jar \"%1\" %*"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Open .jar files as a directory

Post by *HolgerK »

petermad wrote: 2019-08-18, 15:30 UTC You can also use TC's internal associaltions ("Files" -> "Internal Associations (Total Commander Only)...") - like this:
http://madsenworld.dk/tcmd/jarassoc.png

Or you can install either the 7zip or the Total7zip plugin
You don't need an association with the %Commander_exe%
An association with the internal zip packer is enough:

1. place the cursor on a jar file
2. Files -> Internal Association (Total Commander only)...
3. [Add] -Button
4. [Ok]
5. in the next dialog under Open: **zip
6. [Ok] [Ok]

Regards
Holger
Make our planet great again
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad »

2HolgerK
5. in the next dialog under Open: **zip
Of course - even better.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
hatalma
Junior Member
Junior Member
Posts: 2
Joined: 2019-08-18, 00:55 UTC

Re: Open .jar files as a directory

Post by *hatalma »

Thank you for all the answers!

I decided to install total7zip (8.5.6 still works on win7) to use HolgerK's method, but it prompted me to associate files with the new plugin so I ended up using sqa_wizard's solution.

Also didn't notice yet the first option in the context menu, so that and the Shift+Enter will be super-helpful too.
Thanks again!
Post Reply