digitalgust / miniJVM

Develop iOS Android app in java, Cross platform java virtual machine , the minimal jvm .
MIT License
328 stars 91 forks source link

Porting to web #11

Open Starcommander opened 2 years ago

Starcommander commented 2 years ago

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.

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:

digitalgust commented 2 years ago

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 commented 2 years ago

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.