Pack200 for reducing size of applets

Hi i am working swing based applet application which is deployed on a jboss3.2.6 webserver.the jar file application.jar+ size is 140kb.i compressed the jar file using sun java pack200 technology as application.pack200.gz+ file.now the jar file size is 46kb.the jar is deployed on application.war+ file with context-path */application* on the jboss deploy path.the war file that contains the jar file also has a servlet(pack200 servlet provided in the sunjava website) to service the *.jar requests to give the compressed application.pack200.gz file to the response.outputstream() for any incoming requests for any jar file.
When i make a request on the webbrowser as http://localhost:8080/application/application.jar+ the pack200 service servlet inside the application.war services the request to yield a compressed application.jar(46kb).+
Now the problem arises when im calling application.jar+ from an html page(*index.html*)using THE FOLLOWING CODE
<html>
<html>
    <title>
Applet APPLICATION
  </title>
  <head>
     <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
     <meta HTTP-EQUIV="Expires" CONTENT="-1">
  <meta HTTP-EQUIV="accept-encoding" CONTENT="gzip,deflate">
  <meta http-equiv="content-type" content="text/html">
  </head>
<BODY>
<Applet code='application.main.class' codebase='.' archive='../application/application.jar'>
<param name="java_arguments" value="-Djnlp.packEnabled=true"/>
</applet>
</BODY>
</HTML>The index.html file calling the applet is deployed in separate war file viewer.war+ with a context path */view* inside the jboss3.2.6 deploy path
When i load the index.html inside the webbrowser i always get the following exception in the sun java console of the webbrowser
Java Plug-in 1.5.0_02
Using JRE version 1.5.0_02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\kartheepan
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
load: class application.main.class not found.
java.lang.ClassNotFoundException: chart.MainApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 moreThe applet did not load successfully.
When i change the coding in the pack200 service servlet to give application.jar+ as response rather the compressed application.pack200.gz+ the application loads successfully in the index.html without fail.I believe there is no problem with the pack200 service servlet provided by the sun website.I am using jdk.1.5 version of java for development with jboss3.2.6 as application server.
i am afraid the webbrowser is not able to decompress the compressed application.jar successfully using the jdk1.5/bin/+unpack200.exe+ provided by the jdk1.5 version of java.Is it something im missing in the index.html+ code.
i have provided the following 2 mandatory things as mentioned in the pack200 deployment guidelines
<meta HTTP-EQUIV="accept-encoding" CONTENT="pack200-gzip,gzip">inside the <head> tag and also
<param name="java_arguments" value="-Djnlp.packEnabled=true"/>i even tried changing the meta tag value from
<meta HTTP-EQUIV="accept-encoding" CONTENT="pack200-gzip,gzip">to
<meta HTTP-EQUIV="accept-encoding" CONTENT="gzip,deflate">but with no success i still get the class not found exception.
Where i my going wrong shoul i need to write any pack200 install routine.AND IF SO WHERE DO I need to write should it be written on the server provided alongside the compressed jar or should it be present on the client machine.
Edited by: kartheepanmirra on Jun 12, 2009 8:45 AM
Edited by: kartheepanmirra on Jun 12, 2009 8:49 AM

is it some thing to do with the application server jboss3.2.6 it works fine in my localsystem and adjacent systems in intranet but it fails in remote system where network access between the remote and my system is slow.I get the following exception in jboss 3.2.6
18:34:19,875 ERROR [Engine] StandardWrapperValve[jarService]: Servlet.service() for servlet jarServi
ce threw exception
java.lang.NullPointerException
        at ContentType1.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:186)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:19
8)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
va:158)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P
rotocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:619) when it fails to decompress on the remote machine.The decompression works fine in local and adjacent machine.also i checked it myself to c whether the servlet services the compressed jar file.yes it works fine.the servlet has no problem.I think it must be some issue with the slow network.but nevertheless it should work fine in local area network.if it doesnt it will not work in internet.
Edited by: kartheepanmirra on Jun 16, 2009 8:48 AM
Edited by: kartheepanmirra on Jun 16, 2009 8:51 AM

