Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Java on Yun?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Java on Yun?

by splatten on Fri Apr 18, 2014 1:34 pm

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

splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Re: Java on Yun?

by splatten on Fri Apr 18, 2014 3:10 pm

Ok, found some information on JamVM, also using SSH:
Code: Select all | TOGGLE FULL SIZE
opkg list | grep jamvm

shows:
Code: Select all | TOGGLE FULL SIZE
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 | TOGGLE FULL SIZE
opkg install jamvm

I get:
Code: Select all | TOGGLE FULL SIZE
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.

splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Re: Java on Yun?

by splatten on Fri Apr 18, 2014 3:57 pm


splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Re: Java on Yun?

by splatten on Fri Apr 18, 2014 4:32 pm

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 | TOGGLE FULL SIZE
Collected errors:
 * resolve_pkg_dest_list: Unknown dest name: `/opt/'.


How do I do this?

splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Re: Java on Yun?

by splatten on Fri Apr 18, 2014 4:37 pm

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

Edited opkg.conf and added a mapping:
Code: Select all | TOGGLE FULL SIZE
dest sd /opt


Then I was able to install the jamvm onto the SD card using:
Code: Select all | TOGGLE FULL SIZE
opkg install jamvm -d sd

splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Re: Java on Yun?

by splatten on Fri Apr 18, 2014 4:48 pm

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,

splatten
 
Posts: 426
Joined: Mon Mar 17, 2014 3:08 pm
Location: United Kingdom, Norwich

Please be positive and constructive with your questions and comments.