APIdia Launch Partner
Top Description Constructors Methods
com.sun.tools.javac

public Class Main

extends Object
Class Inheritance
Imports
java.io.PrintWriter

A legacy programmatic interface for the Java Programming Language compiler, javac. See the jdk.compiler module for details on replacement APIs.
Since
1.5

Constructor Summary

AccessConstructor and Description
public
Main()
Deprecated for removal since 16.

Do not call.

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

an integer equivalent to the exit value from invoking javac, see the man page for details.
compile
(String[]
The command line arguments that would normally be passed to the javac program as described in the man page.
args
)

Programmatic interface to the Java Programming Language compiler, javac.

public static int

Returns:

an integer equivalent to the exit value from invoking javac, see the man page for details.
compile
(String[]
The command line arguments that would normally be passed to the javac program as described in the man page.
args
,
PrintWriter
PrintWriter to which the compiler's diagnostic output is directed.
out
)

Programmatic interface to the Java Programming Language compiler, javac.

public static void
main(String[]
command line arguments
args
)

Main entry point for the launcher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Mainback to summary
public Main()

Deprecated

for removal since 16.

Do not call.

Annotations
@Deprecated
since:16
forRemoval:true

Method Detail

compileback to summary
public static int compile(String[] args)

Programmatic interface to the Java Programming Language compiler, javac.

Parameters
args:String[]

The command line arguments that would normally be passed to the javac program as described in the man page.

Returns:int

an integer equivalent to the exit value from invoking javac, see the man page for details.

compileback to summary
public static int compile(String[] args, PrintWriter out)

Programmatic interface to the Java Programming Language compiler, javac.

Parameters
args:String[]

The command line arguments that would normally be passed to the javac program as described in the man page.

out:PrintWriter

PrintWriter to which the compiler's diagnostic output is directed.

Returns:int

an integer equivalent to the exit value from invoking javac, see the man page for details.

mainback to summary
public static void main(String[] args) throws Exception

Main entry point for the launcher.

Note

This method calls System.exit.

Parameters
args:String[]

command line arguments

Exceptions
Exception:
only if an uncaught internal exception occurs; just retained for historical compatibility