Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

compile ejb

 
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!
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can use javac.
 
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
 
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.
 
Saloon Keeper
Posts: 22265
151
Android Eclipse IDE Tomcat Server Redhat Java 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!
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic