hello i am now studying j2eetutorial from sun,in this book,it always compile the ejb by the ant tool,i don't know why,is it necessary?because i feel difficult to write the "build.xml" file. question 1:can i use "javac" to compile the ejb,i think it's possible. question 2:how can i master the "build.xml",where can i get the tutorial that help me to learn it? THANK YOU IN ADVANCE!
Y don't you take a look at the ant site, download ant from there and then read the docs to see some examples of how the build.xml is set up? It is very intuitive once you have done your first few. Start off with some simple builds first. You can use javac to compile your ejb source files. Then use something like the ejb compiler (the ant docs show you how to do this) to get your ejb's ready for deployment. T http://jakarta.apache.org/ant/index.html
I never used the ant build tool, just plain javac works for me. Make sure you compile the remote interface first, then set the classpath to the current directory by typing: set classpath=%classpath%;. (do not forget the '.' in the end) on the command prompt. Then you compile your home interface and your Bean class.
Do yourself a favor. Learn Ant - it's not hard. All javac does is the compile part. Ant will run javac plus maintain your project directory structure, build jar, war, and ear files, and a lot more. Ant projects are not OS-dependent like makefiles, the language isn't cryptic like Unix shell scripts nor brain-dead like Windows/DOS batchfiles.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 14, 2002
thanks for all of your recommendations,i will try my best!