You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

1

Saturday, September 12th 2009, 11:42pm

Question about deploying jar files

Hi to all
All my apps are developed using many jar libs.
In main part of my apps are only GUI and code for init those libs. When i compile app, all libs are included in main part, and size of that part is over 10mb.
How to make them to be separated of other libs?
Sorry for poor english, and thanks for the answers
Milan

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Saturday, September 12th 2009, 11:53pm

Hi,
a Jar file can be renamed to the extension zip and then manipulated by an archiver/packer tool capable of handling zip archives.
Window XP and Vista can handle such "compressed folders" internally.
You could just remove any unwanted 3rd party library contents and thus repackage your Jabaco classes in a smaller jar.
Rename it back to jar afterwards.

There are numerous "jar stripping" tools available.
They remove unused classes from ja file and take out debugging information.
Currently, I have no recommendation. All tools I tried have had some drawbacks.

Jar files may be "sealed" or "signed" by adding a signature to the Jar MANIFEST.
But this seems not to be the case for Jabaco Jar files.
For Jabaco Applets, the Jar files have to be signed. Otherwise they are not accepted by modern web browsers.

Greetings

A1880

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

3

Saturday, September 12th 2009, 11:59pm

Hi A1880
Can i hold my jar libs separate from my Main App jar?
For example:
In folder MyApp is Main.jar
In folder MyApp\Lib is all other jar libs
Thans
Milan

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Sunday, September 13th 2009, 12:08pm

Hi Milan,
yes. You can specify a CLASSPATH which tells the Java virtual machine where to look for libraries.
Look here for details.
But your advantage is limited. The loading time should be fairly the same compared to loading one big library.

When you compile your Jabaco application into an exe file, Jabaco will pack all needed libraries into a self-extracting executable.
This exe creates a temporary jar file whenever you start it. You'll find it under environment path %TMP% (or is it %TEMP%? I can't remember.)

Greetings!

A1880

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

5

Sunday, September 13th 2009, 4:41pm

Ok A1880
I now understand.
Thank you for help :thumbup:
Milan

Rate this thread
WoltLab Burning Board