A very simple FileHandler which allows to edit a snippet of simple Java source code and then dynamically compile and execute it.
For this to work, the variable ${JavaCodeSnippetEditor.JdkHome}
must refer to a JDK home directory for access to the javac compiler of
it. Usually a value of ${java.home}
will do the job, in case
this actually refers to a JDK and not only a JRE. If the given location
specifies the JRE within a JDK, this will be detected and the parent JDK
will be used automatically.
If custom classes apart form the standard Java platform classes are
required, a corresponding classpath can be specified in the variable
${JavaCodeSnippetEditor.Classpath}
and should name all the
required JAR files and directories. The classpath of the application or
the plugin are not included by default.
Note: no restrictions are being enforced on the thus compiled code. It can do virtually anything the JVM allows it to do. So care must be taken as to who may access this plugin to not compromise other configuration (security) goals!