Project

General

Profile

Java Runtime Environment for MitySOM1810f

Added by Hector Bojorquez over 7 years ago

Hi!

I would like to run some Java template programs in the MitySOM1810,
Have anybody done something like this before?

Thanks,

Hector


Replies (8)

RE: Java Runtime Environment for MitySOM1810f - Added by Jonathan Cormier over 7 years ago

I don't believe anyone has. A quick search of `opkg list` shows the availability of jamvm 1.5.5 which is apparently a lightweight java vm.

http://jamvm.sourceforge.net/

root@mityomapl138:~# opkg install jamvm
Installing jamvm (1.5.5+1.6.0-devel+git1+4617da717ecb05654ea5bb9572338061106a414d-r1) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/jamvm_1.5.5+1.6.0-devel+git1+4617da717ecb05654ea5bb9572338061106a414d-r1_armv5te.ipk.
Installing classpath (0.98-r1) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/classpath_0.98-r1_armv5te.ipk.
Installing libgmp10 (5.0.4-r0) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/libgmp10_5.0.4-r0_armv5te.ipk.
Installing classpath-common (0.98-r1) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/classpath-common_0.98-r1_armv5te.ipk.
Installing file (5.11-r0) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/file_5.11-r0_armv5te.ipk.
Configuring classpath-common.
Configuring libgmp10.
Configuring file.
Configuring classpath.
Configuring jamvm.
update-alternatives: Linking //usr/bin/java to /usr/bin/jamvm

root@mityomapl138:~# java -version
java version "1.5.0" 
JamVM version 1.6.0-devel
Copyright (C) 2003-2011 Robert Lougher <rob@jamvm.org.uk>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2,
or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Build information:

Execution Engine: inline-threaded interpreter with stack-caching
Compiled with: gcc 4.5.4 20120305 (prerelease)

Boot Library Path: /usr/lib/classpath
Boot Class Path: /usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip

RE: Java Runtime Environment for MitySOM1810f - Added by Jonathan Cormier over 7 years ago

Note that java version 1.5 is very old. You may have to build jamvm manually to get something more update.

RE: Java Runtime Environment for MitySOM1810f - Added by Hector Bojorquez over 7 years ago

Thanks Jonathan,

Do you think that could be possible to have some compatibility with the JRE from JDK for ARM microprocessors?

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Hector

RE: Java Runtime Environment for MitySOM1810f - Added by Jonathan Cormier over 7 years ago

According to this bug report, the "Linux ARM 32 Hard Float ABI" only supports ARMv7 instructions. The L138 is a ARM9 which uses ARMv5 instructions. It also mentions their used to be a "Linux ARM 32-bit Soft Float ABI" version which would probably work.

https://bugs.openjdk.java.net/browse/JDK-8146483

This download page claims to support ARMv5. Good luck
http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html

RE: Java Runtime Environment for MitySOM1810f - Added by Bob Duke over 7 years ago

If you go down the Oracle route, the package Jon mentioned is used to generate the JRE (Java Runtime Environment) you will need.

The following URLs document the process:

This page shows how to install the Embedded Java tools on your host platform (after downloading at the link Jon provided):
http://docs.oracle.com/javase/8/embedded/develop-apps-platforms/installing.htm
(Note: for a GNU/Linux distribution like Fedora, JAVA_HOME=/etc/alternatives/java_sdk_1.8.0)

Then, you need to create the JRE using jrecreate.sh:
http://docs.oracle.com/javase/8/embedded/develop-apps-platforms/jrecreate.htm
(Note: the JRE creation is relatively quick: minutes, not hours)

Finally, you deploy the JRE to the target (ARM9) board:
http://docs.oracle.com/javase/8/embedded/develop-apps-platforms/deploy-embedded-jre.htm

RE: Java Runtime Environment for MitySOM1810f - Added by Hector Bojorquez over 7 years ago

Hi,

Thank you both for these great info, I will try to generate the JRE.
I will let you know about the results.

regards!

Hector

RE: Java Runtime Environment for MitySOM1810f - Added by Hector Bojorquez over 7 years ago

I have news,

I got some help from a friend that use to work with Raspberry pi and we took other way, we just downloaded the JAVA SE EMBEDDED the version that you recommended me

(ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2), then we looked for the JRE folder in the downloaded package and after that we copied it to the MitySOM SD Card.

We made some tests running a very simple web server, a .jar file, and it worked well. So the MitySOM is now able to be running a .jar Java files!

Please tell me if this process is kind of a bad practice or maybe we will have future problems because of that process?

Thanks again!

Héctor

RE: Java Runtime Environment for MitySOM1810f - Added by Bob Duke over 7 years ago

Hector,

I'm glad you got it working. I'm not sure the exact difference between what you did and the official instructions, but it may be that your "direct copy" approach may not have brought over all of the libraries or extensions that you may need for some applications.

I recommend you continue to test your app on the MitySOM to make sure you JRE will not cause any problems. If you do discover that something is missing, you can follow the instructions in my previous post to build the full JRE.

-Bob

    (1-8/8)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)