How do I fix a java.lang.NoClassDefFoundError
807598Jan 17 2006 — edited Jan 17 2006I've already posted this question in the Sockets forum, but as I am new to Java and the API compiled correctly, I thought I'd post it again here. I apologise for the duplicate post!
I need a hand soritng out a NoClassDefFoundError in the Rocksaw library distribution.
I have managed to compile rocksaw, vserv and the test application Ping using the apache ant build tool. I am now having problems setting my classpath to run the Ping class file.
The files are as follows...
build.src/java/org/savarese/rocksaw/net/RawSocket.class
build.src/java/org/savarese/vserv/tcpip/ICMPEchoPacket.class
build.src/java/org/savarese/vserv/tcpip/ICMPPacket.class
build.src/java/org/savarese/vserv/tcpip/IPPacket.class
build.src/java/org/savarese/vserv/tcpip/OctetConverter.class
build.src/java/org/savarese/vserv/tcpip/TCPPacket.class
build.src/java/org/savarese/vserv/tcpip/UDPPacket.class
build.src/example/Ping.class
when I try to run Ping I do the following...
java build.src.example.Ping <ip address>
and I get the following error...
Exception in thread "main" java.lang.NoClassDefFoundError: build/src/example/Ping
my system $CLASSPATH is ...
/home/ttt/rocksaw-0.4.4/lib where the relevant RockSaw libraries are
i.e.
librocksaw.so
rocksaw-0.4.4.jar
vserv-tcpip-0.9.0.jar
What am I doing wrong?
Any suggestion would be great.
Thanks