jfreegraph--loading time- URGENT

Hi,

I am using jcommon-1.00.jar for jfreegraph...however, i am not using everything...

Because the jar file is large,it takes a very long time to load...

how to unjar so that i choose another class i use and then jar it back..plshelp..

pls let me know if i explain not so ok..
Jasbir21Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
>>how to unjar so that i choose another class i use and then jar it back..plshelp..

That's a dangerous strategy, as you could easily omit necessary classes. It could even violate the licence
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StillUnAwareCommented:
Actually, JVM loads only those classes it needs to, so all You could do is to jar it without compression. This should speed it up a lot.
0
Jasbir21Author Commented:
but i read somewhere that because too big, you could use only wanted classes..
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Jasbir21Author Commented:
--->>>
Actually, JVM loads only those classes it needs to, so all You could do is to jar it without compression. This should speed it up a lot.

how to jar without compression then...
0
CEHJCommented:
(I'm assuming you're talking about 'loading' as in downloading the jar across a network *then* loading)

Please clarify if that's not the case
0
Jasbir21Author Commented:
actually, what i mean is that when i download across network , it takes very long time...

However, if the file is on my pc, it takes very fast...

I am trying to decrease download time...

sorry..i use wrong word...
0
Jasbir21Author Commented:
not to sure whether the word is load or download then....
0
sciuriwareCommented:
Then the network is the bottleneck and uncompression makes things only worse!

;JOOP!
0
CEHJCommented:
>>That's a dangerous strategy,

But if you want to give it a try, start the app with the verbose flag set, then you can see what's being loaded
0
Jasbir21Author Commented:
>>That's a dangerous strategy,
meaning is that against license agreement...?
0
CEHJCommented:
java -verbose YourApp | find "freegraph" >>fgloading.log

The last named file will contain freegraph (if that's a valid part of a package) classes loaded
0
Jasbir21Author Commented:
It is just that, when it is on pc, the time is faster because it is nearer ...

but when on the server, to download to web it takes very long time....even though it says

 "Applet " loaded and after some time, you would see "Applet started", you still need to wait before all the download complete....
0
gauravkrtomarCommented:
http://www.esus.com/javaindex/j2se/javawebstart/wseagerlazy.html

there is something as lazy download and eager download......the above code shows that for Java Web Start. But if you are using Applets then i dont think you have any other option, u have to face the sloppyness of loading all the jars.
0
Jasbir21Author Commented:
actually, this is applet....
0
Jasbir21Author Commented:
but if i unjar the file, and use only needed classes, i am violating the license...?
0
Jasbir21Author Commented:
and i put a copy of the jar file (everything on the server) as well...
0
CEHJCommented:
>>actually, this is applet....

In that casel, what you're witnessing is probably partly due to the loading of the VM
0
gauravkrtomarCommented:
One thing you can do is that the JFreeChart is open source and the code for the same is also available.

So just download the source files, and see wat all the classes you need to run your program.
Then make a jar containing only the necessary classes.

This way you will not be violating any license agreement, plus there might be case that the jar is signed(thus you will not have control over the jfreechart.jar) then by creating ur on jar u can have full control.
0
CEHJCommented:
>>i am violating the license...?

Check the terms
0
Jasbir21Author Commented:
--->>see wat all the classes you need to run your program. Then make a jar containing only the necessary classes.

ok..i think i understand now...lets say i put the classes file in the folder called org..how do i jar the folder then...is it by using winzip ?


0
gauravkrtomarCommented:
u can use the jar utility provided by the Sun

jar -cf abc.jar org

where abc is the name of the jar and org is the directory


0
gauravkrtomarCommented:
try using that command at the command prompt........
also u can view the help by using following command at command prompt:-
jar -help
0
sciuriwareCommented:
Jasbir21, I get the impression that you don't know the jar command etc.

Please stop what you're doing: you'll leave classes out that are occasionally needed
and you'll end up with a failing package.
Better a slow load than nothing at all.

;JOOP!
0
Mayank SAssociate Director - Product EngineeringCommented:
>> So just download the source files, and see wat all the classes you need to run your program

BTW, the classes being used might also internally use some other classes which you might miss out, so its better not to do that.
0
Jasbir21Author Commented:
pls give me some time to read this....
0
gauravkrtomarCommented:
>> So just download the source files, and see wat all the classes you need to run your program
If u have the source-code u can't compile the classes if the necessary classes r not available.
0
CEHJCommented:
:-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.