× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes, I found that if I select "Extract required libraries into generated
Jar" in Eclipse's Runnable Jar wizard it puts .class files in my jar and
startup time is dramatically decreased. Funny too is that the resulting
jar of classes is noticeably smaller that the jar of jars. Whatever. :-P

On Mon, Nov 14, 2016 at 12:00 PM, <java400-l-request@xxxxxxxxxxxx> wrote:

Send JAVA400-L mailing list submissions to
java400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/java400-l
or, via email, send a message with subject or body 'help' to
java400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
java400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of JAVA400-L digest..."


Today's Topics:

1. Java load times (Kelly Beard)
2. Re: Java load times (David Gibbs)


----------------------------------------------------------------------

message: 1
date: Mon, 14 Nov 2016 10:49:56 -0600
from: Kelly Beard <kenverybigliar@xxxxxxxxx>
subject: Java load times

I have a Java program that I've written that uses some classes/jars from
Apache, Jersey & Genson. It is a webservice client that reads some info
from a AS400 data queue (so it is using JT400 stuff as well), formats a
JSON request and sends it off. I'm not a Java super user but I get my way
around. I'm developing this application in Eclipse where the build is done
and my final jar is built. I then use the Eclipse Export and create a
runnable jar and then copy over to a IFS folder and give it a spin. It is
abhorrently slow to load and get going, but once it is loaded and has made
its first request, it is great and fast enough for our purposes. I'm
wondering though how to make startup quicker and if I can make overall
execution faster, so much the better. I noticed that my jar was
essentially a container of other jars. Here is the rundown of a "jar
tvf". I'll go ahead and end here and entertain any suggestions at all.
:-)

