Reputation: 31
I am using Apache tomcat. I am running Tomcat through cmd.exe. I have been able to deploy a "Hello World" webapp with no problems. However, I have tried to run the servlet 'HelloServlet.java' by typing: "C:\apache-tomcat-8.0.0-RC3\webapps\hello\WEB-INF\java -d classes src\mypkg\HelloServlet.java" Or "C:\apache-tomcat-8.0.0-RC3\webapps\hello\WEB-INF\classes java HelloServlet.java"
but I always get the error "Unrecognized option: -d Error: Could not create the Java Virtual Machine Error: A fatal exception has occurred. Program will exit"
If I try: "C:\apache-tomcat-8.0.0-RC3\webapps\hello\WEB-INF\javac -d classes src\mypkg\HelloServlet.java"
then I get the message " 'javac' is not recognized as an internal or external command, operable program or batch file "
Upvotes: 0
Views: 3289
Reputation: 68715
There are multiple problems in your approach:
Upvotes: 4