Three years ago (or so) I did experimental project named J-SMILE to prove that it is possible.
Main idea of it is simple – to create as small as possible Java (Virtual Machine) that can be attached to compiled Java bytecode (.class files).
Physically J-SMILE VM is an .exe file of size 200k. These 200k include:
- Waba VM extended to support Java 1.2 language specification pretty much in full – green threads, copying GC, float support.
- Set of native GUI functions (Graphics, Font, Window, etc).
- Special class loader capable to load class files from trailer – .class files packaged and attached to the end of the exe file of J-SMILE VM.
I have designed mini set of GUI primitives (Widgets) like listbox, editbox, etc. and created this simple demo application:
No JRE/VM version checks, no installation step needed, self-sufficient… Cool, eh?
And now goes the question: why all Java GUI solutions so monstrous and heavy?
Premature Generalization, eh? Got Deja Vu reading excellent Eric Gunnerson’s C# Compendium.