Java on Yun?

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Java on Yun?

Post by splatten »

Is it possible install Java on the Yun?

I've had a look in the package manager:

opkg list | grep java

Nothing came up, I thought I'd seen references to using Java and I've read about JArduino being a java library. Is there a guide or FAQ on how to install Java on the Yun?

Thank you,
Simon Platten

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: Java on Yun?

Post by splatten »

Ok, found some information on JamVM, also using SSH:

Code: Select all

opkg list | grep jamvm
shows:

Code: Select all

jamvm - 1.6.0-git-2 - JamVM is a new Java Virtual Machine which conforms to the JVM specification version (blue book). In comparison to most other VM's (free  and commercial) it is extremely small.However, unlike other small VMs  (e.g. KVM) it is designed to support the full specification, and includes  support for object finalisation, Soft/Weak/Phantom References, the Java  Native Interface (JNI) and the Reflection API.
However when I try:

Code: Select all

opkg install jamvm
I get:

Code: Select all

Collected errors:
 * verify_pkg_installable: Only have 7316kb available on filesystem /overlay, pkg classpath needs 8634
 * opkg_install_cmd: Cannot install package jamvm.
I have an 8GB micro SD card inserted into the Yun, can I download the java virtual machine to the micro SD card?

Not a linux wizard, so any help would be gratefully received.

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: Java on Yun?

Post by splatten »


User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: Java on Yun?

Post by splatten »

Whilst I have now mounted the sda1 as /opt I still can't install jamvm onto the SD card, when I try to specify a destination I get error messages:

Code: Select all

Collected errors:
 * resolve_pkg_dest_list: Unknown dest name: `/opt/'.
How do I do this?

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: Java on Yun?

Post by splatten »

This was helpful:
http://forum.arduino.cc/index.php?topic=221148.0

Edited opkg.conf and added a mapping:

Code: Select all

dest sd /opt
Then I was able to install the jamvm onto the SD card using:

Code: Select all

opkg install jamvm -d sd

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: Java on Yun?

Post by splatten »

It would appear that the Yun keeps restarting, probably due to a watchdog? Is there a way to disable the watchdog or determine the reason for the reboot?

Thank you,

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”