Associating a JAR file?

Posted by: tfabris

Associating a JAR file? - 24/07/2002 10:54

Okay, I tried downloading the Sun Java Runtime Environment so that I could get mousewheel support in Jemplode.

It worked, but I hated having it on my system. Every time I surfed to a web page that contained java, everything would freeze up as it loaded the JRE. It was terribly slow.

So I de-installed the Sun JRE and everything works as it did before. Uses the JRE built into IE and works OK now.

However, having the Sun environment did one interesting thing: It allowed me to double-click on a JAR file and have it launch. This was neat.

Now that I've de-installed the Sun JRE, I can no longer double-click on a JAR file as JARs aren't associated with anything any more. If I wanted to associate JAR files with Microsoft's Java runtime, what executable would I associate them with?
Posted by: tms13

Re: Associating a JAR file? - 24/07/2002 11:15

In reply to:

So I de-installed the Sun JRE and everything works as it did before. Uses the JRE built into IE and works OK now.


I'm not really a Windows guy, but I do Java for my Day Job, and I thought that there was a checkbox item in IE's preferences dialog. So you can install Sun's VM but use the crappy, out-of-date JView one if you insist. (I do love supporting JView, honest).

Ah, yes - here it is:

Posted by: tfabris

Re: Associating a JAR file? - 24/07/2002 11:42

Very interesting. Thanks for that info, it might have just solved all my problems in a way I didn't anticipate.
Posted by: mschrag

Re: Associating a JAR file? - 24/07/2002 12:58

That's definitely the way to do things ... the Java Plugin = kind of crappy. I always install the latest VM and turn off the plugin in preferences.

Alternatively, you can add a registry entry for .jar:

HKEY_CLASSES_ROOT/.jar (Default),REGSZ=jarfile
HKEY_CLASSES_ROOT/jarfile/shell/open/command (Default),REG_SZ= "C:\pathtojavaw\javaw.exe" -jar "%1"

pathtojavaw could be c:\program files\jemplode 2.0\jre\bin if you don't have Java installed in any other place

ms
Posted by: tfabris

Re: Associating a JAR file? - 24/07/2002 18:38

Okay, yeah, that did the trick. Thanks, tms13, it totally solved my problem.
Posted by: image

Re: Associating a JAR file? - 25/07/2002 20:48

also, when you first install JRE1.4, it will ask you if you want to use it for IE's runtime.. just uncheck, and you don't even have to deal w/ it..
Posted by: wfaulk

Re: Associating a JAR file? - 25/07/2002 20:54

Am I the only person that finds that the Sun plugin works about a hundred times better than the standard IE one? I mean, sure, it does take a second to load, but I bet that it's not much longer than the IE one, it's just less invisible. Plus, it works better.
Posted by: tms13

Re: Associating a JAR file? - 26/07/2002 05:41

In reply to:

Am I the only person that finds that the Sun plugin works about a hundred times better than the standard IE one?


Not at all - the JView VM that comes with IE is horribly buggy in many respects (don't ask me about modal dialogs, for instance). The cynical part of me is easily convinced that it's a deliberate ploy by MS to discredit Java, though they claim they are restricted by the current legal case to providing a broken, out-of-date implemention.
Posted by: mschrag

Re: Associating a JAR file? - 26/07/2002 06:43

I will say that I misspoke a bit -- The problem with the Sun plugin (aside from the horrible startup time) is that a lot of people wrote applets that depend on MS's VM (idiosyncrosies of the VM, etc). For instance, the retarded bug tracking system our company uses requires the MSVM... Don't ask me why. So I can never turn on Sun's. However, having a 1.4 plugin is nice (builtin Swing). In fact, if I ever do an applet on-Empeg version of jEmplode, it will likely require 1.2+ plugin.