Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法让Java在Ostro上运行_Java_Yocto - Fatal编程技术网

无法让Java在Ostro上运行

无法让Java在Ostro上运行,java,yocto,Java,Yocto,我从当前的repo中构建了一个Ostro映像,并在14.04 Ubuntu机器上构建了它。我已成功地将其安装在具有intel i7-64位体系结构的目标计算机上。根据我的观点,Java应该与此一起打包,但是当我在命令行(在目标内部)键入Java-version时,我发现Java命令未找到。如何克服这一点,我错过了什么。请考虑我在这个场景中的新手(第一次闪动操作系统),我也不确定如何用这个问题添加想要的标签,因为这不是一个问题,我很确定我缺少了一些东西。我只需要一个向导就可以开始了 这里还有我的b

我从当前的repo中构建了一个Ostro映像,并在14.04 Ubuntu机器上构建了它。我已成功地将其安装在具有intel i7-64位体系结构的目标计算机上。根据我的观点,Java应该与此一起打包,但是当我在命令行(在目标内部)键入Java-version时,我发现Java命令未找到。如何克服这一点,我错过了什么。请考虑我在这个场景中的新手(第一次闪动操作系统),我也不确定如何用这个问题添加想要的标签,因为这不是一个问题,我很确定我缺少了一些东西。我只需要一个向导就可以开始了

这里还有我的bblayers.conf

# The following layers are available in the combined repository.
# Their recipes are filtered via white-listing in ostro.conf,
# i.e. even if the layer gets added, only explicitly listed recipes
# are enabled. Enable layers here only if they have enabled recipes
# to avoid warnings about empty layers.

# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-efl"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-filesystems"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-gnome"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-gpe"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-initramfs"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-multimedia"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-networking"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-oe"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-perl"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-python"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-ruby"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-systemd"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-webserver"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-xfce"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/toolchain-layer"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-java"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-soletta"

BBLAYERS ?= "${OSTRO_LAYERS}"

# toaster uses this hint to decide whether it let's the user
# remove a layer from BBLAYERS. All layers which provide something
# that is required to build ostro-image should be listed here.
# We do not really track that, so add all layers also here.
BBLAYERS_NON_REMOVABLE ?= "${OSTRO_LAYERS}"
在以下答案中添加建议部分后,我得到:

ERROR: Nothing RPROVIDES 'classpath-tools' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-tools' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-tools']
ERROR: Nothing RPROVIDES 'cacao' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: cacao was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'cacao' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['cacao']
ERROR: Nothing RPROVIDES 'classpath' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: classpath was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'classpath' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath']
ERROR: Nothing RPROVIDES 'jamvm' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: jamvm was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'jamvm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['jamvm']
ERROR: Nothing RPROVIDES 'classpath-examples' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-examples' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-examples']
ERROR: Nothing RPROVIDES 'openjdk-8-vm-jamvm' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'openjdk-8-vm-jamvm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['openjdk-8-vm-jamvm']
ERROR: Nothing RPROVIDES 'openjdk-8-vm-cacao' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'openjdk-8-vm-cacao' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['openjdk-8-vm-cacao']
ERROR: Nothing RPROVIDES 'shadowopenjdk-8-jre' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'shadowopenjdk-8-jre' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['shadowopenjdk-8-jre']
ERROR: Nothing RPROVIDES 'ostro-image-noswupd'
ERROR: No eligible RPROVIDERs exist for 'ostro-image-noswupd'
NOTE: Runtime target 'ostro-image-noswupd' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['ostro-image-noswupd']
ERROR: Nothing RPROVIDES '\' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target '\' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['\\']
ERROR: Nothing RPROVIDES 'classpath-common' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-common' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-common']

您的rootfs中似乎没有安装java。您必须在build/conf/local.conf中包含以下行才能启用它

# Possible provider: cacao-initial-native and jamvm-initial-native 
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"

# Possible provider: cacao-native and jamvm-native
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"

# Optional since there is only one provider for now  
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
您还需要根据需要在build/conf/local.conf中添加一些图像。这些是可选的。您可以根据自己的要求进行修改

IMAGE_INSTALL_append = " openjdk-7-jre \
openjdk-7-vm-jamvm \
openjdk-7-vm-cacao \
classpath \
classpath-common \
classpath-examples \
classpath-tools \
jamvm \
cacao \
"

第二部分到哪里去了?我在build/conf.conf下的local.conf中有第一个,我已经试了两天了,有没有其他方法可以安装Java?在OS部署之后,第二部分也将进入build/conf/local.conf。如何事先知道哪些包将进入构建?有什么命令可以验证这一点吗?如果您成功地将一个好的包管理器安装到像apt-get这样的rootfs中,那么您也可以在操作系统部署后安装java,就像在ubuntuI的情况下一样,猜测类路径配方必须在meta java层中。使用find meta java | grep-i“classpath”进行检查。必须有一个类路径*.bb