07 November 2005 - java_dev (original) (raw)

Java developers

November 7th, 2005

10:09 am - localstorm - Jar-caching Good day, dear friends, Java developers!I'm a new born java_dev member, so I have one question to you. I have a problem: My program consists of a number of JARs ~ 3000 classes, and JVM loads them "a bit slowly", it takes my P4 about 6-7 seconds to start. Do you know any solutions that allows to cache JAR's or may be loaded classes? This is a standalone application.
07:21 pm - shmuelisms - JUnit testing and test permutations. I hope this question doesn't sound too confused...I have a single Engine class, that according to it's creation parameters (two flags), creates four different work environments. This Engine works with two different Adapter classes. It is these Adapters that I want to test. Each Adapter Class has its' own AdapterTest TestCase class set of tests. The thing is, that I want to perform each set of test four times, using an Adapter "hitched" to each of the different Engine configurations.Initially I thought to extend the two basic AdapterTest classes, leaving the derived classes to create the Engine instance to run the tests with, and then run those extended classes, but that gives me [at least] ten classes and duplicate code and seems rather clunky. Is there any way to refactor the Engine creation or whatever, in order to achieve a more elegant solution, or a perhaps completely different solution to this repeat-test issue?And ideas or pointers, folks?
10:26 pm - 0olong - Swing problems Hello everyone, just joined this community, been programming Java for a long time now but only sporadically. Most of my applets can be found here, if anyone's interested.Anyway, I have a question. I've been working on updating my most successful applet, Resonata, to use Swing. I figured, seeing as the old AWT became officially deprecated - what - five years ago now, or something like that? - that it might be about time. I can't help but wonder if I'm wasting my time in a big way, though; I was never convinced of the advantages of so-called 'lightweight' components (I always felt they got that lightweight/heavyweight thing backwards), and it's proving to be a lot of hassle to make everything use the newer techniques.My actual question though (and I hope you will forgive me if it's a stupid one) is that the Heck could be going wrong with my Swingified version of Resonata? The controls all work, which is nice, only they're largely invisible and I have no idea why. It looks as if something is getting constantly drawn on top of them, for some reason, but I can't see anything in my code that could explain it. Do I need to do something to JPanel, which I wouldn't have needed to do with a Panel, to say 'don't randomly paint the background colour over the top of your contents'? If I run the applet in appletviewer and then resize it so that the controls are outside of their original box, they become visible. Ring any bells with anyone?