We help IT Professionals succeed at work.

help me!(about Jbuilder4.0)

wh111
wh111 asked
on
i want to package an application and run it on another PC.

i use the wizards-->archive builder, but failed(no *.jar file was created).

am i right? why i am failed? please help me.
Comment
Watch Question

Commented:
Good Day WH111,

I currently use JBuilder 5 Personal that has the Archive Wizard disabled so I had to find another way to create jar files on the fly for applications/libraries I write. What I found to be excellent is the Jakarta Ant libarary. For your convenience I have included a build.bat file that executes the Ant program and a build.xml file that contains the steps Ant executes. What is nice about this solution is that you can implement this on your server and include them in your nightly build runs (the build.xml already facilitates this).

---------------------------BUILD.BAT-----------------------
d:\ant130\bin\ant.bat -buildfile "build.xml" -verbose -logfile "build.log"
pause
---------------------------BUILD.XML-----------------------
<?xml version="1.0"?>
<project name="Test2" default="mail" basedir=".">
  <property name="src" value="/src"/>
  <property name="build" value="/build"/>
  <property name="dist" value="/dist"/>
  <property name="doc" value="/doc"/>

  <!--Initialisation-->
  <target name="init">
    <tstamp/>
    <mkdir dir="build"/>
    <mkdir dir="doc"/>
  </target>

  <!--Compile-->
  <target name="compile" depends="init">
    <javac srcdir="src" destdir="build"/>
  </target>

  <!--Distribution-->
  <target name="dist" depends="compile">
    <mkdir dir="dist/lib"/>
    <jar jarfile="dist/lib/test-${DSTAMP}.jar" basedir="build"/>
  </target>

  <!--Documentation-->
  <target name="documentation" depends="dist">
    <javadoc sourcepath="d:/jbuilder/projects/Test2/src"
             sourcefiles="/src/test2/tt.java"
             destdir="doc"
             author="true"
             version="true"
             use="true"
             windowtitle="test2"
             doctitle="test"
             bottom="Copyright &#169; 2000 Dummy Corp. All Rights Reserved.">
      <group title="Test Packages" packages="test2.*"/>
    </javadoc>
  </target>

  <!--Clean Up-->
  <target name="cleanup" depends="documentation">
    <delete dir="build" />
  </target>

  <!--Mail Results-->
  <target name="mail" depends="cleanup">
    <mail from="marka@bramptonyork.com"
          tolist="java_mage@hotmail.com"
          subject="Results of nighlty build ${DSTAMP}"
          files="build.log"
          mailhost="s-dad"/>

  </target>
</project>
This question is LOCKED with a Proposed Answer.  If it helps you, great, accept it and grade it to close.  If not, reject it and comment as to why or what else is needed.

Few additional experts will join this collaboration effort, once a question has been locked.  Just want to confirm this to you.  If more than one expert helps you, you can always split points or award additional help in a new question, within the same topic area.  If you need help from us, post a zero point question here, and include the link:

EXPERT INPUT ON OUTCOME ALWAYS WELCOME.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Moondancer
Community Support Moderator @ Experts Exchange

Explore More ContentExplore courses, solutions, and other research materials related to this topic.