Author Topic: Java executables treated as archives  (Read 23600 times)

GrantSP

  • Active Member
  • ***
  • Posts: 92
    • View Profile
Java executables treated as archives
« on: December 31, 2014, 02:12:53 »
If you have the setting:
Explorer Panel Settings... --> Mouse Configurations --> Left/Right/Middle Mouse button -- Double click
set to:
Open folder/Execute File
Double clicking on a Java archive (*.jar) opens it as any other type of archive or folder, despite the fact that Windows is et to treat these as files NOT folders.
The default double-click action from an explorer window runs this as an executable.

Changing this setting to:
Execute File
in the settings panel correctly treats it as an executable, but I lose all folder navigation functionality.

Additionally changing this setting to:
Open Folder
doesn't actually enable open folders for me, no matter if they are *.jar, or any archive format, files or simply folders in the tree.

This is on Win7 64bit with MC v4.6 (build 1777)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4411
    • View Profile
    • Multi Commander
Re: Java executables treated as archives
« Reply #1 on: December 31, 2014, 08:55:32 »
If you do not want Jar files (that actually just are zip files) be handled as zip files then you need to tell the ZIP FileSystem Extension not to register with the .JAR extension.

Configuration > Manage Plugins and Extensions
Under the "Extension Type" dropdown select "FileSystem Plugins"
Then Select FS-Zip and click options.
and remove "jar" from the list if file extension. Save and restart MC

GrantSP

  • Active Member
  • ***
  • Posts: 92
    • View Profile
Re: Java executables treated as archives
« Reply #2 on: January 01, 2015, 02:26:55 »
Thank you. As always your explanations are clear and concise.

Question though. Why are *.jar files added to that extension as archives by default? Surely in the majority of setups *.jar files should always be treated as executables?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4411
    • View Profile
    • Multi Commander
Re: Java executables treated as archives
« Reply #3 on: January 07, 2015, 21:59:36 »
What else is there to do with jar files..  Let windows execute them ? But than JAVA will start. And who want's that ?  It is JAVA after all.

seriously..It is by request.. got lots of request that jar files should be opened as zip..
« Last Edit: January 07, 2015, 22:03:49 by Mathias (Author) »

GrantSP

  • Active Member
  • ***
  • Posts: 92
    • View Profile
Re: Java executables treated as archives
« Reply #4 on: January 07, 2015, 23:15:41 »
The default action on *.jar files should be to let JAVA run them because, as you say, they are JAVA.

The vast majority of people shouldn't be looking into *.jar files since they are never used as a means to package files form delivery but as an executable. I'm surprised you even phrased your comment the way you did, with mild sarcasm.

By all means allow MC the means to open them as an archive, BUT NOT as default.

The open-source document formats like *.ods & *.odt from programs like LibreOffice or OpenOffice are also compressed archives, using your logic, the default action for these will also be to open them in MC as an archived folder and examine the contents! I'm sure you agree that is the wrong thing to do.

I was not aware that you have received lots of requests to implement this function but, I'm sorry, regardless of the number of requests this is not the best way to treat those files.

The default action on ANY file, ie. the action performed by a double left-click, should be the same as the action Windows would perform on it if invoked from the commandline.
Call a *.txt file and the default action is to run the assigned text editor, call a *.jpg and your graphics editor/viewer will run, a *.zip and your archive program handles the file. Calling a *.jar would call the associated program. If you don't have JAVA then it probably would be an archive manager, but 99% of the time it will be JAVA.
Just how hard is it for people that want to do any non-default action on ANY filetype to setup a context menu action.

I hope you read this in the context in which it was written, not as an angry response, but as a bemused MC user that would like you to reconsider this position on the default actions for specific filetypes.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4411
    • View Profile
    • Multi Commander
Re: Java executables treated as archives
« Reply #5 on: January 08, 2015, 13:34:32 »
If it was another program than java.. yes..  But it is java..  horrible , scary, crappy, dangerous java.. 
Don't ever use java..  Your life will be so much better.. :)

(Sorry I just really dislike java... )

Anyway. The whole system how extensions and virtual file system are connect are going to be change. So maybe when that is redone it might change.. maybe
« Last Edit: January 08, 2015, 19:02:00 by Mathias (Author) »

GrantSP

  • Active Member
  • ***
  • Posts: 92
    • View Profile
Re: Java executables treated as archives
« Reply #6 on: January 08, 2015, 22:37:21 »
hmm... that last comment was both disturbing and promising! :o :)

I actually agree with you about Java, however your/my view on its usefulness as an executable's platform isn't relevant, the standard of its handling is though.

At any rate, it isn't worthy of a lengthy discussion about that, I look forward eagerly to whatever new system you have devised.

Thank you again for your continued support and your fantastic software.

Borg

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: Java executables treated as archives
« Reply #7 on: February 26, 2015, 09:56:06 »
Question though. Why are *.jar files added to that extension as archives by default? Surely in the majority of setups *.jar files should always be treated as executables?
.jars are archives in default windows environment. No reason to treat them otherwise. They should not be just exec'd 'as are' except if one really knows what he want to do.
Just like treating .doc files as .zip (which they are) would not be that useful either.

If it was another program than java.. yes..  But it is java..  horrible , scary, crappy, dangerous java.. 
Don't ever use java..  Your life will be so much better.. :)

(Sorry I just really dislike java... )

Anyway. The whole system how extensions and virtual file system are connect are going to be change. So maybe when that is redone it might change.. maybe
Totally agreed, but sometimes java is a necessary evil, at least until more larger OEMs move away from it.
For example, I have to use this obsolete trash of jre 6 for CISCO DM, since it will not work otherwise and tehres no new version of it.
« Last Edit: February 26, 2015, 09:58:18 by Borg »

GrantSP

  • Active Member
  • ***
  • Posts: 92
    • View Profile
Re: Java executables treated as archives
« Reply #8 on: February 26, 2015, 23:22:54 »
@Borg
It is precisely because Windows treats them as archives that I wrote this comment (TBH I'm not even 100% sure Windows does treat them as archives by default, but I'll take your word on it).
Windows will treat them as archives, UNTIL you install Java which then changes that behaviour to have them run as executables. It is MC's secondary step to change that behaviour that is odd.
I think you have completely misunderstood my comments if your response is:
"Just like treating .doc files as .zip (which they are) would not be that useful either."
Who said anything about that? In fact I used those filetypes as an argument against the current MC behaviour.
*.docx, *.odt and other Open-Source document formats ARE archives but Windows won't treat them as such because they are designed to opened by a specific program. So too *.jar. They are designed to be used by the JRE. No one uses *.jar as mere archives! They use *.7z, *.zip or *.rar or any other better compression format.

To summarise.
  • People only ever come in to contact with *.jar files when, for whatever reason, they install a JRE, thus causing *.jar files to be viewed as programs.
    Jar files are only ever used to act as executables, not as an archive format.

At any rate, MC's viability is not dependent on my view of *.jar files and I still consider this to be the best file manager of all, free or otherwise.

Borg

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: Java executables treated as archives
« Reply #9 on: March 02, 2015, 08:53:59 »
If you require, you can set the files to be treated as .exe files no matter the file manager you use.

[HKEY_CLASSES_ROOT\.jar]
@="exefile"
"Content Type"="application/x-msdownload"



This makes it executable from anything, including explorer.

I use this tactic to define a custom .exe extension to prevent virus contamination of my command center application.