×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sun Learning Connection and Ant

Sun Learning Connection and Ant

Sun Learning Connection and Ant

(OP)
I am working in Sun's Learning connections course:
Module 1: EJB Component Model | Lab 2: Testing the Application

It requires me to use Ant to compile and deploy the EJB.

I am using their supplied code and the build.xml does not work right.  (Just for the record they say it is not their problem)

now I can compile the programs when I say javac *.java I get no compile errors but when I use the build.xml I get lots of errors. I have contact the learning connection and Junit but they say that this is not their problem.

Any help would be appriciated

build.xml code is as follows:

C:\Documents and Settings\Ken\develop\bankproject>asant compile
Buildfile: build.xml

prepare:

compile:
    [javac] Compiling 3 source files to C:\Documents and Settings\Ken\develop\ba
nkproject\build
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgr.j
ava:7: cannot find symbol
    [javac] symbol  : class CustomerData
    [javac] location: interface bank.BankMgr
    [javac]   public CustomerData getCustomerData (int id)
    [javac]          ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgr.j
ava:8: cannot find symbol
    [javac] symbol  : class BankException
    [javac] location: interface bank.BankMgr
    [javac]     throws BankException, RemoteException;
    [javac]            ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:9: package junit.framework does not exist
    [javac] import junit.framework.*;
    [javac] ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:11: cannot find symbol
    [javac] symbol: class TestCase
    [javac] public class BankMgrTest extends TestCase {
    [javac]                                  ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:15: cannot find symbol
    [javac] symbol  : class Test
    [javac] location: class bank.BankMgrTest
    [javac]   public static Test suite() {
    [javac]                 ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:16: cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class bank.BankMgrTest
    [javac]     return new TestSuite(BankMgrTest.class);
    [javac]                ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:20: package junit.textui does not exist
    [javac]     junit.textui.TestRunner.run(suite());
    [javac]                 ^
    [javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:38: cannot find symbol
    [javac] symbol  : class CustomerData
    [javac] location: class bank.BankMgrTest
    [javac]     CustomerData data = bankMgr.getCustomerData(1);
    [javac]     ^
    [javac] Note: C:\Documents and Settings\Ken\develop\bankproject\src\bank\Ban
kMgrTest.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 8 errors

BUILD FAILED
C:\Documents and Settings\Ken\develop\bankproject\build.xml:10: Compile failed;
see the compiler error output for details.

Total time: 5 seconds

C:\Documents and Settings\Ken\develop\bankproject>type build.xml
<project name="bankproject" default="compile" basedir=".">
  <property name="src.dir"       value="${basedir}/src"/>
  <property name="build.dir"     value="${basedir}/build"/>

  <target name="prepare">
    <mkdir dir="${build.dir}"/>
  </target>

  <target name="compile" depends="prepare">
    <javac destdir="${build.dir}">
      <src path="${src.dir}"/>
    </javac>
  </target>

  <target name="test" depends="compile">
    <junit printsummary="yes" haltonfailure="yes">
      <classpath>
        <pathelement location="${build.dir}"/>
        <pathelement path="${java.class.path}"/>
      </classpath>
      <test name="bank.BankMgrTest"/>
    </junit>
  </target>

  <target name="clean">
    <delete dir="${build.dir}" />
  </target>
</project>

ANy and all help would be appricated thank you again

Ken

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close