Eu tenho uma aplicação em Swing rodando perfeitamente no eclipse mas se exportar para um jar não funciona o banco de dados
pelo que vi é necessario criar um build.xml(Ant) eu criei pelo eclipse com Export… Ant BuildFiles e cria um build.xml sózinho
agora quando compilo pra .jar minha aplicação pesa 20Mb
O Ant você não se cria, o que se cria é o build.xml (New -> File -> “build.xml”), que pode ser editado no próprio eclipse para atender às suas necessidades.
Marky.Vasconcelos
que eu saiba o eclipse já possui essa ferramenta mas eu vou ter que escrever tudo na mão??
sabe algum site??
do jeito que falei o eclipse crio assim o build.xml
<?xmlversion="1.0"encoding="UTF-8"standalone="no"?><!-- WARNING: Eclipse auto-generated file. Any modifications will be overwritten. To include a user specific buildfile here, simply create one in the same directory with the processing instruction <?eclipse.ant.import?> as the first entry and export the buildfile again. --><projectbasedir="."default="build"name="Sistema Genesis"><propertyenvironment="env"/><propertyname="ECLIPSE_HOME"value="../../eclipse"/><propertyname="debuglevel"value="source,lines,vars"/><propertyname="target"value="1.5"/><propertyname="source"value="1.5"/><pathid="Sistema Genesis.classpath"><pathelementlocation="bin"/><pathelementlocation="lib/ant-1.6.5.jar"/><pathelementlocation="lib/ant-antlr-1.6.5.jar"/><pathelementlocation="lib/ant-contrib.jar"/><pathelementlocation="lib/ant-junit-1.6.5.jar"/><pathelementlocation="lib/ant-launcher-1.6.5.jar"/><pathelementlocation="lib/antlr-2.7.6.jar"/><pathelementlocation="lib/ant-swing-1.6.5.jar"/><pathelementlocation="lib/asm.jar"/><pathelementlocation="lib/asm-attrs.jar"/><pathelementlocation="lib/aspectjrt.jar"/><pathelementlocation="lib/aspectjtools.jar"/><pathelementlocation="lib/c3p0-0.9.1.jar"/><pathelementlocation="lib/c3p0-0.9.1-pre6.jar"/><pathelementlocation="lib/cglib-2.1.3.jar"/><pathelementlocation="lib/checkstyle-all.jar"/><pathelementlocation="lib/cleanimports.jar"/><pathelementlocation="lib/commons-collections-2.1.1.jar"/><pathelementlocation="lib/commons-logging.jar"/><pathelementlocation="lib/commons-logging-1.0.4.jar"/><pathelementlocation="lib/concurrent-1.3.2.jar"/><pathelementlocation="lib/connector.jar"/><pathelementlocation="lib/dom4j-1.6.1.jar"/><pathelementlocation="lib/ehcache-1.2.3.jar"/><pathelementlocation="lib/ejb3-persistence.jar"/><pathelementlocation="lib/hibernate3.jar"/><pathelementlocation="lib/hibernate-annotations.jar"/><pathelementlocation="lib/hibernate-commons-annotations.jar"/><pathelementlocation="lib/hibernate-entitymanager.jar"/><pathelementlocation="lib/hibernate-validator.jar"/><pathelementlocation="lib/jaas.jar"/><pathelementlocation="lib/jacc-1_0-fr.jar"/><pathelementlocation="lib/javassist.jar"/><pathelementlocation="lib/jaxen-1.1-beta-7.jar"/><pathelementlocation="lib/jboss-archive-browsing.jar"/><pathelementlocation="lib/jboss-cache.jar"/><pathelementlocation="lib/jboss-common.jar"/><pathelementlocation="lib/jboss-common-jdbc-wrapper.jar"/><pathelementlocation="lib/jboss-jmx.jar"/><pathelementlocation="lib/jboss-system.jar"/><pathelementlocation="lib/jdbc2_0-stdext.jar"/><pathelementlocation="lib/jgroups-2.2.8.jar"/><pathelementlocation="lib/jta.jar"/><pathelementlocation="lib/jta-spec1_0_1.jar"/><pathelementlocation="lib/junit.jar"/><pathelementlocation="lib/junit-3.8.1.jar"/><pathelementlocation="lib/log4j-1.2.11.jar"/><pathelementlocation="lib/log4j-1.2.9.jar"/><pathelementlocation="lib/mysql-connector-java-5.0.5-bin.jar"/><pathelementlocation="lib/mysql-connector-java-5.0.5-bin-g.jar"/><pathelementlocation="lib/oscache-2.1.jar"/><pathelementlocation="lib/proxool-0.8.3.jar"/><pathelementlocation="lib/swarmcache-1.0rc2.jar"/><pathelementlocation="lib/swing-layout-1[1].0.1.jar"/><pathelementlocation="lib/syndiag2.jar"/><pathelementlocation="lib/versioncheck.jar"/><pathelementlocation="lib/xerces-2.6.2.jar"/><pathelementlocation="lib/xml-apis.jar"/></path><targetname="init"><mkdirdir="bin"/><copyincludeemptydirs="false"todir="bin"><filesetdir="src"excludes="**/*.launch, **/*.java"/></copy></target><targetname="clean"><deletedir="bin"/></target><targetdepends="clean"name="cleanall"/><targetdepends="build-subprojects,build-project"name="build"/><targetname="build-subprojects"/><targetdepends="init"name="build-project"><echomessage="${ant.project.name}: ${ant.file}"/><javacdebug="true"debuglevel="${debuglevel}"destdir="bin"source="${source}"target="${target}"><srcpath="src"/><classpathrefid="Sistema Genesis.classpath"/></javac></target><targetdescription="Build all projects which reference this project. Useful to propagate changes."name="build-refprojects"/><targetdescription="copy Eclipse compiler jars to ant lib directory"name="init-eclipse-compiler"><copytodir="${ant.library.dir}"><filesetdir="${ECLIPSE_HOME}/plugins"includes="org.eclipse.jdt.core_*.jar"/></copy><unzipdest="${ant.library.dir}"><patternsetincludes="jdtCompilerAdapter.jar"/><filesetdir="${ECLIPSE_HOME}/plugins"includes="org.eclipse.jdt.core_*.jar"/></unzip></target><targetdescription="compile project with Eclipse compiler"name="build-eclipse-compiler"><propertyname="build.compiler"value="org.eclipse.jdt.core.JDTCompilerAdapter"/><antcalltarget="build"/></target><targetname="Entrada (1)"><javaclassname="Entrada"failonerror="true"fork="yes"><classpathrefid="Sistema Genesis.classpath"/></java></target><targetname="GeraTabelas (2)"><javaclassname="Hibernate.GeraTabelas"failonerror="true"fork="yes"><classpathrefid="Sistema Genesis.classpath"/></java></target></project>
Marky.Vasconcelos
e um debug Ant file… nesse arquivo
Buildfile: D:\Java - Junior\workspace\Sistema Genesis\build.xml
build-subprojects:
init:
build-project:
[echo] Sistema Genesis: D:\Java - Junior\workspace\Sistema Genesis\build.xml
build:
BUILD SUCCESSFUL
Total time: 10 seconds
falta algo?
matheusmaraujo
Cara, estou com o mesmo problema! Você conseguiu solução para isso?