ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "romalopes" <romalo...@click21.com.br>
Subject How to run a .jar created by ant
Date Mon, 13 Oct 2003 17:59:40 GMT
Friends,
    
  I´m new using ant, but I alread have a problem.

  I´m used to construct my package .jar in the eclipse, but I figure 
out to use de ant.  Using eclise it works without any problem.
  
  I have a class in a package: msx.MSX .  This class has that method 
main(...).
  
  Using the ant I can cread the MSX.jar, but when I run this jar the 
follow error appears:
  Exception in Thread "main" java.lang.NoclassDefFoundError: msx/MSX

  Another problem is how to use the classpath correctly.
      
	<target name="jarMSX" description="faz o jar do MSX">
		<jar destfile="${path.classpath}/MSX.jar">
			<fileset dir="${dir.bin}"/>
		    <fileset file="${xerces.home}/xerces.jar"/>
		    <fileset file="${path.classpath}/socket.jar"/>
		    <fileset file="CONFIGURACAO_MSX.xml"/>
		    <manifest >
			    <attribute name="Built-By" 
value="${user.name}"/>
		    	<attribute name="Main-class" value="msx.MSX"/>
		    	<attribute name="Class-Path" 
value="${path.classpath}\socket.jar ${xerces.home}/xerces.jar""/>
		    </manifest>
		</jar>
	</target>

 

   Thanks Anderson.


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


Mime
View raw message