Similar Messages

  • Batch Processing for reduced size

    I want to take a number of PDF files and try to reduce their file size. Is there a way to do this in Batch Processing? I really don't want to open up each individual file!
    Thanks

    yes, create a new batch sequence, no need to add any commands, just click on output options to select the pdf optimizer settings.

  • Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Just save the document to a new jpeg file name using a lower quality setting or re-size the image down in  size the save a high quality smaller new jpeg image.

  • Very large file 1.6 GB..sports program for school. lots of photos, template where media spots saved and dropped photos in..trying to get it to printer swho says its too large but when reduces size loses all quality...HELP??

    Please help...large file my sons Athletic program. Had noto problem with Quality last year..this new printer said file is too large..too many layers, can I FLATTEN..He reduced size and photos look awful. It is 81 pages. Have to have complete before next friday!! Help anyone??

    At that size it sounds like you have inserted lots of photos at too large a size and resolution.
    Especially for a year book style project, first determine your image sizes and crop and fix the resolution to 300 dpi, then drag them into the publication. Pages does not use external references to files and rapidly grows to quite large size unless you trim and size your images before placement.
    Peter

  • Reduce size of Air runtime for mobile apps

    Flash & Air are fantastic for create Android apps
    but most of user don't have Air Runtime package on their phones and we must embed this in publish
    unfortunately the size of adobe air runtime is about 8 MB ! and with slow internet it take long time to download the apps , and even for getting this apps with Bluetooth
    is there any chance to reduce size of Adobe Air Runtime ?
    or create various version of Air runtime , for example in most project we don't need play video or sound ...

    This has been asked before several times. I doubt you will get a procedure from NI on how to do this since the run-time engine is intended to be a collection of libraries to be used by various types of LabVIEW apps.
    That said, it doesn mean that users haven't tried to figure out how to do it. Note: I do not recommend this practice nor can I speak to its effectiveness since I've never tried it.

  • HT4623 my iPad has over 5GB of memory used for "other." What is this and can I reduce size?

    my iPad has over 5GB of memory used for "other." What is this and can I reduce size?

    gregorfromny wrote:
    my iPad has over 5GB of memory used for "other." What is this and can I reduce size?
    See Here  >  maclife.com/how_remove_other_data_your_iphone
    Other is usually around 1 GB...
    A  ' Large Other ' usually indicates Corrupt Data...
    First Try a Restore from Backup...
    But... if the Large Other Persists, that is an Indicator of Corrupt Data in the Backup...
    Then a Restore as New is the way to go...
    Details Here  >  http://support.apple.com/kb/HT1414
    More Info about ‘Other’ in this Discussion
    https://discussions.apple.com/message/19958116

  • Yahoo page is too big for monitor screen. How doI reduce size of yahoo page?

    When I open firefox the yahoo home page is too big for the size of the monitor.

    Hi,
    Try resetting the zoom by pressing '''Ctrl''' + '''0''' (zero) on the keyboard. Please [https://support.mozilla.com/en-US/kb/how-do-i-use-zoom?s=zoom+feature&r=0&as=s see this.]
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://addons.mozilla.org/en-US/firefox/addon/whats-that-preference/ What's That Preference? add-on] - Quickly decode about:config entries - After installation, go inside about:config, right-click any preference, enable (tick) MozillaZine Results to Panel and again right-click a pref and choose MozillaZine Reference to begin with.
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions/Add-ons]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]

  • Pack200 for EAR files?

    Pack200 has shown considerable success in compressing the size of JARs for client downloads.
    I would be most interested in a similar development for compressing the size of WARs/EARs for server uploads.
    Typically EAR files are 20MB+, and can take 10-15 minutes to upload to a remote application server. I would hope Pack200 could reduce this time considerably.
    Are there any such plans for Pack200 to be applied to EAR/WAR files?
    Thanks,
    Richard.

    Hi there,
    ear files are generally deployed on J2EE Application servers. The ear file can just contain a web application, just EJB's (as jar files) or both. In my experience it's unusual to be able to deploy a war file directly on an app server. On the other hand, there are many Web containers on the market that have no integrated EJB container. It is usual to deploy Web applications on these products as war files.
    In the end the way that you package up the components of your application will be determined by the products that you use. But for most cases where you have seperate systems for yor web and ejb tiers you will deploy a war file on the server for the web tier and an ear file on the server for the EJB tier (most likely an app server).
    Hope this helps
    Amanda
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers

  • How to reduce size or compress PDF files?

    Hi guys,
    Does someone knows if there is a way  to reduce the size of the PDF file with good quality even on Pictures and Scanned documents? I know the option 'export', 'quartz filter' 'reduce size', but the compression is so extrem. Many files can't not been read, the quality is so bad. Is there a additional app, software or extension that let the user play with the compression on pdf files and let it be more personalized like the dopdf V7 available for windows? i am very dissapointed with this. Please help or suggestion. I will appreciate it. Thanks

    I have used the excellent PDF Toolkit app for a while, and its preformed well. Occassionaly it makes the document into a negative image...which Im noyt sure why...
    Mathishk, im trying your online version out, and am impressed and admire the fact that you have done this.
    Well done. 
    A TRICK i use often. Once all hires images are on the designed document - and its coming in at 15-20mb, just change the link to the images so they are 'missing' then make a pdf.
    i.e 'Hi Res images' to HRes images - old'
    The screen resolution of images is still great, but file comes in at fraction of the size.
    You 'trick' the document to use screen images only. So my 18mb file comes in as 5.2mb.
    Just remember to change the images folder name back, so files relink.
    Andy

  • Only the first page is printed reduced as setup. All pages afterward are full size with information cut off. Recent problem. Can print from Safari just fine. How can I get all pages to be reduced size?

    Question
    Printing internet pages
    Reduced print size
    Only the first page is reduced and printed as desired
    All pages after the first page are full size with information cut off
    Recent problem never seen before
    Can print from Safari and other software just fine
    How can I get all pages to be reduced size?

    One suggestion worked from the Firefox prints incorrectly link mentioned above by mha007. I'm thrilled since this has been annoying me for weeks. Thanks mha007!
    Reset all Firefox printer settings
    # Open your profile folder:
    # On the menu bar, click on the Help menu and select Troubleshooting Information. The Troubleshooting Information tab will open.
    # Under the Application Basics section, click on Show in Finder. A window with your profile folder will open.
    # Note: If you are unable to open or use Firefox, follow the instructions in Finding your profile without opening Firefox.
    # On the menu bar, click on the Firefox menu and select Quit Firefox.
    # In your profile folder, copy the prefs.js file to another folder to make a backup of it.
    # Open the original prefs.js file in a text editor (such as TextEdit).
    # Remove all lines in prefs.js that start with print. and save the file.
    # If something goes wrong when you open Firefox, close it again and overwrite prefs.js with the backup you made.

  • Using Save As Reduced Size PDF in Adobe Acrobat X Pro results in a loss of font.

    We have multiple paged PDF documents (mapbooks created with Esri's ArcMap) that we would like to reduce in size.  When we us the Save As Reduced SIze PDF, the PDF is successfully reduced in size and looks good, except for the fact that starting on page 2, the Times New Roman font is lost and we get a sans-serif font instead (looks like arial).  The first page is always fine and not affected.  It's starting with the second page where the font is lost.  Does anyone have an idea of why that might be happening and how we can use the Reduce File Size feature without losing the font starting on the second page?

    Thanks Bill, that worked after some trial and error.  I was still getting the same problem when I just accepted the default settings for PDF Optimizer.  But I got rid of the problem by creating a Custom setting and turning off the optimization for everything except Image.  And for the Image optimization, I just accepted the defaults.  That took care of the changing fonts problem.  Here is a screenshot of the settings I used (just make sure the check boxes circled are turned off, and only the image compression is turned on):

  • 'Font contains bad/Widths' and 'Cannot find/create font' errors when saving pdf as Other Reduced Size PDF

    I am exporting .indd files from within Indesign as pdf files, opening in Acrobat Pro XI. I have no trouble creating the initial pdf file, however, when I go to Save Other > Reduced Size PDF I get error messages. Depending on the file, I receive either the message, "The font (Myriad Pro) contains bad/Widths" replacing the text with dots or "Cannot find or create the font (Helvetica) Some characters may not print or display properly" replacing text with dots or boxes.
    My confusion is that the file is exporting to pdf from Indesign without error, it is only when I try to Save Other> Reduce Size PDF that the error occurs.
    Also, it is only occurring on five out of 120 pages. These same fonts are on other pages and I have no trouble at all with exporting or Reduce Size PDF.
    More frustrating is that I have never had this problem occur in all my previous versions of Acrobat using the same process and typefaces.
    I am reaching deadline on this and cannot find a solution other than to reload Acrobat 9 and ditch this upgrade.
    Any help would be greatly appreciated.

    I, too have experienced this issue. Upon export from INDD CS6, I see the error message "The font 'IXWIPX+SourceHanSansSC-Bold' contains bad \Widths."
    The only items on the single-page InDesign document I'm trying to export are copies of a one-page PDF (which was extracted from a longer PDF, arranged into a cover format). I can provide all files as necessary. The longer document that the one page came from also experienced an error when I tried to print to Adobe PDF. While I still get a PDF of the cover on export, despite the "bad \widths" message, it won't print from certain machines. I get nothing (not even an empty shell file) from the attempt to print the larger document (where the cover elements came from) to PDF.
    I can deal with these issues with a few unorthodox workarounds, but wanted to offer comments or volunteer to help test fixes if possible.
    For the record, I'm really not enjoying Acrobat XI. It doesn't seem to have much by way of new features (at least not that I use), and some of those I used most in version X are gone or less functional. Common fonts like Times New Roman are often not found (even though they are definitely on my system); I have a much harder time editing text through the new interface, and I have a few other small gripes—some that I don't have time to get into, others that wouldn't really matter, except that they weren't a problem until I "upgraded." Just sayin'.
    Thanks for listening.

  • Acrobat XI Pro crashes when saving as a reduced size PDF in version 11.0.07

    Since upgrading to the v 11.0.7 update, Acrobat XI Pro crashes every time I try to "save as" a reduced size PDF.  I have tried several different settings, but still crashes.

    You might try to setup the page size in the Adobe PDF printer and then print to the printer. I assume you are using PDF Maker (create PDF) and that may be the problem. You might also open the preferences in PDF Maker and turn off most of the options - none should be needed for a single page since you would likely not be using transitions, bookmarks, etc.
    Just as a test, you may want to just start with printing ot the Adobe PDF printer, but you will likely get the default paper size with the PPT shrunk to fit.

  • Adobe Acrobat X Pro version 10.1.12: Save As, Reduce Size PDF

    I am running Adobe Acrobat X Pro version 10.1.12.  The File > Save As > Reduced Size PDF..." does not work.  The file size barely changes, if it changes at all.  In some cases, the file size is slightly larger after saving using the reduced size PDF option.  In previous versions, the option would drastically reduce the document size.  The documents are all text in black/white with no graphics and usually Times New Roman or Arial type fonts.  Nothing fancy.  Is this a bug in this version?  I have been unsuccessful in finding a fix.  Optimizing does nothing.  Any insight you may provide will be most helpful.  Thank you in advance.

    It's working for me, reducing like Acrobat Pro 9 did (that was my previous version). According to the software, saving to the latest possible version of Acrobat will give the biggest reduction. Good luck.

  • Can I preset the default save feature in Acrobat 10 to save a MS Word document as a "REDUCED SIZE PDF"?

    I use MS Word for Mac 2011 to create documents and quotations. I'm using Adobe Acrobat Pro 10.1.12 on a MAC. I want to save the MS Word file as a "REDUCED SIZE PDF" first, without having to first save it as a normal PDF, then re-save it as the reduced size. How would I do this?? Can this be preset as my default>

    You cannot. Because this option both takes much longer and reduces the quality of files, it has to be chosen specifically.
    In any case, when you save a PDF file from Word. this process does not involve Acrobat or Adobe software in any way.

Maybe you are looking for