In a message dated 2/10/00 8:15:01 PM,
martin.binxie@... writes:
>
>
>Hi I cant use any of this sfuff coming over on my mac laptop, can you tell
>
>me how to get started please any one martin in belfast
Unfortunately, from your e-mail I can't discern your problem. So I shall
speculate wildly:
CAUTION: Before you download the newest and best. Delete all of the prior
versions. This means delete MRJ 2.1.4. It also means delete JDK of any
kind. If you have "Clean Sweep" or any "Uninstall" program, it will be a lot
easier.
First: You must download MRJ 2.2. This is Macintosh for "JVM". The JAVA
Virtual Machine.
Second: You must download MRJ SDK 2.2. This is what used to be called
"JDK". The JAVA Development Kit. (Might as well get the newest. These two
packages are brand new at the end of January, 2000.) SDK stands for
"Software Development Kit."
Third: You must install MRJ 2.2. This is what makes your browser JAVA savvy
on the internet. It is "Macintosh Runtime for JAVA", which would be called
the "Java Virtual Machine" on a less sophisticated computer using "Windows
1895."
Fourth: You must install MRJ SDK 2.2. Now you can do some serious JAVA
programming.
The poor unwashed who are using JDK or SDK on "Windows 1895" have something
called a "command line."
Watch this. My mac is speakable so right now as I'm typing this, the screen
is filled with this e-mail and I don't want to go looking for this folder in
order to send you a screen shot so I simply say "Jay Dee Kay" out loud and
presto, it opens right in front of me. This is built into OS 9. I then
press command - shift - 4. My cursor turns into a crosshair. I place the
crosshair on the upper left corner of the "JDK" window and drag to the bottom
left corner. This creates a picture of my JDK window on my hard drive. I
attach it to this e-mail (Picture 4). I show you my handiwork. Kewl Mac
Stuff.
When you install MRJ SDK 2.2, you get a folder full of folders and files.
Whoever put this together did not put everthing in one place. I find the
JAVA applications I need, make aliases of them (command - m) and put the
aliases together in one folder named "Jay Dee Kay". I click once on the
folder "Jay Dee Kay" and say, "Make this speakable." I never have to look
for "Jay Dee Kay" again.
OK ENOUGH SMALL TALK: HERE'S HOW "MRJ SDK" WORKS:
1. I write my code in any text editor and save it as : MyCode.java
2. I open the folder containing MyCode.java and look at its icon
3. I open "Jay Dee Kay" and see all of my JAVA aliases
4. I click on MyCode.java and drag it onto javac alias (or if you're
looking at the original, drag it over javac)
5. javac is the JAVA compiler in MRJ SDK 2.2
6. Looking back at the folder containing MyCode.java I see a new file
named MyCode.class
7. Here's the problem: JAVA code is either for an application or an applet.
Look at the top of your code MyCode.java, and if you see the word Applet
anywhere, you have written code for an applet, not an application
8. To run an applet, you must have code for the file MyCode.html
9. Here's the code for the html document ( I will attach this code as a text
file. Your browser may try to use this as HTML code:
<!- You must use this file EVERY TIME YOU WRITE AN APPLET in place of
MyCode.class, put the name of your JAVA file ->
<html>
<head>
<title>Dr Dan's Pathetic Attempt To Describe MRJ SDK</title>
</head>
<body>
<applet code = "MyCode.class" WIDTH = 200 HEIGHT = 200>
</applet>
</body>
</html>
10. Now drag the file: MyCode.html over the Apple Applet Runner alias.
Voila. If you wrote and compiled your code correctly, it should be running.
You will notice the name "MyCode" everywhere. In JAVA, your code will
have a class in it named MyCode and you will save it as MyCode.java and it
will be compiled into a file named MyCode.class and you will make an html
file named MyCode.html That's the way it has got to be done.
If you have further questions, don't hesitate to write.
Dr Dan