How Do I Select The Java 1.7 Cartridge In An IOx package.yaml File?

Cisco now supports IOx on some of their routers. This version of Linux supports PaaS applications which use pre-loaded cartridges. This is all explained on the Cisco Developer site in the IoT/IOx documentation section.

This handy script will do the trick:

#!/bin/bash
 for i in $(ioxclient cr list|grep IR800|awk '{print $2}')
 do
    ioxclient cr info $i | grep -A 25 'provides_info'|egrep ' "id.*urn| "version'
 done
With all the cartridges installed it currently outputs:
   "id": "urn:cisco:system:cartridge:language-runtime:java-se-embedded",
   "version": "1.7"
   "id": "urn:cisco:system:cartridge:baserootfs:yocto",
   "version": "1.7.2"
   "id": "urn:cisco:system:cartridge:language-runtime:python",
   "version": "2.7.3"
   "id": "urn:cisco:system:cartridge:language-runtime:java-se-embedded-cp3",
   "version": "1.8"

Use the last field of the id to select the cartridge in the .yaml file, for example, to select Java 1.7 use:

java-se-embedded

By the way, what does:

java-se-embedded-cp3

mean? "cp3" means, "compact profile 3". This profile omits some .jar files from the distribution making it smaller.