EnglishFrenchSpanish

Ad


OnWorks favicon

japicompat - Online in the Cloud

Run japicompat in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command japicompat that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


japicompat - Test Java APIs for binary backwards compatibility.

SYNOPSIS


japicompat [-svqhtjw4] [-o outfile] [-i ignorefiles] <original_api> <api_to_check>

DESCRIPTION


japicompat is part of japitools, designed to test for compatibility between Java APIs.

They were originally designed for testing free implementations of Java itself for
compatibility with Sun's JDK, but they can also be used for testing backward compatibility
between versions of any API.

The tools are japize and japicompat. Japize is a Java program which emits a listing of an
API in a machine-readable format. Japicompat then takes two such listings and compares
them for binary compatibility, as defined by Sun in the Java Language Specification.

OPTIONS


-s disable additional binary compatibility checks (only do checks defined by the JLS).

-v enable checks for minor compatibility problems.

SerialVersionUID checking: japicompat reports a minor error if a Serializable class
has a different SerialVersionUID between the two releases.

Deprecation checking: japicompat reports a minor error if a class or member was
deprecated in the original API but is not deprecated in the API being checked.

-q disables progress reports.

-h generates output in HTML format. The HTML files produced depend on the japi.css
file to get attractive presentation.

-t generates output in text format. This is the default.

-j generates output in raw machine readable form. The format produced is called
"japio" format, and by convention should be saved with a ".japio" file extension.
The standalone japiotext and japiohtml utilities can be used to convert this format
into html or text (actually, japicompat calls japiotext or japiohtml internally if
the -h or -t flags are used). Japio files can also be used with the -i flag to
support ignoring errors caused by incompatibilities between JDK versions.

-w disable warnings for running against old buggy japi files. By default japicompat
will produce warnings if run against japi files originally generated by older
versions of japitools that had known bugs that japifix cannot eliminate.

-4 use 1.4-compatible mode. This works as long as the APIs to compare does not contain
1.5-only items.

-o <outfile>
Send the output to <outfile> instead of stdout. The format of this file depends on
the -h, -t and -j flags.

-i <ignorefiles>
Suppose you are attempting to implement the Java API. You have (pretty much)
completed coverage of the early JDK versions (1.0 and 1.1) but still have some
distance to achieve full coverage of 1.4 (this is an accurate description of all
Free Software Java implementations at the time of writing). Using japicompat to
compare your implementation with JDK 1.4 gives accurate results, but you might also
want to show your coverage of the earlier versions.

Unfortunately Sun has not followed their own binary compatibility rules between JDK
releases, let alone the expanded rules that japicompat tests for. So when you run a
comparison between JDK 1.1 and your implementation, you will get spurious error
reports when you're compatible with 1.4 but not 1.1.

Obviously what you really want is to ignore errors like this, and japicompat
provides a way to do so. First, run a comparison between 1.1 and 1.4 using the -j
switch. Then run the comparison between 1.1 and your implementation, passing the
"-i" option with the output of the previous run. For example:

$ japicompat -jo ignore-11-14.japio jdk11.japi.gz jdk14.japi.gz
$ japicompat -ho jdk11-myimpl.html -i ignore-11-14.japio jdk11.japi.gz
myimpl.japi.gz

You can also get the same effect by running:

$ japicompat -ho jdk11-myimpl.html -i jdk14.japi.gz jdk11.japi.gz myimpl.japi.gz

This is obviously simpler and quicker to type, but requires the comparison between
jdk11 and jdk14 to be run every single time. Making the japio file manually allows
for it to be saved and used again the next time, which lets japicompat run about
twice as fast.

<original_api> <api_to_check>
The japi files corresponding to the APIs to be compared.

japicompat specifically tests that the second argument is backwardly-compatible
with the first. Therefore, a perfect implementation of JDK 1.1 would produce no
errors regardless of the order of the arguments, but a perfect implementation of
JDK1.1 plus parts of JDK1.2 should be tested as follows:

$ japicompat jdk11.japi.gz myimpl.japi.gz
$ japicompat myimpl.japi.gz jdk12.japi.gz

It is probably impossible to make an implementation that passes both these tests,
since Sun's own JDK1.2 produces numerous errors when tested against JDK1.1. See the
discussion of the -i option above for a way to cope with this situation.

Either compressed (.japi.gz) or uncompressed (.japi) files can be passed to
japicompat: The file extension is used to determine whether or not to pipe input
through gzip or not.

Use japicompat online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    DivFix++
    DivFix++
    DivFix++ is yours AVI video repair and
    preview software. It designed for repair
    and preview files which are on download
    from ed2k(emule), torrent, gnutella, ftp...
    Download DivFix++
  • 2
    JBoss Community
    JBoss Community
    Community driven projects featuring the
    latest innovations for cutting edge
    apps. Our flagship project JBoss AS is
    the leading Open Source,
    standards-compliant...
    Download JBoss Community
  • 3
    Django Filer
    Django Filer
    django Filer is a file management
    application for django that makes
    handling files and images a breeze.
    django-filer is a file management
    application for djang...
    Download Django Filer
  • 4
    xCAT
    xCAT
    Extreme Cluster Administration Toolkit.
    xCAT is a scalable cluster management
    and provisioning tool that provides
    hardware control, discovery, and OS
    diskful/di...
    Download xCAT
  • 5
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 6
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • More »

Linux commands

Ad