Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to copy .class files efficiently to Tomcat?

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean, is there a way to create .class files directly from within Tomcat/webapps/MyContext-Application/WEB-INF/classes[or lib]/(here I have the .java files, and directiories, and packages etc.)
I want to compile them here. if possible, how??
ps: I have read sth. about Ant, and seems it can be used but, does Tomcat implicitly have the capability for this?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I want to compile them here. if possible, how??
With javac? But seriously... Tomcat doesn't care how you compile your files, either with commandline javac, or by using ANT. Tomcat doesn't "implicity have the capability", but then again, why would it? It's a servlet runner, not a build tool.

Check this out http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look in the tooldocs section of the docs directory of your SDK installation.
Find the options for javac - you will see that the -d directory sets the destination for compiled classes.
Everybody should get familiar with tooldocs.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic