• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

packaging question

 
Dave Robbins
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

a little background
I've been working on an applet
at my house everything works hunky-doorie
I showed it to a friend at his house where it has to be server over my relatively slow ADSL line and in loads kinda slow and then the performance isn't so good (it does network IO while it's running)
so, first, question about the slow download
let's say all my class files are bundled up in foo.jar
my applet also makes use of a third party library that's in bar.jar
I included bar.jar in foo.jar with a manifest file that looks like this

Main-Class: mypackage.foo
Class-Path: bar.jar

as luck would have it, I also had a copy of bar.jar laying around in the directory on the server where the stuff is being accessed from
(cause I'm sloppy and don't clean up behind myself :rolleyes )
I looked at the server logfiles to try to figure out why it was slow and see that the browser is downloading foo.jar and bar.jar
so bar.jar basically got downloaded twice
I temorarily fixed it by leaving bar.jar out of foo.jar and that fixed it,
but I'd like to package it all in on file
(confusing, no??)
the html looks like this



why is it downloading bar.jar??

question 2:
once loaded the network IO seems slow
it rocks at my house on a local network
I'm using a servlet on the webserver to do database stuff for the applet
I'm not passing strings back and forth, I'm passing a class I made
my applet puts the text for a PreparedStatement and the required parameters in this class and sends it to the servlet
the servlet builds the PreparedStatement and runs it
if there is a ResultSet it extracts the relevant data and puts it in my custom class and sends it back
so:
is this inherently slower than just sending xml back and forth
does this approach create a lot of overhead or is it just slow because I'm serving over an ADSL line that's only 256 KB/sec upstream

I await your knowledgeable replies, but it's not URGENT or anything like that
TIA

Dave
[ August 15, 2006: Message edited by: Dave Robbins ]
 
Dave Robbins
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok,
this

http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html

specifically says my expectations of how stuff works are wrong
my approach assumes bar.jar is just in the same directory, not that it's bundled in foo.bar


Dave
 
Dave Robbins
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh, there are so many way's to skin a cat
just unbundle bar.jar and build all the stuff in it into foo.jar

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic