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

Porting to web #11

Open
Starcommander opened this issue Jan 28, 2022 · 2 comments
Open

Porting to web #11

Starcommander opened this issue Jan 28, 2022 · 2 comments

Comments

@Starcommander
Copy link

Hello @digitalgust

I really like your minimalistic virtual machine.

So I tried to port your miniJVM to webassembly using emscripten.
Currently a lot of things are working fine.
You can try it out here:
https://java-on-web.org/examples/

But some features are still missing.

  • GC is disabled, because it blocks the browsers main-thread (exactly after 10 minutes).
  • Networking does not work, has to be modified.

Maybe you would like to look into my changes?
In future we can also merge the changes to the main project, if desired.

Additional ideas:

  • Allow to load a jar directly using an url link.
  • Add more java dependencies that can be loaded like java modules (java.base, java.xml, java.sql)
  • Add a javax.swing like wrapper that allows to load gui-projects without porting to miniJVM
  • Upgrade the jvm from java8 to javaXX .... 17?
@digitalgust
Copy link
Owner

Ha, I try the web miniJVM, it's great work ,
To merge it to main project is good idea,
To implemente those additional ideas is diffcult, the VM would going to much bigger than now.

@Starcommander
Copy link
Author

In the examples I can now load a jar via FileChooser directly from browser.
Also an url-link is implemented that loads the jar from different link, but works only internally.

For me the biggest drawback is, that only java8 is supported.
How much work may this cause, to support newer class-files?

Also I made 2 small pull-requests that are not WebAssembly-specific.

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

No branches or pull requests

2 participants