Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Forte works!

Forte works!
Thread Tools
Mac Enthusiast
Join Date: Sep 2000
Status: Offline
Reply With Quote
Mar 25, 2001, 09:13 PM
 
Hey all,

I'm sick tonight so I decided to play with some dev stuff in OS X. So I started out trying to take a first step in installling JBuilder, stuck in the install discs, but I didn't wanna bother figuring it out. So I took a look at Forte from Sun instead. Turns out it works pretty much perfectly! I only get one error, a Java class not found error or something like that (I can't remember which one either).

Go to Sun's Forte website, click on download, then Forte for Java. Click on the Community edition (it's free) and then login (or register) and accept the legal stuff. (You may run into a problem here because of DNS stuff. I ran into this problem at work, but not here at home, so I don't why exactly (probably something to do with having to be in North America.)) Once you get to the download page, download the install PDF, and then download the Forte for Java for Solaris Platforms. It's really for Solaris or other Unix platforms, which is why it works in OS X. You'll download a .sh file which you can run from terminal.app.

Once you've downloaded it, open up terminal, go to that folder, and run the .sh file. You'll probably have to explicitly enter the path by typing './forte_ce_2.sh' (without the '', and you may have to set the execute bit), depending on if you've added that to your path already. Once you run that, it'll start the install! Pretty simple stuff. I did run into a problem with browsing for an install directory, the java app just disappeared. You'll have to restart it. Just type in a path instead and it'll work fine.

Once installed, you'll have to run the runide.sh file in the bin dir. As I said, I get an exception while starting the IDE, some missing Debug class. But so far, I've created a new class and successfully compiled it with no problems.

Have fun!

Next step: how to install Tomcat... If anyone's done this already, I'd appreciate a walk-through!

     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Mar 26, 2001, 04:35 PM
 
At the risk of sounding too simple, installation of Tomcat consists of downloading the zip, unzipping it, and executing ${TOMCAT_HOME}/bin/startup.sh.

Integration with Apache is another issue, however.
     
Forum Regular
Join Date: Jul 2000
Location: Jersey City, NJ 07304
Status: Offline
Reply With Quote
Mar 27, 2001, 05:12 PM
 
How to install Tomcat 4.0b1 on Mac OS X final:
first draft. corrections welcome.
miles poindexter miles@openly.com
27 March 2001

NOTE: I put double or single quotes around a lot of the commands to type. Don't actually type the quotes, just the txt inside them.

1. download the binary from http://www.apache.org/. I recommend the tar.gz version. In the jakart-apache ftp list, the file is: jakarta-tomcat-4.0-b1.tar.gz

2. launch your terminal and change directory to where you want to install this file. I installed it into my /Applications folder. but I don't think it matters.

3. In this directory, type:
"tar xvfz /full/path/to/downloaded/file/jakarta-tomcat-4.0-b1.tar.gz" Replace "/full/path/to/downloaded/file/" with the absolute path to your downloaded file! Then type "ls" to see if the installed Tomcat app is there. It should be a folder called: "jakarta-tomcat-4.0-b1"

4. before launching, we need to add some stuff to your csh.cshrc file.

5. First you must be able to log in as ROOT. Type "su" and give your password that you chose when you installed OS X. If it says 'sorry' we need some more steps. (see 6)

6. Do this if you can't log in as ROOT:
A. In the finder, go to Applications/Utilities and launch, "NetInfo Manager"
B. Under the "Domain" menu, there is a submenu called, "Security", select the item there called, "Authenticate..."
C. type your password that you chose when you installed OS X
D. Go to the security menu again and now select "Enable Root User"
E. Type the same password. After this, you will be able to "su" and use the password you specified.

7. OK, now go back to your terminal window. You should now be able to "change user" to root. Type "su" then your password.

8. change directory into your tomcat home directory. The easy way for me is:
"cd /Applications/*1b" since I don't have any other folder ending with "1b"

9. As a root user, type: "pico /etc/csh.cshrc" Use your down arrow key to scroll past this line: 'source /usr/share/init/tcsh/rc' and type this in:

setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework
setenv TOMCAT_HOME /Applications/jakarta-tomcat-4.0-b1

10. Replace "/Applications/" with the actual path to your Tomcat folder. Now hold down the control key, and hit the x key. Type 'y' to indicate you want to save the changes, and then hit enter. You should be out of pico now and back at the command line.
For this to take effect, you need to log out and back in. Go to your finder and choose log out. Then log in again, launch the terminal app, etc.


11. Now, Tomcat is used to unix systems that store their java tools in a folder called "bin". But OS X stores them in "Commands". So we have to make a symbolic link so Tomcat sees the contents of Commands when it looks in bin. Make sure you're ROOT, and type: "cd /System/Library/Frameworks/JavaVM.framework". Type "ls" to look around. You should see a folder called "Commands" among other things. Type: "ln -s Commands bin" and that should do it.

12. Now we can start Tomcat. type: "cd /Applications/*b1" or whatever to get you to Tomcat's home directory. Then we don't want to be ROOT anymore. So type: "su yourUserName". (where "yourUserName" is your normal login name) and you should be back to your regular harmless user self.

13. To start Tomcat type: "/bin/startup.sh" It starts fairly quickly. To see if its working. Go to your browser and type in this address: http://127.0.0.1:8080. You should see the friendly tomcat icon and a welcome msg. To stop tomcat, make sure you're in the Tomcat home directory, and type: "/bin/shutdown.sh"

14. Using Tomcat:
A. To run your servlets, compile them into .class files and put them here:
/Applications/jakarta-tomcat-4.0-b1/webapps/ROOT/WEB-INF/classes
If the classes folder isn't there you can make one. (type: mkdir classes) To see your servlet in action, go to your browser and put the address: http://127.0.0.1:8080/servlet/YourServlet. If your servlet is called YourServlet.class.
B. If you are using jars for your support files, you can put them here:
/Applications/jakarta-tomcat-4.0-b1/lib
and Tomcat will automatically add their contents to its classpath.
C. If your java classes need to read properties files, you can place them in Tomcat's home directory: /Applications/jakarta-tomcat-4.0-b1

- miles
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Mar 28, 2001, 12:13 AM
 
Miles! You rule! I am *so* impressed.

Here's my take on the same instructions, since some things are a bit more confusing than I think they need to be, and some other things are wrong (like trying to start and stop the Jakarta-Tomcat by using a command in /bin (instead of bin; those typos matter).

== Get the software

1. Download the binary from:
http://jakarta.apache.org/builds/jak...-4.0-b1.tar.gz

2. Move this file to wherever you want it to be installed. I placed it into /Applications.

3. Then drag-and-drop it onto Applications / Utilities / Stuffit Expander (Carbon) to expand the file.

== Prepare your environment

4. Open Applications / Terminal. At the shell prompt type "pico ~/.login" and enter the following lines of text:

setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework
setenv TOMCAT_HOME /Applications/jakarta-tomcat-4.0-b1

Replace "/Applications/" with the actual path to your Tomcat folder. Now hold down the control key, and hit the x key. Type 'y' to indicate you want to save the changes, and then hit enter. You should be out of pico now and back at the command line. Type "source ~/.login" for the changes to take effect.

== Enable the root user (the superuser)

5. Determine whether you've enabled root on your box. Open the Terminal application and type "su". When asked, give the password you used when installing Mac OS X. If it says "sorry" and you're sure you typed in the password then you have to enable root by

a. Launch Applications / Utilities / NetInfo Manager (in the Finder)
b. Pick menu item Domain / Security / Authenticate...
c. When asked, give the password you used when installing Mac OS X.
d. Pick menu item Domain / Security / Enable Root User
e. When asked, give the password you used when installing Mac OS X.

6. Now type "su" to become the root user (the superuser).

== Prepare the Jakarta-Tomcat environment

7. Other UNIXes store their Java tools in a directory called bin (for binaries); Mac OS X stores them in "Commands". Make a symbolic link to have Tomcat see the contents of Commands when it looks in bin by typing:

cd /System/Library/Frameworks/JavaVM.framework
ln -s Commands bin

8. Type "exit" to leave the superuser subshell you created when you typed "su".

== Start Jakarta-Tomcat

9. Change directory to the jakarta-tomcat directory by typing

cd /Applications/jakarta-tomcat-4.0-b1

10. Start Jakarta-Tomcat by typing "bin/startup.sh". To see if it's working steer your web browser to "http://localhost:8080"; you should see the friendly tomcat icon and a welcome message. If you don't, then type "cat logs/catalina.out" to check for errors which happened during startup. (To stop Jakarta-Tomcat type: "bin/shutdown.sh" in the same directory.)

== Using Jakarta-Tomcat

11. To run your servlets compile them into .class files and put them into the /Applications/jakarta-tomcat-4.0-b1/webapps/ROOT/WEB-INF/classes directory. (If the classes folder isn't there you can make one by typing "mkdir classes".) To see your servlet in action point your browser to the URL "http://localhost:8080/servlet/YourServlet", YourServlet being the example for a servlet YourServlet.java, which compiled into YourServlet.class.

If you are using JARs for your support files put them into the /Applications/jakarta-tomcat-4.0-b1/lib directory and Tomcat will automatically add their contents to its classpath.

If your java classes need to read properties files put them into the /Applications/jakarta-tomcat-4.0-b1 directory, Tomcat's home.


Enjoy!
Since EBCDIC
Using Macs since they were Lisas.
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Mar 28, 2001, 01:35 AM
 
I thought I'd figured out how to have the Tomcat engine start automatically when OS X starts up, but I think I zigged when I should have zagged.

And since Apple has moved things around, I can't find the output log to see what happend during boot-up.

Sigh.

[This message has been edited by Since EBCDIC (edited 03-28-2001).]
Since EBCDIC
Using Macs since they were Lisas.
     
Forum Regular
Join Date: Jul 2000
Location: Jersey City, NJ 07304
Status: Offline
Reply With Quote
Mar 28, 2001, 10:00 AM
 
Great additions! While using OS X beta, I read in a few places to use gnutar instead of Stuffit Expander since the latter messed some files up. But this is probably fixed in the newer version.
I'm going to submit your update to www.jspformacs.com if you're OK with that
- miles
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Mar 28, 2001, 10:54 AM
 
I have no problem with that at all, but thank you very much for asking. And thank you for providing a link; it's a new site for me.
Since EBCDIC
Using Macs since they were Lisas.
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Mar 28, 2001, 06:59 PM
 
In the interests of simplicity, the current URL for Sun's Forte for Java (Community Edition) is:

http://javashoplm.sun.com/ECom/docs/...nsactionId=Try

------------------

Since EBCDIC
Make every post count!
Since EBCDIC
Using Macs since they were Lisas.
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Mar 28, 2001, 07:43 PM
 
I've downloaded the "for Solaris" version, but the installer tells me that it can't find a 1.3 JVM and I should install that before trying to install Forte again. (So it's not just as simple as the instructions noted here.)

I'll go into the install guide and see if RTFMing will help :-)

------------------

Since EBCDIC
Make every post count!
Since EBCDIC
Using Macs since they were Lisas.
     
Dedicated MacNNer
Join Date: Nov 2000
Location: Malaysia
Status: Offline
Reply With Quote
Mar 29, 2001, 09:40 AM
 
I had difficulties as well installing the Solaris version. So to resolve the issue I downloaded the "All Platforms" release. This is a class file. Once it is downloaded, simple open up Terminal.app and cd to the directory. Type "java forte_ce_2". It will execute the appropriate Main file out of the class file in that directory. It's just the coolest thing to see it install.

One other note, when it runs it likes to have write access/ownership to lots of things. Unless you want to do some "chmod"ing, DO NOT install it as root. I thought I would be cool and install it in /usr/local as root. This gave me several exceptions when running. After installing it in my home dir as myself, it ran just fine (well, the one bug.java exception that has been mentioned).

Also, I can't just double-click on the icon in the finder. I have always had to pull up Terminal.app and "./forte4j/bin/runide.sh". Actually, I just saw that if I double-click on it, then "select application" then naviage to /Applications/Utilities, I can associate Terminal.app with this script.

---gralem
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Mar 30, 2001, 11:25 AM
 
Originally posted by cmoney:

Once installed, you'll have to run the runide.sh file in the bin dir. As I said, I get an exception while starting the IDE, some missing Debug class. But so far, I've created a new class and successfully compiled it with no problems.
It is complaining about some missing DebuggerCallback in the JDK referenced by toolsDebugger.jar
To stop this from comming up, go into the modules directory and mv toolsDebugger.jar to toolsDebugger.tar until this issue is resolved in the JDK.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 31, 2001, 01:33 AM
 
It is complaining about some missing DebuggerCallback in the JDK referenced by toolsDebugger.jar
To stop this from comming up, go into the modules directory and mv toolsDebugger.jar to toolsDebugger.tar until this issue is resolved in the JDK.
Actually the JDK is correct. The Forte guys told me to just remove toolsDebugger.jar on OS X, it's not needed (though I forget why exactly, I'd have to look up my old mail at work). The scripts will be smarter about not trying to use it in the next Forte release.
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Apr 1, 2001, 10:34 PM
 
Thanks very much for the swift kick in the arse; the instructions are exactly what I needed after I gave up on the Solaris stuff.

You aren't kidding about watching it install itself being a rush. Watching "write once run anywhere" code actually doing its thing *is* fun.

Now it's time to dig in and figure out exactly how this thing works.

I'm going to like this post-X era :-)

------------------

Since EBCDIC
Make every post count!
Since EBCDIC
Using Macs since they were Lisas.
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Apr 2, 2001, 11:42 AM
 
What happen?!?

Someone set up us the JVM.

All of your platforms are belong to us!
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:48 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2