[英]Setting environmental variables for PlayonLinux
So I just installed android studio for PlayOnLinux and it was fine.所以我刚刚为 PlayOnLinux 安装了 android studio,它很好。 When I try to start it, it is looking for
JAVA_HOME
environmental variable to be set to the jdk.当我尝试启动它时,它正在寻找要设置为 jdk 的
JAVA_HOME
环境变量。
I have the jdk installed in my virtual windows directory as well as on linux.我在我的虚拟 Windows 目录和 linux 上安装了 jdk。 How do I set an environmental variable in PlayOnLinux?
如何在 PlayOnLinux 中设置环境变量?
I tried adding export JAVA_HOME=/jdk-installation
to .bash.sh
and /home/myUser/playonlinux-bash.sh
but neither did anything.我尝试将
export JAVA_HOME=/jdk-installation
到.bash.sh
和/home/myUser/playonlinux-bash.sh
但都没有做任何事情。 Is it somewhere in the GUI?它在 GUI 中的某个地方吗?
For future people trying to figure this out: I don't think /etc/profile affects PlayOnLinux... I finally found the correct file at对于未来试图弄清楚这一点的人:我认为 /etc/profile 不会影响 PlayOnLinux ...我终于在以下位置找到了正确的文件
/home/myUser/dosdevices/z:/usr/share/playonlinux/playonlinux
and added the并添加了
export JAVA_HOME=/home/myUser/.PlayOnLinux/wineprefix/java/drive_c/ProgramFiles/Java/jdk1.8.0_201
I have other problems running android studio but this is for anyone that wants to set environmental variables in PlayOnLinux我在运行 android studio 时遇到了其他问题,但这适用于想要在 PlayOnLinux 中设置环境变量的任何人
Open file /etc/profile
in edit mode在编辑模式下打开文件
/etc/profile
vim /etc/profile
Add below path添加以下路径
export JAVA_HOME="jdk-installation"
export PATH=$JAVA_HOME/bin:$PATH
Source the file for applying the change应用更改的源文件
source /etc/profile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.