R
R
random2014-09-22 21:20:03
tomcat
random, 2014-09-22 21:20:03

How to compile a servlet?

I want to compile a java file through tomcat, it doesn't work?
34a2c7d6e4e24a148ec6bf3ecccfc392.png84a68f02c5d34fe38c18e434a3847d65.png
Environment variables set: JAVA_HOME: C:\Program Files\Java\jdk1.8.0_20
PATH: C:\Program Files\Java\jdk1.8.0_20\bin
Javac command works.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pi314, 2014-09-22
@demon123

Remove the % sign before javac, and there will be happiness (if, of course, the other paths are correct).
If it is unclear why: the example is given for a unix-like system with some csh or tcsh shell. This can already be seen at least from the file delimiters (forward slash). And the % sign simply symbolizes that the javac command is being entered in response to a shell prompt, which it is. Under Windows, of course, you don’t need to write it :)

N
NightFantom, 2014-09-22
@NightFantom

1) Compile from under the environment.
2) If you want from the CS, then the javac command does not work for you. You even wrote about it in Russian.
3) In Tomcat, you only run the servlet, you don't compile it. Here you are using the Kota library to compile your class.

R
random, 2014-09-23
@demon123

eae28563918c457f86bb79ac18a5d18a.png
Still not working, what should I do?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question