Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compile ejb  RSS feed

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can use javac.
 
le taylom
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tualha Khan
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for all of your recommendations,i will try my best!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!