简体   繁体   中英

Is Java running well in BeagleBone Black( or Raspberry Pi)?

My project is to run a web server in little computer such as BeagleBone Black or Raspberry Pi.

My question is which language is preferred, Java or C++? My plan is to run a tomcat and write a web server by using Java.

I heard lot of people are talking about the poor performance of Java running in such embedded system such as BeagleBone Black. Does Java really have worse performance than running C++?

Any thought is appreciated. Thanks

There is a java made for the ARM release (the architect BBB runs on). That java version is made by Oracle, and contains closed sourced libraries not available for the public.

The main complaints I have read about have been about OpenJDK java on the BBB due to that it's open source and doesn't have the ARM specific code and thus is a general one size fits all java solution which is about 4 or 5 times slower then the Oracle java.

In terms of C++, any java code will be slower then C++. This is due to that C++ code is complied for a specific board (this video helps to explain) and thus runs only on that specific board, while java even though have specific versions available for the JRE, the jar through the JDK is compiled to be non board specific and thus is not as fast as code that is already compiled for a specific board.

Lastly with all that said the preferred language depends on what you want to do and any official support provided by the manufacturer. The BBB seems to suggest none and leaves it up to the user. Therefore the best idea is to run a benchmark test and see which performs best to your needs.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM