About Java and JavaScript


Thank you for your mail! I'm always happy to help people interested in learning to be (better) programmers. I'll see what I can do to help you.

I've looked at BYOND a while ago and thought it was a nice idea, but I didn't look at it in any detail. I don't know what kind of programming, if any is involved in doing something with BYOND.

You ask about Java scripting. I think I need to clear up some misunderstandings first. There are two things: There is the Java programming language, and there is a programming language called JavaScript.

Java is a powerful, all-purpose modern programming language. Java is the heart and core of Sun's software offering. They produce and offer (for free, to a large extent) the language, tools for working with it, and extensive libraries which can be used to build programming projects in the realm of graphics, text processing, Web services, databases or pretty much anything you can think of.

JavaScript is a "little language" that Netscape built into their browsers at roughly the same time Java hit the public. As the name implies, JavaScript is essentially a scripting language, i.e. a special-purpose language built mainly for one task. In this case, the task is to control the function of a browser. JavaScript looks a bit like an object-oriented BASIC. It has access to most of the parts of a browsers (screens and frames and fields and buttons and so forth) and considers them all objects, and can make them do certain things. However, apart from maybe some simulator programs, JavaScript outside a browser is like a fish out of water. And even in a browser, it doesn't do so much.

I don't understand why Sun allowed Netscape to call their browser control language JavaScript, when they had the copyright on the name Java. The similarity between the names JavaScript and Java has confused a lot of people, apparently including you.

Now then... at one point I recommended that people learn BASIC as their first programming language, partly because BASIC was delivered with every copy of MS-DOS (some 15 years ago, LOL!) so it was widely available practically for free. But nowadays, especially if you have cheap access to the Internet and maybe 100 Megabytes of hard disk to spare, I recommend Java. Sun makes the compiler, the libraries, essentially everything you need to learn or even write productive programs, available for free on the Web site. They go one step further and even offer an excellent online tutorial to teach you how to get started, and all the basic skills you need to know.

So instead of lecturing you any more, here are some suggested URLs to point your browser at:

  1. The Java Development Kit. This is the language and tools. Everything you need, essentially.

    http://java.sun.com/j2se/1.4/download.html

    You want to download the JDK, and choose the right one for your PC's operating system (Windows, most likely). The current latest greatest is version 1.4; the name will change as Sun develops new versions. If this link doesn't work by the time you get around to trying it, just go to http://java.sun.com and look for links to "Java 2 Standard Edition" (you will not want J2EE, the Enterprise Edition, nor J2ME, the Micro Edition)" and then look for a download of the latest JDK. Go ahead and download, but don't touch it yet! Because a fool with a tool is still a fool. You need

  2. The Java Tutorial.

    http://java.sun.com/docs/books/tutorial/

    This is a very complete on-line tutorial (you can download it too, if you like, but you read it in your browser in any case) and believe me, I learned most of what I knew about Java in the first year or so from this tutorial, and I still like to go there to learn new things. It's very nicely written, in a gentle and understandable and thorough style; there are lots of examples and exercises too. The part about "Your First Cup of Java" tells you how to get started with whichever system you happen to have on your PC.

    The Tutorial is also available as a softcover book.

  3. An editor.

    http://dmoz.org/Computers/Software/Freeware/Editors/

    I think the Tutorial starts you off using NotePad, which is OK for a beginner's editor. But it's a lot more fun and effective to use a "real" programmer's editor. Fortunately, there are a lot of editors available for free. I found the above link by doing a Google (http://www.google.com) search for "freeware editors" and found the above link, which has links to 56 different editors and some sub-lists of even more. I won't recommend a specific one, and encourage you not to just pick the first one you see there either. You'll want to pick one that mentions syntax coloring for Java. Browse around, look at the screenshots, download a few, try them out to see which one you like best. They're all free, so you can pick whichever one suits you best. We programmers tend to spend more time with our editor than with our girlfriends/wives, so editors are very important to us and the choice is often a very personal thing.

  4. More information.

  5. For reference:

    http://java.sun.com/j2se/1.4/docs/api/

    This is Sun's Java API documentation. API means Application Programmer Interface; that's just a fancy way of saying this documentation describes all of their (standard) library. This means that all the functions of all object classes available for Java in the JDK are listed here in great detail. This won't mean anything to you until you start to learn the language, but once you set out to do your own projects you will find yourself keeping this stuff handy for reference.

    This, too, is available as a book. Sun has to make a buck on SOMEthing, after all!

  6. My email address.

    mailto:Elrac@smotricz.com

If you have any questions not covered by the many tutorials and other online resources, ask me. I'll try to help.

I can help with other programming languages too (I used to know about 20 at some time or other) but Java is currently my favorite -- maybe you can tell?

Best regards,

-Carl [Elrac] Smotricz-

Back to Table Of Contents