1404 Wed Nov 09 16:09:38 CST 2016 META-INF/MANIFEST.MF
0 Wed Nov 09 16:09:38 CST 2016 org/
0 Wed Nov 09 16:09:38 CST 2016 org/eclipse/
0 Wed Nov 09 16:09:38 CST 2016 org/eclipse/jdt/
0 Wed Nov 09 16:09:38 CST 2016 org/eclipse/jdt/internal/
0 Wed Nov 09 16:09:38 CST 2016 org/eclipse/jdt/internal/
jarinjarloader/
978 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/JIJConstants.class
714 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader$ManifestInfo.class
4735 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.class
1505 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.class
1841 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.class
1149 Wed Nov 09 16:09:38 CST 2016
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.class
0 Wed Nov 09 11:36:50 CST 2016 com/
0 Wed Nov 09 11:36:50 CST 2016 com/quikq/
8174 Wed Nov 09 16:08:18 CST 2016 com/quikq/QQNotification.class
2445 Wed Nov 09 14:44:58 CST 2016 com/quikq/QQNotificationRequest.class
2312 Wed Nov 09 16:09:24 CST 2016 com/quikq/CSVHelper.class
14767 Wed Nov 09 16:09:38 CST 2016 aopalliance-repackaged-2.5.0-b05.jar
178571 Wed Nov 09 16:09:38 CST 2016 hk2-api-2.5.0-b05.jar
183961 Wed Nov 09 16:09:38 CST 2016 hk2-locator-2.5.0-b05.jar
119004 Wed Nov 09 16:09:38 CST 2016 hk2-utils-2.5.0-b05.jar
750581 Wed Nov 09 16:09:38 CST 2016 javassist-3.20.0-GA.jar
26366 Wed Nov 09 16:09:38 CST 2016 javax.annotation-api-1.2.jar
5952 Wed Nov 09 16:09:38 CST 2016 javax.inject-2.5.0-b05.jar
85353 Wed Nov 09 16:09:38 CST 2016 javax.servlet-api-3.0.1.jar
115534 Wed Nov 09 16:09:38 CST 2016 javax.ws.rs-api-2.0.1.jar
100146 Wed Nov 09 16:09:38 CST 2016 jaxb-api-2.2.7.jar
168855 Wed Nov 09 16:09:38 CST 2016 jersey-client.jar
714807 Wed Nov 09 16:09:38 CST 2016 jersey-common.jar
66123 Wed Nov 09 16:09:38 CST 2016 jersey-container-servlet-core.jar
18101 Wed Nov 09 16:09:38 CST 2016 jersey-container-servlet.jar
971307 Wed Nov 09 16:09:38 CST 2016 jersey-guava-2.24.jar
72756 Wed Nov 09 16:09:38 CST 2016 jersey-media-jaxb.jar
940726 Wed Nov 09 16:09:38 CST 2016 jersey-server.jar
246924 Wed Nov 09 16:09:38 CST 2016 org.osgi.core-4.2.0.jar
20235 Wed Nov 09 16:09:38 CST 2016 osgi-resource-locator-1.0.1.jar
52150 Wed Nov 09 16:09:38 CST 2016 persistence-api-1.0.jar
63777 Wed Nov 09 16:09:38 CST 2016 validation-api-1.1.0.Final.jar
115534 Wed Nov 09 16:09:38 CST 2016 javax.ws.rs-api-2.0.1_2.jar
14767 Wed Nov 09 16:09:38 CST 2016 aopalliance-repackaged-2.5.0-b05_2.jar
178571 Wed Nov 09 16:09:38 CST 2016 hk2-api-2.5.0-b05_2.jar
183961 Wed Nov 09 16:09:38 CST 2016 hk2-locator-2.5.0-b05_2.jar
119004 Wed Nov 09 16:09:38 CST 2016 hk2-utils-2.5.0-b05_2.jar
750581 Wed Nov 09 16:09:38 CST 2016 javassist-3.20.0-GA_2.jar
26366 Wed Nov 09 16:09:38 CST 2016 javax.annotation-api-1.2_2.jar
5952 Wed Nov 09 16:09:38 CST 2016 javax.inject-2.5.0-b05_2.jar
85353 Wed Nov 09 16:09:38 CST 2016 javax.servlet-api-3.0.1_2.jar
100146 Wed Nov 09 16:09:38 CST 2016 jaxb-api-2.2.7_2.jar
971307 Wed Nov 09 16:09:38 CST 2016 jersey-guava-2.24_2.jar
246924 Wed Nov 09 16:09:38 CST 2016 org.osgi.core-4.2.0_2.jar
20235 Wed Nov 09 16:09:38 CST 2016 osgi-resource-locator-1.0.1_2.jar
52150 Wed Nov 09 16:09:38 CST 2016 persistence-api-1.0_2.jar
63777 Wed Nov 09 16:09:38 CST 2016 validation-api-1.1.0.Final_2.jar
168855 Wed Nov 09 16:09:38 CST 2016 jersey-client_2.jar
714807 Wed Nov 09 16:09:38 CST 2016 jersey-common_2.jar
18101 Wed Nov 09 16:09:38 CST 2016 jersey-container-servlet_2.jar
66123 Wed Nov 09 16:09:38 CST 2016 jersey-container-servlet-core_2.jar
72756 Wed Nov 09 16:09:38 CST 2016 jersey-media-jaxb_2.jar
940726 Wed Nov 09 16:09:38 CST 2016 jersey-server_2.jar
386145 Wed Nov 09 16:09:38 CST 2016 genson-1.4.jar
4767382 Wed Nov 09 16:09:38 CST 2016 jt400.jar
11406 Wed Nov 09 16:09:40 CST 2016 jargs.jar
219001 Wed Nov 09 16:09:40 CST 2016 log4j-api-2.7.jar
1296865 Wed Nov 09 16:09:40 CST 2016 log4j-core-2.7.jar


--
Kelly Beard


------------------------------

message: 2
date: Mon, 14 Nov 2016 10:57:51 -0600
from: David Gibbs <david@xxxxxxxxxxxx>
subject: Re: Java load times

On 11/14/2016 10:49 AM, Kelly Beard wrote:
I'm developing this application in Eclipse where the build is done
and my final jar is built. I then use the Eclipse Export and create
a runnable jar and then copy over to a IFS folder and give it a spin.

Rather than creating a runnable jar, try just creating a normal jar and
copy the resulting JAR file over along with all the dependencies.

I'm guessing that part of the startup slowness is because Java has to
extract all the included jar file's.

The Java command you issue will have to include a -classpath parameter and
a main class to run.

david


--
David Gibbs
midrange.com

* IBM Power Systems Champion

IBM i on Power Systems: For when you can't afford to be out of business!

I'm riding a metric century (100 km / 65 miles) in the American Diabetes
Association's Tour de Cure to raise money for diabetes research, education,
advocacy, and awareness. You can make a tax deductible donation to my ride
by visiting http://lsteml.diabetessucks.net. My goal is $6000 but any
amount is appreciated.

See where I get my donations from ... visit http://lsteml.diabetessucks.
net/map for an interactive map (it's a geeky thing).

I may have diabetes, but diabetes doesn't have me!


------------------------------

Subject: Digest Footer

--
This is the Java Programming on and around the IBM i (JAVA400-L) digest
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



------------------------------

End of JAVA400-L Digest, Vol 14, Issue 70
*****************************************





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.