• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Problem with Java 5 Update 1

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've updated my Windows XP system to Java 5 Update 1 (build 1.5.0_01-b08). When I try to start Tomcat 5.5.7, I get the following error message:

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

This is due to the Tomcat bug 32081 (http://issues.apache.org/bugzilla/show_bug.cgi?id=32081). The error will disappear, when you delete 2 lines from setclasspath.bat as indicated.

Now my questions: My JDK installation (see above) has no javac.exe and jdb.exe in JAVA_HOME\bin (JAVA_HOME points to the root of the JDK (not JRE!)). Is this Ok for Suns JDK 5.0 Update 1? When has it changed? Why?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 5.5x ships with it's own compiler (Eclipse's compiler) so the full JDK is no longer needed.
Unfortunately, the scripts for starting Tomcat didn't get updated right away.

I re-wrote the Unix shell scripts to look for a JRE_HOME and then, if not found, to use JAVA_HOME. From what I understand the writers of the Windows installer, have done the same for people starting Tomcat from the Windows Services Console or from the Start Menu buttons.

As of yet, nobody has re-written the batch scripts to work this way.
As the last message in the bug report that you quoted says, doing so is a low priority since it is assumed that people starting Tomcat from the batch scripts are most likely programmers who will have a full JDK on their system.

If you're developing a Servlet/JSP app, download and install JDK1.5. (now called JDK5.0) Then set your JAVA_HOME evironment variable to point to it.

If you don't want a full JDK on your production box but need to be able to compile JSPs on the fly, use the windows installer and run Tomcat as a service.

Double check and make sure that you've downloaded the full JDK and not the JRE.
Sun's great about moving and renaming their links to make it as confusing as possible for people to get the right one.
[ February 12, 2005: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Now my questions: My JDK installation (see above) has no javac.exe and jdb.exe in JAVA_HOME\bin (JAVA_HOME points to the root of the JDK (not JRE!))



I just downloaded jdk5.0 and installed it on a windows box and javac.exe and jdb.exe are in the bin directory.
 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I have JDK 1.5.0_01 installed and Tomcat 5.5.7, they are there as expected. Could he have downloaded the JRE and mistaken it for the JDK?
 
Thomas Weitzel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your replies.

I had indeed installed the JDK 5.0 Update 1, but during the installation I decided to install the JRE into the SAME direktory. Big mistake, because some JDK files got deleted from the JAVA_HOME/bin directory.

Reinstalled the JDK now with DIFFERENT directories for JDK and JRE and everything is fine.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great. Glad you've got it working.

Thanks for reporting back with what the problem was.

-Ben
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!