Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help in my first Doppio app #499

Open
jsfan3 opened this issue Aug 9, 2017 · 1 comment
Open

Help in my first Doppio app #499

jsfan3 opened this issue Aug 9, 2017 · 1 comment
Labels

Comments

@jsfan3
Copy link

jsfan3 commented Aug 9, 2017

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.

@jvilk jvilk added the question label Aug 9, 2017
@jvilk
Copy link
Member

jvilk commented Aug 10, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants