简体   繁体   中英

Java SE Embedded in arm linux

According to ORACLE's doc Quick Start for Platform Developers I used Jrecreate and got JRE .

I copied JRE to my Arm Linux, cd ./bin and inputted java -version .

But terminal displayed: -sh:java:not found

Do I miss any Share Library?

If you want an executable from your current directory to be callable by name you need . to be included in your $PATH , which isn't the case by default due to security concerns. Otherwise you have to provide an absolute or relative path to the executable such as ./java .

Another solution, which is the most common for java and other language development tools / runtime environments, would be to include the absolute path to your Java install's bin directory in the $PATH so that you can run java from anywhere. This is often done by first setting a $JAVA_HOME environment variable, then including $JAVA_HOME/bin in your path :

export JAVA_HOME="/usr/bin/java/"  # or whatever your install path is
export PATH="$JAVA_HOME/bin:$PATH"

Either enter the location where your java executable actually is or add the java binary to your PATH environment variable.

If you read Oracles documentation , you need to do this after having run Jrecreate . (Please adapt destDir )

Recursively copy destDir from the host to the device directory where you want the JRE installed. For example:

 $ scp -r /tmp/SmallJRE/* root@target:/opt/local/ejdk<version>/ 

If necessary, update the device's PATH environment variable to include the bin/ directory of the JRE. For instance:

 $ PATH=$PATH:/opt/local/ejdk<version>/bin/ $ export PATH 

需要一些lib。并且我使用了不支持JRE的uclibc。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM