Introduction

This document gives an overview of the definition of 100% Pure Java and the tool which tests Java programs and applets for purity, JavaPureCheck.

The Java Pure Check program scans the class files of your Java program, informing you of possible portability problems in your program.


Problem severity

Portability problems are classified into three severity levels:

Pure
No portability problem; pure Java.
Warning
Warning of a likely portability problem. A warning must be accompanied by an explanation in order to meet the certification criteria for 100% Pure Java.
Error
An unequivocal portability problem. The only acceptable explanation for an error is a reference to a variance granted by JavaSoft.

Problems detected

There are several sources of portability problems, with various degrees of severity.

Undefined references
An incomplete program cannot, obviously, be completely checked. It will be reported as an error, as that is the most conservative estimate of what might be in the missing class files.
Method references
Class files are examined to find out which methods they refer to. Some references might have warnings or errors attached.
Hard-coded path
Java Pure Check checks the String constants in your program, looking for any that resemble hard-coded file path names.
This is a warning. The required explanation is a description of how String is used; for example, `URL'.
Injects to system
A portable program may not insert classes into the Java core library (packages whose names start with java.). This is an error.
Native method
Pure Java programs may not define or depend on native (that is, platform-specific) code. This is an error.

Explanations

An explanation must be given for all warnings and errors generated by Java Pure Check.

For an error, the only acceptable explanation is a variance granted by JavaSoft. The variance should be cited by case number, as provided by JavaSoft; the case number will be used to look up the variance in the variance list furnished by JavaSoft.


Method and class references with errors

sun.security.pkcs : all classes and methods in this package
"Undocumented internal package"
void java.lang.System.load(java.lang.String)
"Not portable"
void java.lang.System.loadLibrary(java.lang.String)
"Not portable"
java.awt.LightweightPeer : all methods in this class
"Undocumented internal interface"
sun.tools.native2ascii : all classes and methods in this package
"Undocumented internal package"
sun.rmi.registry : all classes and methods in this package
"Undocumented internal package"
sun.awt.image : all classes and methods in this package
"Undocumented internal package"
sun.jdbc.odbc : all classes and methods in this package
"Undocumented internal package"
sun.rmi.transport.proxy : all classes and methods in this package
"Undocumented internal package"
sun.rmi.rmic : all classes and methods in this package
"Undocumented internal package"
sun.net.www.http : all classes and methods in this package
"Undocumented internal package"
sun.audio : all classes and methods in this package
"Undocumented internal package"
sun.tools.asm : all classes and methods in this package
"Undocumented internal package"
sun.rmi.server : all classes and methods in this package
"Undocumented internal package"
sun.tools.serialver : all classes and methods in this package
"Undocumented internal package"
sun.net.www.httpd : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.verbatim : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.http : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.systemresource : all classes and methods in this package
"Undocumented internal package"
sun.io : all classes and methods in this package
"Undocumented internal package"
sun.awt.tiny : all classes and methods in this package
"Undocumented internal package"
sun.applet.resources : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.gopher : all classes and methods in this package
"Undocumented internal package"
sun.tools.tree : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.ftp : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.doc : all classes and methods in this package
"Undocumented internal package"
sun.tools.ttydebug : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.file : all classes and methods in this package
"Undocumented internal package"
sun.security.util : all classes and methods in this package
"Undocumented internal package"
sun.rmi.transport.tcp : all classes and methods in this package
"Undocumented internal package"
java.lang.Process java.lang.Runtime.exec(java.lang.String[], java.lang.String[])
"Not portable"
void java.lang.Runtime.loadLibrary(java.lang.String)
"Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String)
"Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String[])
"Not portable"
void java.lang.Runtime.load(java.lang.String)
"Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String, java.lang.String[])
"Not portable"
sun.awt.motif : all classes and methods in this package
"Undocumented internal package"
sun.security.provider : all classes and methods in this package
"Undocumented internal package"
sun.awt : all classes and methods in this package
"Undocumented internal package"
java.lang.UNIXProcess : all methods in this class
"Undocumented internal interface"
sun.net.www : all classes and methods in this package
"Undocumented internal package"
sun.misc : all classes and methods in this package
"Undocumented internal package"
sun.security.x509 : all classes and methods in this package
"Undocumented internal package"
sun.tools.javap : all classes and methods in this package
"Undocumented internal package"
sunw.io : all classes and methods in this package
"Undocumented internal package"
sun.tools.javac : all classes and methods in this package
"Undocumented internal package"
sun.net.www.content.image : all classes and methods in this package
"Undocumented internal package"
sun.tools.util : all classes and methods in this package
"Undocumented internal package"
sun.tools.jar : all classes and methods in this package
"Undocumented internal package"
sun.net.nntp : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.appletresource : all classes and methods in this package
"Undocumented internal package"
java.awt.peer : all classes and methods in this package
"Should only be used when implementing AWT"
sun.net.www.content.text : all classes and methods in this package
"Undocumented internal package"
java.lang.ProcessInputStream : all methods in this class
"Undocumented internal interface"
sun.tools.javadoc : all classes and methods in this package
"Undocumented internal package"
sun.tools.java : all classes and methods in this package
"Undocumented internal package"
sun.net.smtp : all classes and methods in this package
"Undocumented internal package"
sun.net.ftp : all classes and methods in this package
"Undocumented internal package"
sun.beans.infos : all classes and methods in this package
"Undocumented internal package"
sun.security.acl : all classes and methods in this package
"Undocumented internal package"
sun.rmi.transport : all classes and methods in this package
"Undocumented internal package"
sun.beans.editors : all classes and methods in this package
"Undocumented internal package"
sun.net : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.netdoc : all classes and methods in this package
"Undocumented internal package"
sun.net.www.protocol.mailto : all classes and methods in this package
"Undocumented internal package"
sun.applet : all classes and methods in this package
"Undocumented internal package"

Method and class references with warnings

java.lang.String java.lang.System.getenv(java.lang.String)
"Not meaningful on all platforms"
java.lang.Class java.lang.Class.forName(java.lang.String)
"May load impure class"
java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int)
"May define impure class"
java.lang.Class java.lang.ClassLoader.defineClass(byte[], int, int)
"May define impure class"
java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
"May define impure class"

Methods and classes by name

sun.security.pkcs
method reference:error "Undocumented internal package"
void java.lang.System.load(java.lang.String)
method reference:error "Not portable"
void java.lang.System.loadLibrary(java.lang.String)
method reference:error "Not portable"
java.lang.String java.lang.System.getenv(java.lang.String)
method reference:warning "Not meaningful on all platforms"
java.awt.LightweightPeer
method reference:error "Undocumented internal interface"
sun.tools.native2ascii
method reference:error "Undocumented internal package"
sun.rmi.registry
method reference:error "Undocumented internal package"
sun.awt.image
method reference:error "Undocumented internal package"
sun.jdbc.odbc
method reference:error "Undocumented internal package"
sun.rmi.transport.proxy
method reference:error "Undocumented internal package"
sun.rmi.rmic
method reference:error "Undocumented internal package"
sun.net.www.http
method reference:error "Undocumented internal package"
sun.audio
method reference:error "Undocumented internal package"
sun.tools.asm
method reference:error "Undocumented internal package"
sun.rmi.server
method reference:error "Undocumented internal package"
java.lang.Class java.lang.Class.forName(java.lang.String)
method reference:warning "May load impure class"
sun.tools.serialver
method reference:error "Undocumented internal package"
sun.net.www.httpd
method reference:error "Undocumented internal package"
sun.net.www.protocol.verbatim
method reference:error "Undocumented internal package"
sun.net.www.protocol.http
method reference:error "Undocumented internal package"
sun.net.www.protocol.systemresource
method reference:error "Undocumented internal package"
sun.io
method reference:error "Undocumented internal package"
sun.awt.tiny
method reference:error "Undocumented internal package"
sun.applet.resources
method reference:error "Undocumented internal package"
sun.net.www.protocol.gopher
method reference:error "Undocumented internal package"
sun.tools.tree
method reference:error "Undocumented internal package"
sun.net.www.protocol.ftp
method reference:error "Undocumented internal package"
sun.net.www.protocol.doc
method reference:error "Undocumented internal package"
sun.tools.ttydebug
method reference:error "Undocumented internal package"
sun.net.www.protocol.file
method reference:error "Undocumented internal package"
sun.security.util
method reference:error "Undocumented internal package"
sun.rmi.transport.tcp
method reference:error "Undocumented internal package"
java.lang.Process java.lang.Runtime.exec(java.lang.String[], java.lang.String[])
method reference:error "Not portable"
void java.lang.Runtime.loadLibrary(java.lang.String)
method reference:error "Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String)
method reference:error "Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String[])
method reference:error "Not portable"
void java.lang.Runtime.load(java.lang.String)
method reference:error "Not portable"
java.lang.Process java.lang.Runtime.exec(java.lang.String, java.lang.String[])
method reference:error "Not portable"
sun.awt.motif
method reference:error "Undocumented internal package"
sun.security.provider
method reference:error "Undocumented internal package"
sun.awt
method reference:error "Undocumented internal package"
java.lang.UNIXProcess
method reference:error "Undocumented internal interface"
sun.net.www
method reference:error "Undocumented internal package"
sun.misc
method reference:error "Undocumented internal package"
sun.security.x509
method reference:error "Undocumented internal package"
sun.tools.javap
method reference:error "Undocumented internal package"
sunw.io
method reference:error "Undocumented internal package"
sun.tools.javac
method reference:error "Undocumented internal package"
sun.net.www.content.image
method reference:error "Undocumented internal package"
sun.tools.util
method reference:error "Undocumented internal package"
sun.tools.jar
method reference:error "Undocumented internal package"
sun.net.nntp
method reference:error "Undocumented internal package"
sun.net.www.protocol.appletresource
method reference:error "Undocumented internal package"
java.awt.peer
method reference:error "Should only be used when implementing AWT"
sun.net.www.content.text
method reference:error "Undocumented internal package"
java.lang.ProcessInputStream
method reference:error "Undocumented internal interface"
sun.tools.javadoc
method reference:error "Undocumented internal package"
sun.tools.java
method reference:error "Undocumented internal package"
sun.net.smtp
method reference:error "Undocumented internal package"
sun.net.ftp
method reference:error "Undocumented internal package"
sun.beans.infos
method reference:error "Undocumented internal package"
sun.security.acl
method reference:error "Undocumented internal package"
sun.rmi.transport
method reference:error "Undocumented internal package"
sun.beans.editors
method reference:error "Undocumented internal package"
sun.net
method reference:error "Undocumented internal package"
sun.net.www.protocol.netdoc
method reference:error "Undocumented internal package"
java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int)
method reference:warning "May define impure class"
java.lang.Class java.lang.ClassLoader.defineClass(byte[], int, int)
method reference:warning "May define impure class"
java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
method reference:warning "May define impure class"
sun.net.www.protocol.mailto
method reference:error "Undocumented internal package"
sun.applet
method reference:error "Undocumented internal package"