• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Final .jar size limitation ?

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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.
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • 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: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • 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: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll store your sugestion...maybe I need that...but I'll finished first.
Thanks
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic