• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Final .jar size limitation ?

 
Ranch Hand
Posts: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks
I've read here that are some people worry about final jar size ?? Why ?
I haven't heard nothing about assigment with "must" related with final jar size !!!
My assignment dont tell anything about that !!
What do you tell me ranchers ?
Regards.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Grande Fernando!

Champion, there isn't really any "must" related to the size of the .jar file... but I remember that there is a warning about the size of the file when you are about to upload it...

But there isn't really any must related to the size of the final .jar file.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually when you do submit there is a note on that page saying something similar to "the file should not exceed 1MB".

Depending on your userguide (html vs txt) you may have images, which can increase your submission jar significantly. One thing I noticed was using BMP format tends to make the submission jar smaller. Yet GIF format makes the picture size smaller not submission jar.
 
Roberto Perillo
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh! Sorry for that. That's the warning I was talking about. According to my good buddy K, the size shouldn't exceed 1MB. There you go.
 
Fernando Franzini
Ranch Hand
Posts: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you guys shure ? 1 MB ?
I'm doing html userguide with a lot of images (jpg).....I'm worrie about it.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use bmp for images will definitely make your jar smaller. if you don't believe try it. but then you will need to replace your html img tags.
 
Fernando Franzini
Ranch Hand
Posts: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll store your sugestion...maybe I need that...but I'll finished first.
Thanks
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My submission jar was 496 kB and I had no images at all. So I wish you good luck, Fernando
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:use bmp for images will definitely make your jar smaller. if you don't believe try it. but then you will need to replace your html img tags.


This is not an absolute - it depends on your original bitmap file, and on what you use to create the GIF.

For example, starting with the ArchProject.bmp file from this post

As expected, the resultant file sizes are smaller than the original bmp. Now lets add them to a jar file and see how it looks. For the BMP the jar file will try to compress it as well as it can. For the GIF and JPG formats, it will be trying to compress a compressed image (which is not necessarily a good thing):

Column 4 shows the uncompressed size, and column 6 shows the compressed size.

As expected, the BMP file compressed nicely - it started at 983094 bytes as a file on my hard drive, and became 3734 bytes when stored within the jar file.

The GIF file however could not be compressed further, and in trying to compress it, the size of the file within the jar actually became larger than the original file. That is, the GIF file was 2603 bytes as a file on the hard drive, and 2608 bytes as a file within the jar file.

However the resultant compressed GIF was still smaller than the final compressed BMP file.

Even using zip with maximum compression only reduced the bmp to 2863 bytes while leaving the gif at 2603 bytes.

All of which is rather academic - unless there are a lot of image files (and there really shouldn't be for this project) you are unlikely to make that much of a difference to the overall jar file size.
 
Fernando Franzini
Ranch Hand
Posts: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When uploading your assignment, some candidates experience problems uploading files greater than a 1000K. We suggest optimizing the graphics to reduce the file size to between 200k and 400k.


some candidates experience problems uploading files ???
This is warning or requirement ??
I'm very disappointing with this upload limitation cause it will downgrading my scjd assignment
 
Roberto Perillo
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Champion, I'd say this is more of a warning... even though it shouldn't be a problem. How about using a tool to compress your images? I know Photoshop allows this kind of thing...
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic