aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Question Regarding Installation of .war file on Apache Tomcat Server 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Question Regarding Installation of .war file on Apache Tomcat Server 6.0 " Watch "Question Regarding Installation of .war file on Apache Tomcat Server 6.0 " New topic
Author

Question Regarding Installation of .war file on Apache Tomcat Server 6.0

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Hello:

I am reading and I came across this:

Additionally, you should ensure Ant's ant command, and the Java javac compiler command run from the command shell that your operating system provides.

Can anyone break this down for me more?

Thanks,
Michele

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9519
    
    2

Michele Smith wrote:Hello:

I am reading and I came across this:

Additionally, you should ensure Ant's ant command, and the Java javac compiler command run from the command shell that your operating system provides.

Can anyone break this down for me more?

Thanks,
Michele



It says that you should set the corresponding home directories for Java and Ant in the OS systems path!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Yes I get this, but regarding javac, I normally do not run things on the dos side. Can you help me to figure out how to do that?

Thanks,
Michele
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Help: If you've installed Apache Ant as described in the Installing Ant section, running Ant from the command-line is simple: just type ant. I did this and I received this:

'ant' is not recognized as an internal or external command, operable program or batch filed. I don't have Apache Tomcat completely figured yet and I have not tried to run the .war file. Is this a problem?

Thank you,
Michele
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
I typed this:

To check that you have the right version of Java installed, type the text in boldface below. You should see something similar to the information printed below. (It's important that you see the number 1.6 or 1.5 for the Java version number, but the rest is not critical.)
C:\Users\username>java -version
java version "1.6.0_27"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 1.6.0_27-b13, mixed mode, sharing)
Then type:
C:\Users\username>javac -version
javac 1.6.0_27

And got this:

on the second one, javac:

'javac" is not a recogniz
ed internal or external command, operable program or batch file.

Many Thanks, Michele
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

When you install Java on Windows, it copies java.exe to c:/windows/system32, that why the "jav -version" works. But javac.exe is not copied there, What you have to do is add the Java installation bin directory to your path. To do this, right-click on the My Computer icon (or the Computer or My Computer link in the Start menu), choose Properties, then Advanced System Settings, then Environment Variables. In the Environment Variables dialog, click New under the furst list box, then enter these values:

Variable name: JAVA_HOME
Variable value: c:\Program Files\Java\jdk1.6.0_27

The value above assumes the default installation directory, you should double check where the JDK is installed on your system and adjust the value accordingly.

Then look in the top variable list for PATH. If it exists, select it and click the Edit button and add ";%JAVA_HOME\bin" (without the quotes) to the end of the value. If it does not exist, click New and enter:

Variable name: PATH
Variable value: %JAVA_HOME%\bin

Now open a new command prompt and try "javac -version" again.

Once that is working, perform similar set to set ANT_HOME to the location where Ant is installed, and then add %ANT_HOME%\bin to the PATH.

JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question Regarding Installation of .war file on Apache Tomcat Server 6.0