There is no one right answer to "which is the right book for me?"
Here's a list of popular
Java technology books.
A lot depends on what you already know, and how you like to learn.
If you already know how to program in another language,
and Just
want to learn the Java programming language,
consider Just Java 1.2 from the FAQ author.
Everything in one handy volume (language basics, Swing, networking, I/O, database access, etc) and it comes with a CD with tons of applets, games, applications, compiler tools, complete with source. Includes Java technology-enabled compilers for Microsoft Windows, the Mac, Linux, and SolarisTM (SPARCTM and x86). look at http://www.amazon.com/ for details
If you or your manager instead
want a briefing on Java technology,
thin clients, CORBA, TCP/IP,
JavaBeansTM, etc.,
take a look at Not Just Java from the FAQ author.
This book doesn't teach you how to program in Java; it tells you why you might want to, and what kind of systems are most suited to Java. It describes E-Commerce and XML. look at http://www.amazon.com/ for details |
Here are the points to check when evaluating a programming book.
Most people buy one book to begin with, then four or five more as they wish to learn more, and about more specialized topics. The FAQ author has purchased and read probably 80 Java technology books in the last four years.
Here are some good ones:
http://www.afu.com/jbooks.html
http://www.hszk.bme.hu/~werner/Java2BookReviewBETA.html
http://www.geocities.com/RainForest/Canopy/4774/Java/education.html
http://www.flathill.com/languages/java/
http://www.fastgraph.com/books/java.html
http://teamjava.com/links/tj-srv.cgi?MUF=0,tj-booklist.muf
http://www.javaworld.com/javaworld/books/jw-books-index.html
Follow these steps.
For more information about the way Microsoft has been manipulating the computer industry and misusing its monopoly power, see Microsoft FAQ.
There are three basic possibilities:
javac -garbageto see if it prints out a message about correct usage. If not, invoke javac using the full pathname, or set your PATH variable to include the directory that contains javac.
.
" (the current directory) in your
CLASSPATH.
There are several common mistakes that cause your VM (java or browser) to be unable to execute your classes
If you are running an applet, you should check the following further points:
The CLASSPATH environment variable tells the VM's class loader where to find classes that are directly or indirectly invoked, including system classes. The CLASSPATH variable should
From JDK 1.1.2 on, it is generally an error if the user sets the CLASSPATH to include classes.zip. But CLASSPATH will need to be set to
For the sake of consistency, the minimal classpath setting should be:
" set CLASSPATH=. "
Below you'll find examples for
Microsoft Windows (basic application class),
Solaris (package class),
javac (multiple packages), and
browsers (applet codebase).
D:\src\tries\HelloWorld.class
## JDK 1.1, no CLASSPATH set > cd D:\src\tries\ > D:\jdk11\bin\java HelloWorld # OK: 1.1 implicitly adds classes.zip and current dir > D:\jdk11\bin\jre HelloWorld # FAILS: jre does not automatically add . to CLASSPATH > cd D:\ > D:\jdk11\bin\jre -cp D:\src\tries HelloWorld # OK: jre adds classes.zip, -cp adds class directory ## JDK 1.1, CLASSPATH set > set CLASSPATH=D:\src\tries > D:\jdk11\bin\java HelloWorld # OK: java using CLASSPATH > D:\jdk11\bin\jre HelloWorld # FAILS: jre does not use CLASSPATH (on Windows) ## JDK 1.0.2, CLASSPATH set > set CLASSPATH=D:\jdk102\lib\classes.zip;D:\src\tries > D:\jdk102\bin\java HelloWorld # OK: > set CLASSPATH=D:\jdk102\lib\classes.zip;D:\src\tries > D:\jdk11\bin\java HelloWorld # FAILS: exception in thread NULL - wrong system classes
/usr/src/com/devjoes/killer/App.classand it is in package com.devjoes.killer:
# JDK 1.1, no CLASSPATH set $ /usr/bin/jdk11/bin/jre -cp /usr/src com.devjoes.killer.App # OK: $ cd /usr/src/com/devjoes/killer/ $ /usr/bin/jdk11/bin/java App # fails: class name and path are wrong $ CLASSPATH=/usr/src/ $ /usr/bin/jdk11/bin/java App # fails: class name is com.devjoes.killer.App $ /usr/bin/jdk11/bin/java com.devjoes.killer.App # OK:
Source files | package | Makes the call |
---|---|---|
/usr/src/pack/Minimal.java | package pack | pack.sub.Try.run() |
/usr/src/pack/sub/Try.java | package pack.sub | (nothing) |
$ CLASSPATH="" $ /usr/bin/jdk11/bin/javac /usr/src/pack/sub/Try.java # OK: works fine $ /usr/bin/jdk11/bin/javac /usr/src/pack/Minimal.java # FAILS: can't find pack.sub.Try $ cd /usr/src $ /usr/bin/jdk10/bin/javac pack/Minimal.java # OK: finds pack.sub.Try based on . as package root $ cd /usr/src/pack $ CLASSPATH=/usr/src $ /usr/bin/jdk11/bin/javac Minimal.java # OK: finds pack.sub.Try based on CLASSPATHNow assume the killer application class
/usr/src/com/devjoes/killer/FastApp.java(in package com.devjoes.killer) uses a third-party package in a jar file
/usr/jars/JShapes.jarbut makes no other reference to other classes. The following works fine:
$ CLASSPATH=/usr/jars/JShapes.jar $ cd /usr/src/com/devjoes $ /usr/bin/jdk11/bin/javac killer/FastApp.java
<applet code=ArcTest.class height=400 width=400>To use classes in subdirectory, use the codebase parameter:
<applet codebase="mysubdir/" code=ArcTest.class ..To use classes in an archive, use the archive parameter:
<applet archive="applets.jar" code=ArcTest.class ..See also: JDK 1.1 ReadMe
Interactive I/O in the Java programming language is very poorly supported. Programmers must piece together several library classes in non-obvious ways to get the required functionality. See the answer to Question 7.1.
By default, an applet can read files on the server, but not write them, and has no access to the client. This is for reasons of security. It would be very unsafe to let any old applet that you downloaded from an unknown origin on the Internet read/write your files. It would be as unwise as allowing this kind of access to an ActiveX control (which is one reason ActiveX is dead on the Internet).
There are several different ways to relax the default rules. See the answer to Question 7.8.
Java 1.0 and 1.1 do not have a serial port API. There are several commercially-available libraries that supply the needed functionality. JDK 1.2 introduces access to the serial and parallel ports as an extension (optional extra) library. See also the answer to Question 6.3.
The java.text package introduced with Java 1.1 supports formatted I/O. See also the answer to questions 7.11, 7.12, and 17.7.
Do not forget that your remark must be phrased in the form of a question to win on FAQ Jeopardy. In any event, it bears repetition that letter case really matters in the Java programming language, and that the names of public classes should exactly match (including case) the names of the files they live in. See also the answer to Question 1.1.2
Your code probably looks something like this:
class myclass { public static void main(String args[]) { myMethod(); } public void myMethod() { //some code } }
The issue is this: a static method means it belongs to the class, not each individual object. If you leave the static keyword off (the usual case) as is done here with the method "myMethod()", it means that method can only be invoked on an object. But your call from main() has not told myMethod() which object it is to be invoked on. Inside a non-static method, you don't have to provide this information, as it assumes you mean the same object on which it was invoked. But when calling from a static method, you must provide the information, and you haven't - hence the error message.
A common fix is to instantiate a member of the class, on which to invoke myMethod(), like this:
public static void main(String args[]) { myclass m = new myclass(); m.myMethod(); }
This problem is especially common when you are writing code that you want to run as an applet and as an application. Naturally, you call init() and start() from main. What you really need to do is:
public static void main(String[] args) { Applet ma = new myApplet(); ma.init(); ma.start(); }
myArray.length()
? Arrays are just objects, right?
Yes, the specification says that arrays are object references [JLS 10.2]
just like classes are. You can even invoke the methods of Object
such as toString() and hashCode() on an array.
However, length is a data item of an array and not a method.
So you have to use myArray.length
.
Create an event handler class to extend WindowAdapter. Then override WindowAdapter's windowClosing() to do the actions you want when a window's "close" action is clicked. Then add that to the listeners for that window.
import java.awt.*; import java.awt.event.*; public class MyFrame extends Frame { public MyFrame(String s) {super(s);} public class WL extends WindowAdapter { public void windowClosing(WindowEvent e) {System.exit(0);} } // do your other Frame stuff }
Somewhere in your initialization code, put:
f1.addWindowListener( f1. new WL() );
This last syntax is not commonly known to many people yet, it's another wacky artifact of inner classes.
Alternatively, combining the inner class and setting the handler in one go, you could do this:
MyFrame f1 = new f("wave"); f1.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { // and/or setVisible(false) and/or dispose() System.exit(0); } });
You have code like this
byte b = 0; Incompatible type for =. Explicit cast needed to convert int to byte. b = b + 100; // compiler error message ^ b += 100; // works OK
The reason is "promotion". Arithmetic expressions are promoted to the type of the longest, floatiest operand in them, or at least to int. The first statement involves the assignment of an expression. The expression is promoted to 32 bits, and must be cast back down to 8 bits, like this "b = (byte) (b+100);". The second is an operator assignment, and the cast back to byte takes place automatically. The Java Specification says:
The compile-time narrowing of constants means that code such as:
byte theAnswer = 42;is allowed, with no cast necessary. [JLS 5.2]
You want to write code like this
Float One; Float Two; Float Hard = One + Two;
but the compiler does not allow it.
The Java programming language has two separate ways of representing a 32 bit floating point number, Float and float. The difference in letter case is significant. Float is a class, that whose sole purpose is to "wrap" a floating point number so it can be treated as an object. The class does not support floating point arithmetic, because the performance would be too slow. float is a primitive type (like int) that is used for floating point arithmetic.
You choose one or the other depending on your predominant use. If all you need of your floating point numbers is arithmetic, declare them to be "float". If you need to use them as objects, for example to place them in a Vector, declare them as "Float".
If you need both, tough. You have to declare them one way and convert whenever you need the capabilities of the other. Your specific code can be written as:
Float One = new Float(1.0); Float Two = new Float(2.0); Float Hard = new Float(One.floatValue() + Two.floatValue());
Use a JAR file. Put all the files in a JAR, then run the app like this:
java -jar [-options] jarfile [args...]
From JDK 1.1.5 on (i.e. JDK 1.1.6, JDK 1.2) the stack trace of an uncaught exception no longer has source code line numbers. It only says "(Compiled Code)".
To see the line numbers where your program throws an exception, use the command line argument in JDK 1.2:
java -Djava.compiler=NONE myapp or java -nojit myapp or java -Xint myapp
The biggest value of Java technology is its portability.
The Apple site is the place to start. See http://www.apple.com/java/ .
Apple computers (since MacOS 8) come with the runtime component of Java, i.e. the JVM and class libraries. Instead of calling it the JRE or even "the JVM and class libraries", Apple introduces a lot of unnecessary confusion by calling it "MRJ" (Macintosh Runtime for Java). You can download the latest MRJ from http://asu.info.apple.com/swupdates.nsf/artnum/n11572
But to compile Java code on your Mac, you will also need to
download and install the Java compiler (the JDK) for your Mac.
Apple seem to hide their Java compiler on their site.
Worse still, Apple chose to call their version of the JDK
by the name "MRJ SDK". Obviously people confuse this with
the straight MRJ, and they are not sure what the MRJ is in the
first place.
You can download the latest MRJ SDK from
http://developer.apple.com/java/text/download.html#sdk
MRJ SDK 2.2 is essentially JDK 1.1.8.
Apple has announced that it will introduce Java 2 support
with MacOS X. It's going to be great!
An alternative to the free Apple JDK (known as MRJ SDK) is the
shareware ($15)
MacJikes compiler (a good compiler written in C++) at
http://www.stg.com/employees/sbytnar/projects/MacJikes/
Another alternative is the Codewarrior product "Discover Programming
for the Macintosh" which includes the compiler, and some online books
and tutorials. It retails at $79, but is available a bit cheaper
if you look.
The Apple Developer Java site with many links is at http://developer.apple.com/java/index.html
There's a not-very-good tutorial on developing Java for
the Mac at
(lengthy URL at developer.apple.com)
There is another Java on the Mac tutorial with info about Mac
specific things (like changing icons - these are determined by
a set of Mac resources that are bundled with the app at creation) at
http://developer.apple.com/java/javatutorial/index.html
There is a great Mac-specific Java FAQ at: http://www.outlawcafe.org/MRJ-FAQ/
MacOS does not provide a command line interface, so you have to make your application "double-clickable". The Apple JBindery tool which comes with the Apple SDK enables this. Information about JBindery is at: http://devworld.apple.com/java/javatutorial/doubleclick.html There is an add-on product called MPW that provides a command line interface, and which can be downloaded from the developer part of the Apple site.
Mac Netscape (April 2000) has only a partial implementation of 1.1.5. So lots of later things don't work. There's a plugin that lets Mac Netscape users use Apple's MRJ; it requires using an "embed" tag. That takes you to JDK 1.1.8.
The Mozilla team is, reportedly, also working on getting Mozilla to use MRJ. No info on their release schedule.
Your Mac browser choices are to:
1) Write 1.0 code
2) Write 1.1.x code and write an HTML script that
checks for Mac Netscape and uses the "embed" tag,
and handles the error condition where the user
doesn't have the plugin, or that tells people to
run it with Apple Applet Runner or another browser.
Apple announced at Macworld in January 2000, that MacOS X will have Java 2. See JavaWorld's article
MacOS X is planned to ship summer 2000, so it will be out by Dec 2000. Apple will decide whether to ship MacOS with Java 1.2.2, or take the schedule hit and switch to the more current (and feature rich) Java 1.3.
Yes. See Question 1.6 It's not that great though because Windows 3.1 has inadequate features to support great software.
Both these problems are resolved by the same process. Assuming you're running the Win95/98 command.com, then you've changed the MS-DOS Prompt options under the "Properties" menu item. In the Properties dialog, Program->Advanced gets you a dialog. Here, make sure the "Prevent MS-DOS-based programs from detecting Windows" checkbox is UNCHECKED.
If the option is checked you get exactly the kind of behavior you're seeing. The option is unchecked by default, so it must have been selected at some time in the past. Change it back to unchecked.
First answer: put the entire filename in quotes in the save dialog. Once you have created your first source file, double click on it in Explorer, select "Notepad" from the "Open with" box, and Notepad will stop adding the spurious ".txt" to your .java files.
Second answer: Notepad expects to see a "carriage return/line feed" pair at the end of each line, rather than just the "newline" (line-feed) commonly used on Unix. Use this program to expand all newlines,
/* * Usage: jre crlf file1.java file2.java ... fileN.java */ import java.io.*; class crlf { public static void main(String s[]){ byte b[]; byte p; FileInputStream is; BufferedOutputStream os; File f; for (int i=0; i < s.length;i++){ try{ f=new File(s[i]); b=new byte[(int)f.length()]; is = new FileInputStream(f); is.read(b); is.close(); os = new BufferedOutputStream( new FileOutputStream(s[i]),b.length); p='?'; for(int j=0; j < b.length; j++){ if((p!='\r')&&(b[j]=='\n')) os.write('\r'); p=b[j]; os.write(p); } os.flush(); os.close(); }catch(IOException e){ System.err.println(e.toString()); } } } }The source code is to show new users a way to make a simple program which can read a file and write it out buffered.
Compile with "javac crlf.java" and run with
This occurs under Windows when you have long CLASSPATH names.
You need to increase the environment space.
On Windows 95,8 put this in your c:\windows\system.ini
The previous suggestion to
put this in your config.sys:
java crlf
or just use Wordpad instead of Notepad. Wordpad is under
Start->Programs->Accessories->WordPad
[NonWindowsApp]
CommandEnvSize=4096
On NT you can right-click on My Computer, select System Properties then
go to the Environment tab and then increase COMSPEC to the value you want.
shell=command /e:4096
apparently causes you to create two copies of command.com which wastes
memory.
The specifications are publicly available, and anyone is free to do clean-room implementations of the JVM and core Java API's. Sun includes a perpetual, irrevocable, free and royalty-free license in the front of the Addison-Wesley books containing the specification.
Sun also provides free access to the Java technology source code. See http://java.sun.com/communitysource/
Using the Java trademark does requires licensing from Sun. It is not clear if the Embedded or Personal Java specifications are open, as it is not clear if a clean-room implementation may be done without licensing from Sun.
The relative openness of Java technology contrasts with systems that are only available from one vendor, whose interfaces are developed in secret, without an open process for others to participate, whose owners do not allow competing implementations of the same API, and whose owners change the APIs as a strategic weapon against competitors. Typically, such systems also feature "private" APIs that are published late or not published at all, to allow the single vendor to gain a competitive advantage for their other products. Typically such proprietary systems do not make the source code available for inspection by all.
The Java Programmers FAQ (at http://www.afu.com/) answers your question in section N.n. ...
This gives them the answer, and shows them where to go for future questions. It also demonstrates that the FAQ can answer their questions, supplying an incentive to go there next time. It's regarded as elementary politeness to look for the FAQ of a newsgroup and read it before posting any questions.
In general, FAQs for any newsgroup are available by looking at past postings in a group, or by searching Deja News (see Q 1.4), or via anonymous FTP at directories under ftp://rtfm.mit.edu. The pathnames are called things like /pub/usenet-by-group/comp.lang.java.programmer/Java_Programmers_FAQ which may help you get to the right one directly, as it takes some time to get a directory listing there. Alternatively, you can look for newsgroup names on the same ftp site by going to the same site and looking under /pub/usenet-by-hierarchy/. That has subdirectories such as alt/, ba/, ca/, comp/, and subdirectories under them such as /pub/usenet-by-hierarchy/comp/lang/ and so on. This helps you explore the world of newsgroups with FAQs.
If you do not have anonymous FTP access, you can access the rtfm.mit.edu archives by mail server as well. Send an E-mail message to mail-server@rtfm.mit.edu with "help" in the body for more information. "RTFM" stands for "Read The effing Manual" - you must expect to put in some time and effort to master a new area of study.
If you want to look at the definition of Internet standards like FTP, telnet, visit the IETF site at http://www.ietf.org/ where all the RFC's (Request For Comments) can be found.
Go to
http://www.dejanews.com/home_ps.shtml
In May 1999, Dejanews changed their name to Deja.com, and their
web design to a truly horrible garish interface, covered with ads
and harder to search. Consider using these search sites instead:
http://www.exit109.com/~jeremy/news/deja.html
http://www.dogpile.com/
http://www.google.com
http://www.hotbot.com/
http://www.mamma.com
nnn Documents (nnn is some number).
The chances are that you will find several answers to your question. Some may not be complete or completely accurate however. That is the nature of Usenet, and free information. If you still don't have an answer, then post your question on the most appropriate of the newsgroups. Don't spam the newsgroups by posting to multiple groups. Knowledgeable posters tend to ignore questions like that.
Also look at
http://sunsite.unc.edu/java/cgi-bin/query
and look at
http://asknpac.npac.syr.edu/
for a Java newsgroup search.
http://www.javaworld.com/search.html
can search the Javaworld newspaper.
There are quite a few Java technology mailing lists. http://java.miningco.com/msub7.htm has a comprehensive list of lists.
This is available online at:
http://java.sun.com/docs/books/jls/index.html
and the Java technology API is at:
It is also available as a book in printed form (details at website). Also see the "Clarifications and Amendments" http://java.sun.com/docs/books/jls/clarify.html.
You can also see the virtual machine (execution environment) specification at http://java.sun.com/docs/books/vmspec/2nd-edition/html/VMSpecTOC.doc.html
The Java Software Division of Sun Microsystems
has followed a policy of creating new APIs in consultation with
leading industry participants, then posting the draft specification for
public review and comments. Check the roadmap of new APIs and
products at
http://java.sun.com:80/products/api-overview/index.html
Also, some APIs that are under consideration, possibly for JDK 1.2 are at:
Check out the section "Naming Conventions" in the language specification
See Sun's Java Code Conventions:
Also take a look at Doug Lea's draft coding standard -
See also naming conventions for some basic rules of thumb.
Look at the Java Developer ConnectionSM at http://java.sun.com/jdc/.
All the Java bugs that Sun knows about are listed there, with the
exception of security-related bugs.
After you have checked that the
bug is not already listed, you can submit a bug report through:
http://java.sun.com:80/cgi-bin/bugreport.cgi
You should check that the bug doesn't already exist for two reasons: first,
you might find the bug with a workaround listed. Second, you don't want to
waste everyone's time with a duplicate bug report.
You can also send in an RFE (Request For Enhancement) or ease-of-use issue there. You can even vote on the priority you would assign to a particular bug fix! Join the Java Developer ConnectionTM (it's free) by going to http://java.sun.com/jdc/. Then browse http://developer.javasoft.com/developer/bugParade/#votes
A partial list of JDK ports is available from
http://java.sun.com/cgi-bin/java-ports.cgi
An (impressive) list of the systems that the GPL Kaffe JVM runs on
is at
http://www.transvirtual.com/ports.html
A list of the software updates you should install to run Java on Solaris is at http://java.sun.com/products/jdk/1.2/install-solaris-patches.html#2.6
There are several ports to Win 3.1. IBM's ADK1.02 is available at the following location:
IBM offers a port to Linux, as do others. The IBM Jikes port is at http://www.alphaworks.ibm.com/ There is a large amount of useful software there, including a profiling tool called jinsight.Netscape Navigator for Win3.1 has support. Java technology will never be well-supported under Win3.1 because Win3.1 lacks the basic features expected of a modern OS (primarily lengthy filenames and multithreading support).
Also take a look at Sun's JavaPC kit that can switch a PC into a thin client Java technology-enabled system (and back to Win3.1/DOS when you want). It's meant for software OEMs and large corporations running lots of older PCs, but you can use it on the latest Pentium II too. Details are at http://java.sun.com/products/javapc/index.html. JavaPC is available now for $100, runs on 486's with 8Mb or more Unlike the 16-bit versions of Netscape Navigator and Microsoft Internet Explorer, which provide a Java Virtual Machine that is only compliant with the JDK 1.0.2 API, the JavaPC software allows IS managers to deploy JDK 1.1-compatible Java applications on PCs running DOS and Windows 3.x.
The Java 3DTM FAQ at http://www.j3d.org/faq/ may have the answers you're looking for. It contains general information about Java 3D, as well as programming tips.
Sun is sponsoring an examination which programmers worldwide can take. Those passing can use the designation "Sun Certified Java Programmer". There is also a second-level test, involving writing a program to spec, and taking a further test. That results in the qualification "Sun Certified Java Developer". You can find out all about the exam at:
and then search for "sun certified java". It costs $150 to sit the Java Programmer exam. It is not trivial to pass the Java certification exam. It requires understanding the objectives of the test, and the material that is tested for. These are given, along with sample questions, at the URL mentioned above.
There is a Java certification FAQ at: http://www.marcusgreen.co.uk/
A good Java technology news source is
http://www.nikos.com/javatoys.
This site is a fine site for programmers who want to be well-informed
about computer industry topics. It has a lot of coverage of Linux as
well as more general news.
http://slashdot.org/
This site is a source of independent news and commentary on the computer
industry, including Java.
http://www.pjprimer.com/media.html.
You have to subscribe ($10/year, 30 day free trial).
First note that the URLs in this section change quickly, and soon become
outdated. If you have an update, send it in.
There is a Gnu Java technology page at
http://www.gnu.org/software/java/java.html
The LaTTe virtual machine has been released. It is a freely available
JIT virtual machine intended to execute Java classes. It can be obtained
from http://latte.snu.ac.kr/.
Kaffe (another JVM) can be found at
Classpath is a free implementation of
Sun's core Java programming language libraries (v1.1),
being developed for the GNU Project (
http://www.gnu.org).
Information regarding classpath is at
http://www.classpath.org/
They aim to develop a 100% free drop in replacement for Sun's
class libraries, targeting first the Japhar JVM (below).
They are always looking for help, so feel free to stop by and volunteer.
See also
http://www.japhar.org/
This is the Hungry Programmer's JVM.
Currently it is development grade only.
San Francisco is the code name for a very large Java technology
project led by IBM,
and involving other companies. The project is to provide a Java framework
for data processing applications. A large number of classes are provided for
general ledger, sales order, inventory management, etc., and these classes
can be extended and customized for particular industries (vertical
markets). It is a large and ambitious software project.
IBM's SF project competes with products from companies like SAP and Baan.
Of course, the SF project is multi-platform and uses Java beans and GUI
interfaces. More information on SF is available at
http://www.ibm.com/Java/Sanfrancisco/
Well, the first one to consider is IBM's San Francisco project, mentioned
above.
Another office suite written in the Java programming language is Applix
Anyware at
http://www.applix.com/anyware/index.htm.
Applix became available in downloadable demo form in April 1998.
Yet another is Star Division's Client/Server Office. It is an office suite
with the client part written in the Java language
and able to run on JavaStations.
The server part will run on Solaris, NT, OS/390, and AS/400. The older
(non-Java technology) version is bundled with all Sun workstations sold
in Germany.
The Linux version is freely downloadable from
http://www.stardivision.com/.
Another is Digital Harbor's Wav word processor. It supports
component software, and it runs in 1MB, not the 114Mb of the latest
MS Word. A free trial is available. See:
http://www.digitalharbor.com/
Another Java technology application is Formula One for Java,
an Excel-compatible
spreadsheet written in 100% pure Java, and available for all systems.
It runs as a JavaBean, so can easily be assembled
as one component of a larger system. It also runs as an application,
and as an applet! Formula One is a product of
Visual Components, Inc.
See
http://www.f1j.com/.
Another one is Ncode Research Inc. who write viewers for office
suites. They are file-format specialists. Their mission is to make
all popular file formats available for the Java platform.
They write 100% Pure Java viewers for Word, Excel and PowerPoint
(including Office 95 and 97 formats).
See
http://www.ncode.com/
Intentia, the 8th largest ERP vendor (annual sales of $320 million),
has moved their entire suite of applications (Movex - covering 8
markets) from RPG to the Java programming language - 20 million lines worth.
See their
press release.
However, the industry is seeing few new office productivity applications
written in any language.
The niche for single-user office productivity applications is
already dominated by Microsoft products, and it is unrealistic
to think that software will unseat shrink-wrapped software simply
because it is written in the Java programming language.
This is why Corel replanned its Java rewrite
of Corel Office before taking it to FCS. When Corel did that, it also
increased its investment in Java technology
from 33% of R&D budget to 50%, at the expense of Microsoft Windows.
This is also why Lotus's e-suite - a suite of
applets and components including a spreadsheet and a word processor -
was dropped in September 1999.
Most development in Java is taking place for custom applications internal
to a company. Most programmers of any kind have never worked on MS Office,
but work on internal applications, and so it is with Java technology.
These projects
don't have the high profile of major vendors' products, but they are the
mainstay of the industry. A number of companies are working on beans,
like http://www.quadbase.com/
who have graphing software (see also GraphMaker mentioned
later in this document). EspressChart is a JavaBean that gives
you the ability to add 2D and 3D graphs in your applications/applets.
This bean is easy to use, runs anywhere, and meets the 100% Pure
Java certification standards.
There are some excellent games applets at
http://www.microprizes.com
http://www.gameplay.com/webgames
ObjectDesign Inc., has an ODBMS written in 100% Pure Java. The product
is named PSE Pro for Java.
See
http://www.objectdesign.com/
There are scores of Java Technology User groups around the world, mostly in urban
areas, and centers of software technology development. A partial list with
contact information can be found at
http://sunsite.unc.edu/javafaq/usergroups.html.
If you can't find a user group in your area/school, it's easy and
satisfying to start one.
A JavaBean is a Java class that follows some simple conventions including
conventions on the names of certain methods to get and set state.
Because it follows conventions, it can easily be processed
by a software tool that connects Beans together at runtime. JavaBeans are
reusable software components.
Think of JavaBeans as being the software equivalent of Lego[tm]
bricks. Instead of plugging together plastic bricks, you can easily
plug together classes, and have them fit and work with each other.
See
http://www.jc100.org/
Note that some people have reported the BDK 1.1 demo's don't work
on Windows. This problem has been tracked down to a problem when
the bdk is installed into a directory with spaces
in the name like "program files".
Try reinstalling using a path containing no spaces if this is the case
for your installation.
A Java Servlet is some code behind a URL, similar to CGI.
When you browse the URL, it invokes the Java servlet code.
A servlet typically does stuff like read/write a database, and
then spits out HTML to send back to the browser.
A Java Server Page (JSP) is some code behind a URL, similar to
an open version of Microsoft's "Active Server Pages" (ASP).^M
When you browse the URL, it dynamically generates Java source, compiles
and invokes it on the fly to generate the HTML which is sent back
to the browser.
JSP files use the servlet framework and invoke Java beans.
See
http://www.klomp.org/gnujsp/ for the GNUJsp open source project,
a free JSP implementation.
The two volumes of "Java Class Libraries" by Chan, Lee and Krama
published by Addison Wesley, have extensive examples of how to
use the standard libraries.
One programmer comments "When I need to use an unfamiliar area of
the class libraries one of the first things I do is read their
examples."
You can see them online at
http://java.sun.com/docs/books/chanlee/second_edition/vol1/examples.html
and
http://java.sun.com/docs/books/chanlee/second_edition/examples.html
On a Solaris system, you can use the pkginfo command, like this:
There are these Java technology newsgroups:
Guava (a GPL'd Java compiler) can be found by a websearch.
Work is progressing on the Cygnus Java technology frontend to gcc. See
http://sourceware.cygnus.com/java/
http://www.transvirtual.com/
This is Tim Wilkenson's company devoted to commercializing the Kaffe
JVM for the embedded systems market. He also releases a version of
it under the GPL. It also comes with a the beginnings of a class library
and the Pizza compiler. In summer 1999 Transvirtual struck a deal with
Microsoft involving Kaffe. Everyone hopes this will not become another
path for Microsoft to spread what its employees call "polluted Java".
Another company operating in the same space is JSoft, at
http://www.jsoftinc.com/
http://www.javagame.net/
http://www.javaarcade.com/
Check out the pinball -- dig that crazy rhythm, man.
There are more good Java technology-enabled games applets at
http://www.frontiernet.net/~imaging/java_games.html
and at
http://www.gamesdomain.co.uk/GamesArena/
If you want to use Java technology to learn math & computer graphics, visit
http://www.frontiernet.net/~imaging/math_is_a_game.html
Another database written in Java is available from http://www.cloudscape.com/.
Another database written in Java is available from http://www.instantdb.co.uk/.
InstantDB is available free to non-commercial organizations, and
is very well documented and maintained. (Recommended!)
Finally, note that Sun's Java compiler is written in the Java
programming language. This is a really
big application in widespread use on millions of platforms. The compile
command "javac test.java" is equivalent to
java sun.tools.javac.Main test.java
javac has a script wrapper just to set the heap size as a
command line argument, as you can do in your own programs.
See the JavaBean FAQ at
http://java.sun.com/beans/faq/faq.general.html
pkginfo -l SUNWjvrt
It will give a reply like this:
PKGINST: SUNWjvrt
NAME: JavaVM run time environment
CATEGORY: system
ARCH: sparc
VERSION: 1.1.6,REV=1998.07.30.16.21
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
...etc
You may also try
java -fullversion
Although that's not an officially-supported command option, and
has gone away in JDK 1.2. Try also
java -version
comp.lang.java.beans
comp.lang.java.corba
comp.lang.java.databases
comp.lang.java.gui
comp.lang.java.help (it renamed comp.lang.java.setup)
comp.lang.java.machine (it renamed comp.lang.java.tech)
comp.lang.java.programmer (it renamed c.l.j.api and c.l.j.misc)
comp.lang.java.advocacy (argue all day with anonymous shills)
comp.lang.java.softwaretools
alt.comp.lang.java-games
New Java newsgroups are added every so often. Try not to
crosspost.