-
Enhancement
-
Resolution: Fixed
-
P2
-
1.0, 1.1, 1.1.3, 1.2.0, 1.2.1, 1.3.1, 1.4.0, 1.4.2, 5.0, 6
-
b47
-
generic, x86, sparc
-
generic, solaris_2.5.1, solaris_8, windows_95, windows_98, windows_2000, windows_xp
-
Verified
Several types of Java applications use dynamically
generated and compiled code. The most obvious example
is a JSP web server.
Currently, the only way to compile dynamically
generated code is to:
1 - Make a temporary .java file and invoke javac
using Runtime.exec. This is rather inelegant and
prone to problems related to platform dependent
behavior for processes. Its also subject to
applet security restrictions.
2 - Hack the internals of javac and use the Java
interfaces. It works but its totally undocumented
and unsupported. It also doesn't allow you to use
a different vendor's compiler.
This feature is for a standard interface that
is available as a standard extension to Java.
That way you have a richer way to access the
compiler (if one is available) without forking a
new process or relying on undocumented features.
You also make it easy for the user to install a
different compiler without breaking the tools
that rely on it.
There are some requirements that the interface
should meet:
1 - Be simple to use.
2 - Be stream-based (not file-based). It should
accept an InputStream (or Reader) for the source
code and generate the class file on an OutputStream.
(Review ID: 36593)
======================================================================
###@###.### 10/26/04 21:05 GMT
- duplicates
-
JDK-4087072 eou: Development tools not 100% pure
-
- Closed
-
-
JDK-6224949 Implement JSR 199
-
- Closed
-
-
JDK-6176624 Don't use java.io.*Stream in javac
-
- Closed
-
-
JDK-4223289 Standard API to the JAVAC compiler
-
- Closed
-
-
JDK-4873959 Include ability to compile source code written compiled and linked at runtime
-
- Closed
-
-
JDK-4881253 JavaCompiler not easily extensible
-
- Closed
-
-
JDK-4921944 RFE:make a public wrapper for com.sun.javac.Main somewhere in java.compile
-
- Closed
-
-
JDK-4493863 javac: Allow in/output repositories (incl. databases) and in/out "hook" classes
-
- Closed
-
-
JDK-4625211 com.sun.tools.javac.v8.Main change in error output vs. com.sun.tools.javac.Main
-
- Closed
-
- relates to
-
JDK-4813736 API to compiler ASTs (aka Tree API)
-
- Closed
-
-
JDK-4287700 * Create an extended doclet API
-
- Closed
-
-
JDK-5025251 Support Simpler Javac Semantics: combine javac and jar in one operatio
-
- Closed
-
-
JDK-6296560 javac needs to emit better exit codes, especially for warnings, and needs docs
-
- Closed
-
-
JDK-6305490 Create programmatic interface to Jar service provider interface
-
- Closed
-