tight spot

I'm new to java so bear with me ...

I got put on a project at work basically reviving an old java project (started by some college interns 2 years ago). The project started in 2k2 and these kids used every new java technology they could get their hands on and I can't say I blame them. Of course when I got all the code it didn't compile. They had a nice windows installer (gah!!) but the sources won't compile on a jdk1.5 (5.0?) Linux install. I've worked out every error except one revolving around the net.java.plaf package. It looks as though they're trying to load a custom look and feel by making calls to net.java.plaf.LookAndFeelPatchManager.initialize();

and

UIManager.setLookAndFeel(new MyLookAndFeel());

there's also a MyLookAndFeel.jad file in the base directory (never seen a .jad file, maybe .jar is what they ment? something else I've gotta work out)

the error i'm getting is as follows:

package net.java.plaf does not exist

net.java.plaf.LookAndFeelPatchManager.initialize();

^

package does not exist makes me think it's a classpath issue in that it just can't find the package ... but I can't find the package either (more like I don't know where to start looking ... ) so I don't know where to point the classpath to :-(

Any help would be most appreciated.

Thanks in advance,

-flip

[1397 byte] By [flip_tricklea] at [2007-10-1 1:31:46]
# 1

Maybe you're missing a Jar file. Take the L&F stuff out and try it then. The lack of that L&F probably won't hurt the app itself. At least, in theory. Just comment out the initialize() line and the setLookAndFeel() line for now.

A .jad file is a decompiled Java class file... it's a .java file, just with a different extension.

bsampieria at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 2

I thought of removing the Look and feel stuff, compiles but throws an error in the main thread:

java.lang.NoClassDefFoundError (that doesn't sound good)

in reference to the main class, i wrapped everything in the main class in try/catch but it didn't seem to catch the exception (very new to exceptions in java)

I doubt that exception is related to my removing the L&F stuff, probably means that I'm gona have to track down that exception hu?

Thanks for the quick response, another one would be great :-D

-flip

flip_tricklea at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 3

There is no (or should be no) main class. The class that you are compiling should have a main() method that looks like

public static void main(String[] args)

{

//do some stuff here

}

martinestradaa at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 4
.......unless some other class is calling this one. In which case whatever class you are running, to kick the whole thing off, should have the main() method.
martinestradaa at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 5
check your class path, I guess... make sure everything is compiled... dunno
bsampieria at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 6
go to https://winlaf.dev.java.net/ and download the version 5.0 jar which contains the classes you are looking for. You can also find documentation there about the software. Good luck.
MexicoClivea at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 7

> A .jad file is a decompiled Java class file... it's a

> .java file, just with a different extension.

In this context, it is very likely that bsampieri is correct (1), however .jad is also used in J2ME, and stands for Java Application Descriptor.

(1) http://kpdus.tripod.com/jad.html

mlka at 2007-7-8 1:52:27 > top of Java-index,Security,Event Handling...
# 8

> > A .jad file is a decompiled Java class file... it's

> a

> > .java file, just with a different extension.

>

> In this context, it is very likely that bsampieri is

> correct (1), however .jad is also used in J2ME, and

> stands for Java Application Descriptor.

Same-same. JADs are used to describe the classes and archives they refer to. In the case of class files, they are described using their code, so are in effect java source files. I think...

javajugsa at 2007-7-8 1:52:28 > top of Java-index,Security,Event Handling...
# 9

> Same-same. JADs are used to describe the classes and

> archives they refer to. In the case of class files,

> they are described using their code, so are in effect

> java source files. I think...

No they are not. Jad files (J2ME) are like external Manifest files. The tell the phone about the application suite (app names, author, icon, size (so the user can choose not to download it if it is too big, J2ME Version required etc).

JAD file (J2SE) are decompiled .class files.

Examples:

J2ME Jad

MIDlet-1: TilePuzzle, /icons/TilePuzzle.png, example.tilepuzzle.TilePuzzle

MIDlet-2: WormGame, /icons/App.png, example.wormgame.WormMain

MIDlet-3: PushPuzzle, /icons/PushPuzzle.png, example.pushpuzzle.PushPuzzle

MIDlet-Description: Sample suite of games for the MIDP.

MIDlet-Jar-Size: 45357

MIDlet-Jar-URL: http://example.com/games.jar

MIDlet-Name: SunSamples - Games

MIDlet-Vendor: Sun Microsystems, Inc.

MIDlet-Version: 2.0

Manifest-Version: 1.0

MicroEdition-Configuration: CLDC-1.0

MicroEdition-Profile: MIDP-2.0

JAD (J2SE)

public class HelloWorld {

public static void main( String[] a ){

String b = "Hello World";

System.out.println( b );

}

}

mlka at 2007-7-8 1:52:28 > top of Java-index,Security,Event Handling...
# 10

> No they are not. Jad files (J2ME) are like external

> Manifest files. The tell the phone about the

> application suite (app names, author, icon, size (so

> the user can choose not to download it if it is too

> big, J2ME Version required etc).

> JAD file (J2SE) are decompiled .class files.

Why are they called the same thing then, if they do not share some abstract concept? I am not saying they are the same, just that they are 'about' similar stuff at a higher level.

javajugsa at 2007-7-8 1:52:28 > top of Java-index,Security,Event Handling...
# 11

> Why are they called the same thing then, if they do

Many things have the same extension. After all you only have three letters to work with. They are also by different people, J2ME JAD is Sun, JAD is from an application called JAD. See link above.

Blame DOS for putting meta data in the file name, it is fucking stupid, who (other than MS) would do such a thing, Unix? Nope, has magic number, MacOS, nope, BeOS, nope... *SLAP*, sorry got carried away then.

> just that they are 'about' similar stuff at a higher level.

Nope, not at all, look at the examples above. J2ME JAD is an description of the application, the other is decompiled .class file.

mlka at 2007-7-8 1:52:28 > top of Java-index,Security,Event Handling...