ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dees, Ian (MED, Adecco)" <Ian.D...@med.ge.com>
Subject [Newbie] JAR Files not running?
Date Wed, 25 Jun 2003 16:35:57 GMT
Hello there,

Forgive me if I am completely naive and should not be posting this to
this mailing list.

I have a build.xml that is doing standard Java compiling and such. When
it's done compiling I have it create a jar file that is supposed to be
able to run from the command line. Below is a snippet of my build.xml
that makes a jar containing the server chunk of my code:

        <jar basedir="xxx/yyy/Server" compress="true"
jarfile="${dest}/hostsim.server.jar">
            <exclude name="**/*.form"/>
            <exclude name="**/*.java"/>
            <exclude name="apidoc"/>
            <manifest>
                <attribute name="Main-Class" value="KKMultiServer"/>
            </manifest>
        </jar>

When I try to execute the code with

java -jar hostsim.server.jar

I get an exception and stack trace similar to the following (since I
can't copy/paste out of the Win2k command prompt I'm paraphrasing):

Exception in thread "main" java.lang.NoClassDefFoundError: KKMultiServer
(wrong name: xxx/yyy/Server/KKMultiServer)
	at java.lang.ClassLoader............ [snip]

Any ideas? Again, sorry if I'm posting this off-topic and please
disregard the post if I am.

-Ian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message