Re: OT - Tips for width constrained text
Joe Attardi wrote:
For a short, heady time, I actually had an on-line
compiler available to attach to on-line codes, and
compile them directly from a web page (with no
JRE/JDK on local PC).
How did that work, did you just give it the URL of some Java source code
stored online and it would fetch the text and compile it as if it were a
.java file?
Paste it* into an HTML form, select some (javac) options,
as well as versioning options (it could compile against
1.1 -> 1.4 rt.jars) click the 'Submit/Compile' button.
* The code needed to be an SSCCE** - no references
to other non J2SE classes.
The results page showed the formatted Java source
and either compilation errors, or an applet with a
button to launch it (sandboxed) or a link to the .jar
(for download, or standard app. run).
If I were to do it again, I might do it as a JWS app.,
with the various rt.jar's supplied lazily, but.. I am not
sure of my right to actually distribute the rt.jar's, and
the latest runtimes have become a significant wallop
to download, in any case.
Of course, the JWS option would require the end-user
to have a JRE installed, which the 'on-line' compiler did
not. ( But then, I always did wonder what the point of
developing Java, using a box that does not run it, could
be ;).
** I did consider something more like what what you
indicated, to get around the 'single source file' limitation.
Offer the user to upload a Zip/Jar archive containing
source, and do the compilation on all the source in the
archive. But with my paranoia about getting 100's of
kilobytes (or megabytes) of code dumped to the server,
I never bothered proceeding with it.
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200708/1