Java Development Environment Release Notes
General Release Notes
- The javadoc program automatically creates HTML documentation
for Java classes from the source code. The HTML files that it creates
make use of various decorative images; these can be found in the
/usr/java/images
directory.
- The family of
exec()
methods in the
java.lang.Runtime
class all execute a system command,
possibly with arguments. This command must be a executable binary,
and its full path must be given. If not, the process forked by
java to run it will produce a core file. A non-zero exit value
will be returned from the Runtime.exec(...)
call and
execution will continue normally.
- Certain illegal constructs may cause javac to hang or
encounter an internal error:
- defining a class which
extends
itself
- defining a method with no return type
If this occurs, simply fix the error and rerun javac.
Native Code Development Release Notes
- The java executable currently uses the MIPS O32 ABI.
Therefore, all native code must also conform to the O32 ABI in order
to link and run correctly. This is the default ABI in compilation and
linking for all versions of IRIX before 6.4, but if you are running
IRIX 6.4, you must use the SGI C/C++ compilers'
-32
flag in your compilation and link commands when building native code
DSO's. For example, if javah produces a stub file
HelloWorld.c
and you provide native routine
implementations in HelloWorldImp.c
, you might use the
following commands to create a DSO libhello.so
:
cc -32 -I/usr/java/include -I/usr/java/include/irix -c HelloWorld.c
cc -32 -I/usr/java/include -I/usr/java/include/irix -c HelloWorldImp.c
ld -32 -shared HelloWorld.o HelloWorldImp.o -o libhello.so
which you could then load with the Java call:
System.loadLibrary("hello");
- If you access the fields of a Java object from both Java code and
C/C++ code (i.e., native methods), you should be aware that the
layouts of object member fields decided upon by the Java interpreter
and by your C/C++ compiler (from the header file generated by
javah) may not be identical. In particular, the Java
interpreter aligns everything on 4-byte boundaries, even 8-byte
data types such as
long
and double
, whereas
SGI C/C++ compilers will align these fields on 8-byte boundaries.
Workaround: For all classes that are manipulated by native
code, put all 8-byte fields at the beginning of the class definition,
or insert 4-byte padding fields (e.g., dummy int
fields)
just before them where necessary.
jdb Release Notes
- To evaluate a variable in your Java program:
- you must have compiled the Java source file with the
-g
option to javac, and
- if evaluation of a local variable is required, the current thread
must be stopped at a point where the variable is live; in other
words, the variable must have been given a value, and there must be a
possibility that that value will be used before it is changed.
Unless both of these are true, you will get the message "<not
in scope>".
- Currently, you can only evaluate symbols (for example, print
xyz or print this.abc). You cannot evaluate expressions.
- It is not possible to print the elements of multidimensional
arrays.
- If you use the "up" and "down" commands to
move around in the call stack of a suspended thread, the
"step", "next", and "return" commands
will all operate with respect to the selected stack frame; in other
words, execution will continue until control returns to that stack
frame and then the "step", "next", or
"return" will be performed.
- When running under jdb, it is not possible to set
breakpoints in native methods.
- In order to avoid a deadlock that would freeze your debugging
session, the Java interpreter will not allow the debugger to suspend a
thread which is in the process of using certain important Java runtime
system resources. This means that occasionally a "suspend"
command will be unsuccessful, for example, if a thread is performing
certain I/O operations. You can be sure of whether it has succeeded
by using the "where" or "threads" command.
- When debugging an applet, using the "Restart" item in
the appletviewer's menu may cause some applets to function
incorrectly. If you encounter this problem using jdb, you
must quit and restart jdb instead.
Demos
If you installed the java_dev.sw.demos
subsystem, then you have
two demo applets. Follow these links to see them if you are running a
web browser with Java support:
In order to view these in the appletviewer, you can do the following:
cd /usr/demos/java/Bounce
appletviewer index.html
cd /usr/demos/java/Impression
appletviewer imppaint.html
These demo directories are owned by the user demos
, so you
should either login as user demos
or copy them to a directory
where you have write permission if you want to be able to make changes,
recompile, etc.
Java and other Java-based names are trademarks of Sun Microsystems, Inc.,
and refer to Sun's family of Java-branded technologies. Sun, Sun Microsystems,
and the Sun Logo are trademarks or registered trademarks of Sun Microsystems,
Inc. in the U.S. and other countries.