plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).

Home Page:http://plasma-umass.github.io/doppio-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help in my first Doppio app

jsfan3 opened this issue · comments

Hello,
I followed the instructions to put Doppio inside a web page, but I wasn't able to run a jar in a web page: I get a blank page.

I attach my project (I omit java_home content because it's too big): what's wrong?
myapp.zip

Thank you very much for any help.

P.S.: Does the browser have to load all the java_home content (97 MB)? If it's so, I figure that it cannot be used in real world use cases.

Does the browser have to load all the java_home content (97 MB)? If it's so, I figure that it cannot be used in real world use cases.

DoppioJVM needs to load all of the classes that might be used at runtime. The 97MB java_home compresses into ~40MB. The DoppioJVM demo loads and decompresses a gzipped Java home into browser storage, so the user only needs to download the files once. I think this download is acceptable in certain scenarios.

It is possible to reduce java_home's size by removing components/classes your program does not use. Historically, this is hard to do in Java, although I believe that is changing in Java 9.

I wasn't able to run a jar in a web page: I get a blank page.

I haven't looked at your code yet, but I'm confused by your question!

When you add DoppioJVM to a webpage, it doesn't add any GUI components or anything. It's like any other JavaScript library; you need to integrate it with your webpage. If you expected a terminal interface, you'll need to build the DoppioJVM demo and use that.