szatkus / js2me

J2ME implementation in JavaScript
MIT License
136 stars 29 forks source link

How to run it on PC? #9

Open ghost opened 4 years ago

szatkus commented 4 years ago

It used to work just by opening index.html, but seems that's no longer the case. You have to host files by HTTP server and open it in a browser with src parameter pointing to some jar file. For example: http://localhost:8000/?src=jars/asteroids.jar

ghost commented 4 years ago

It used to work just by opening index.html, but seems that's no longer the case. You have to host files by HTTP server and open it in a browser with src parameter pointing to some jar file. For example: http://localhost:8000/?src=jars/asteroids.jar

Sorry for the late reply, but it won't work on Chrome.

danimesq commented 2 years ago

@szatkus

It used to work just by opening index.html, but seems that's no longer the case. You have to host files by HTTP server and open it in a browser with src parameter pointing to some jar file. For example: http://localhost:8000/?src=jars/asteroids.jar

Any new breaking change on browsers that did it?

@sfmemz An idea is to use js2me as an Electron app. I'll do an PR some day to implement it (same for KaiOS).

yell0wsuit commented 1 year ago

Sorry for the late reply, but it won't work on Chrome.

Install Python, run python -m http.server. Then visit the mentioned link. It'll work (though for some JARs they can't be run due to unimplemented functions).

Any new breaking change on browsers that did it?

It's a security feature, I think it has been enforced for like over 5 years. You're not allowed to use AJAX for file protocol.