Java on OpenWrt/DD-WRT

拟墨画扇 提交于 2019-12-02 18:44:40
orftz

I've never done it, but it is definitively possible. You won't be able to run the full Java VM, only specialized versions of it (JamVM, PhoneME, SableVM). Also please be aware that running a Java VM is fairly a lot overhead for this kind of machine.

I won't get much in detail because others have already done it. Check out these links.


EDIT: SableVM is unmaintained.

EDIT: As Amigable Clark Kant mentioned, you could compile your Java code to native by using the GNU Compiler for Java.

Since your goal is to get the existing solution running on the router, and not explicitly get a JVM running on the router, I would suggest going the other way:

compile the Java code to native! This also has the potential to be just as fast a C code.

There is an article in Linux journal about this.

If not your cup of tea, JAMVM seems a better fit for a small system such as OpenWRT.

PeterMmm

I have done this on a Asus WL-HDD some time ago with SableVM. The WL-HDD can run Debian and connect some memory/hdd through USB. But performance was really bad.

Use the Embeded JRE these days. http://www.oracle.com/technetwork/java/embedded/overview/index.html

It also exists for ARM and not only for Intel architecture platforms.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!