Open .jar files as a directory [solved]

English support forum

Moderators: Stefan2, white, sheep, Hacker

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 » 2019-08-18, 01:21 UTC

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: 3481
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Open .jar files as a directory

Post by *sqa_wizard » 2019-08-18, 14:51 UTC

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: 8467
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad » 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
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b6 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Usher
Senior Member
Senior Member
Posts: 434
Joined: 2011-03-11, 10:11 UTC

Re: Open .jar files as a directory

Post by *Usher » 2019-08-18, 16:04 UTC

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.
Regards from Poland
Andrzej P. Wozniak

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3394
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open .jar files as a directory

Post by *Horst.Epp » 2019-08-18, 16:54 UTC

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 10 Home x64 May 2019 Update, Version 1903 (OS Build 18362.329)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.22a x64 and x86, Everything 1.4.1.949 (x64)

User avatar
petermad
Power Member
Power Member
Posts: 8467
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad » 2019-08-18, 17:44 UTC

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 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b6 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
HolgerK
Power Member
Power Member
Posts: 5080
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Open .jar files as a directory

Post by *HolgerK » 2019-08-18, 20:40 UTC

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: 8467
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Open .jar files as a directory

Post by *petermad » 2019-08-18, 23:32 UTC

2HolgerK
5. in the next dialog under Open: **zip
Of course - even better.
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b6 on Android 6.0
Get: Extended Total Commander Menus | 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 » 2019-08-19, 00:28 UTC

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