Prevent Java plugin from downloading .gz.gz version

The Java 1.7 plugin insists on trying to load pack.gz for the specified archive file. For instance. for applet tag:

<applet codebase="." code="com.whatever.Something" archive="applet/SomethingWhatever.jar" mayscript="true"> <param name="someKindOfSettingA" value="1234"> </applet> 

As a result, we get an HTTP server that receives requests:

 applet/SomethingWhatever.jar.pack.gz 

I understand that we can solve this by providing pack.gz, and that would be helpful. But now I just want to suppress additional requests. Is there a way to do this with an applet tag or something else?

We tried this:

 <PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=false"/> 

based on the obvious change of instructions here: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/tools/pack200.html . But that didn't matter.

+4
source share
3 answers

This is a JRE error:

See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8000291

Relations Camille

+1
source

The most logical settings would be attempts to use both true and fast applet tags:

  <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25> <PARAM NAME = "cache_archive" VALUE = "HelloWorld.jar"/> <PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=true"/> </APPLET> 

and

  <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25> <PARAM NAME = "cache_archive" VALUE = "HelloWorld.jar"/> <PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=false"/> </APPLET> 

OR you could try deleting the row by seeing what you get as a result (not garuntees, but this works from time to time)

  <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25> <PARAM NAME = "cache_archive" VALUE = "HelloWorld.jar"/> </APPLET> 

If none of these features work, you really have no way to cancel the call. The call is made to the pack.gz file before it is sent to the jar, and there is no way around this without creating a new class that does the same thing, but will not make the call to pack.gz at all.

Of course, as you said:

I understand that we can solve this by providing pack.gz, and it will be beneficial.

which I would just do, as it is a) simpler and b) nothing hurts.

0
source

Upgrading to the latest JRE fixes this problem. I had the same problem when running my application with jre 1.7_0_07. But updating to jre 1.7_0_11 fixed this.

0
source

Source: https://habr.com/ru/post/1439030/


All Articles