• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat, Apache, ANT ENV Variable HELL

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I've been trying unsuccessfully now for 4+ hours to get to the point where i can run ant to compile a servlet. This is insanely confusing. Atleast for me. Yes this is the first attempt. I can't imagine it being anymore frustrating. Why wouldn't the creators of these packages include the setting of environment variables in their installations? It makes absolutely no sense to me. If somene can offer any kind of help i would greatly appreciate it!

when i run ant to i am getting the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: Files\Apache

From everything i've been reading this is an env variable problem. But i just can't imagine what?? Please help! and thanks so much in advance!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to get Tomcat to run by setting the single JAVA_HOME environment variable and possibly CATALINA_HOME - otherwise Tomcat ignores all CLASSPATH settings.
Looking in the ANT docs - Ant\docs\manual\index.html - the Installing Ant section, we find a discussion of what Ant likes to see for environment variables for windows and unix systems.
Can you get ant to respond with to a -version command?
Can you get Tomcat to run so you can see the installed documentation?
Which Java SDK are you working with?
Bill
 
Rich Williams
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi There! Thanks for replying.

this is the exact error:

java.lang.NoClassDefFoundError: Files\Apache

Tomcat and apache are running. I can run both the JSP and the Servlet examples and they work fine. I am running tomcat 5.025

I can't get a -version on ant. I get the same error.

Thanks for your help.

Oh yeah both those ENV variables are present

rw
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

java.lang.NoClassDefFoundError: Files\Apache


has me mystified - there should be a class name in there somewhere.
Exactly how are you executing ANT to get that error?
Why are you trying to run Apache and Tomcat? Tomcat does just fine as a plain HTML server.
Bill
 
Rich Williams
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William

Sorry i am not running both. Just tomcat. It appears as though the problem may still be with the ENV variables. The only thing i can think is the spaces in the directory structure are causing problems:

Tomcat is installed in:
C:\Program Files\Apache Software Foundation\Tomcat 5.0

the error shows:
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Apache

What env variable would this be. I am running XP Pro.. shouldn't be a problem but it appears to be. I have also tried the ~1 naming and still getting the error. I a going t re-install to root.. Frustrating.

Oh yeah running ant, ant -version and ant anything returns that same error.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this is an Ant question, I am going to move this thread to the Ant forum.

This forum is for Servlets questions.

Good Luck.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic