Tomcat 5.5+ On a Mac, Under Eclipse, Under OS X

  • Thread starter Edward V. Berard
  • Start date
E

Edward V. Berard

People,

I am having problems developing Java applications on a Mac using
Eclipse, MyEclipse, and Tomcat 5.5+.

My current configuration:

Mac OS X (10.4.5)
Eclipse (3.1+)
MyEclipse (4.0+)
Tomcat (5.5+)

I have several issues:

1. How do I get Eclipse to use Java 1.5 by default? I have fiddled with
the preferences, but I must be missing something.

I have downloaded and installed Java 1.5, which does not replace
Java 1.4+

2. When I attempt to use Tomcat 5.5+, I get a message saying that
Tomcat 5.5 requires Java 1.5. How do I get Tomcat and Java 1.5
together.

I have done a fair amount of Java development using the same configuration
under MS Windows XP, Service Pack 2, but I am having a hard time
getting started on the Mac.

Thank you for any time and consideration.

-- Ed
 
S

Stephan

Edward said:
People,

I am having problems developing Java applications on a Mac using
Eclipse, MyEclipse, and Tomcat 5.5+.

My current configuration:

Mac OS X (10.4.5)
Eclipse (3.1+)
MyEclipse (4.0+)
Tomcat (5.5+)

I have several issues:

1. How do I get Eclipse to use Java 1.5 by default? I have fiddled with
the preferences, but I must be missing something.

I have downloaded and installed Java 1.5, which does not replace
Java 1.4+

2. When I attempt to use Tomcat 5.5+, I get a message saying that
Tomcat 5.5 requires Java 1.5. How do I get Tomcat and Java 1.5
together.

I have done a fair amount of Java development using the same configuration
under MS Windows XP, Service Pack 2, but I am having a hard time
getting started on the Mac.

Thank you for any time and consideration.

-- Ed

Hi Ed,
on the Apple Developer Connection page you can download the latest J2SE
5.0 Release (4 DP7). This version sets jdk 5 as default java version.
Please read the release notes to this version as this build should "not
be installed on a system with critical data" due to small amount of
testing done.

Best regards, Stephan
 
J

John B. Matthews

Edward V. Berard said:
People,

I am having problems developing Java applications on a Mac using
Eclipse, MyEclipse, and Tomcat 5.5+.

My current configuration:

Mac OS X (10.4.5)
Eclipse (3.1+)
MyEclipse (4.0+)
Tomcat (5.5+)

I just started using Eclipse 3.1 on Mac OS X 10.4.5.
I have several issues:

1. How do I get Eclipse to use Java 1.5 by default? I have fiddled with
the preferences, but I must be missing something.

I have downloaded and installed Java 1.5, which does not replace
Java 1.4+

Indeed, when I installed j2se50release4dp7, CurrentJDK still pointed to
1.4.2. I'f there's a GUI to change it, i couldn't find it:) Have a look
in

/System/Library/Frameworks/JavaVM.framework/Versions/

I had to link CurrentJDK to 1.5.0:

sudo rm CurrentJDK
sudo ln -s 1.5.0 CurrentJDK

With this setting, you should be able to use
JAVA_HOME=/Library/Java/Home or similar depending on your shell.

John
 
E

Edward V. Berard

Indeed, when I installed j2se50release4dp7, CurrentJDK still pointed to
1.4.2. I'f there's a GUI to change it, i couldn't find it:) Have a look
in

/System/Library/Frameworks/JavaVM.framework/Versions/

I had to link CurrentJDK to 1.5.0:

sudo rm CurrentJDK
sudo ln -s 1.5.0 CurrentJDK

With this setting, you should be able to use
JAVA_HOME=/Library/Java/Home or similar depending on your shell.

John


John,

Many thanks for the information.

I was able to link CurrentJDK to 1.5.0, but I am still having trouble
with Apache Tomcat 5.5+

Please permit me a few follow-on questions:

-> Where does one obtain j2se50release4dp7 ?

I went to the Apple Developers' web site, and saw a number of pages
dedicated to Java. However, the latest version that I found was
j2se50release3. I suspect that j2se50release4dp7 is only available
to "registered developers." (A Google search also turned up nothing
beyond "release 3".)

-> The specific error message that I get when I attempt to start up
Tomcat 5.5 (from within Eclipse/MyEclipse) is:

"This release of Apache Tomcat was packaged to run on J2SE 5.0
or later. It can be run on earlier JVMs by downloading and
installing a compatibility package from the Apache Tomcat binary
download page."

Your advice is to "use JAVA_HOME=/Library/Java/Home or similar
depending on your shell."

Which particular references to JAVA_HOME should I be modifying
or creating? I did a little browsing, and found quite a few
references

I very much appreciate your time and effort.

-- Ed
 
J

John B. Matthews

Edward V. Berard said:
John,

Many thanks for the information.

I was able to link CurrentJDK to 1.5.0, but I am still having trouble
with Apache Tomcat 5.5+

Please permit me a few follow-on questions:

-> Where does one obtain j2se50release4dp7 ?

I went to the Apple Developers' web site, and saw a number of pages
dedicated to Java. However, the latest version that I found was
j2se50release3. I suspect that j2se50release4dp7 is only available
to "registered developers." (A Google search also turned up nothing
beyond "release 3".)

I don't recall logging in, but it works with release 1, too.
-> The specific error message that I get when I attempt to start up
Tomcat 5.5 (from within Eclipse/MyEclipse) is:

"This release of Apache Tomcat was packaged to run on J2SE 5.0
or later. It can be run on earlier JVMs by downloading and
installing a compatibility package from the Apache Tomcat binary
download page."

Your advice is to "use JAVA_HOME=/Library/Java/Home or similar
depending on your shell."

Using bash with Tomcat 5.5.16, and looking at RUNNING.txt:

$ export JAVA_HOME=/Library/Java/Home
$ echo $JAVA_HOME
/Library/Java/Home
$ /Users/<user>/Desktop/apache-tomcat-5.5.16/bin/startup.sh
Using CATALINA_BASE: /Users/<user>/Desktop/apache-tomcat-5.5.16
Using CATALINA_HOME: /Users/<user>/Desktop/apache-tomcat-5.5.16
Using CATALINA_TMPDIR: /Users/<user>/Desktop/apache-tomcat-5.5.16/temp
Using JRE_HOME: /Library/Java/Home
$ curl -s localhost:8080 | grep success
<p id="congrats">If you're seeing this page via a web browser, it means
you've setup Tomcat successfully. Congratulations!</p>

Using the full pathname to the startup script may be crucial.

HTH,

John

[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top