Difference between revisions of "Java package"
From ArmadeusWiki
m |
|||
Line 18: | Line 18: | ||
− | ==Run a java | + | ==Run a java program== |
You can run your java program compiled for your host. | You can run your java program compiled for your host. |
Revision as of 21:18, 8 September 2011
How-To install java on the target and run a java program.
Install java packages GNU Classpath and JamVM
Add the GNU Classpath and JamVM to your target:
$ make menuconfig
Goto the buildroot packages and enable the Java package and from the java sub menu select both GNU classpath and JamVM packages. You have to rebuild a new rootfs et update your target
Warning: With releases after 3.4 of armadeus you have to activate the Classpath library first (packages->Libraries->Java->classpath) then Jamvm itself (packages->Interpreter languages..->jamvm) |
Run a java program
You can run your java program compiled for your host. Upload your jar, zip or class files to the target then use the jamvm command to run your program.
jamvm -jar myprog.jar
If your program requires some other libraries, you will have to install these on the target first or build your program to provide your code and these libraries.