I have eclipse downloaded on one of my ubuntu machines. and now I want eclipse on my other ubuntu machine. how can I do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In the computer you have eclipse installed:
Backup the folder containing eclipse (usually it's in the /opt folder)
sudo cp -r /opt/eclipse /folder/to/backup/eclipse
In the one you want eclipse to be installed:
- Copy eclipse to the opt folder
sudo cp -r /backup/eclipse /opt/eclipse
- Add read permission to all files
chmod -R +r /opt/eclipse
- Add the executable bit to the eclipse binary
chmod +x /opt/eclipse/eclipse
- Add an executalbe entry to /usr/bin
sudo touch /usr/bin/eclipse
sudo chmod +x /usr/bin eclipse
- Edit the created file with your favourite editor.
sudo gedit -w /usr/bin/eclipse
and paste the following content:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
At this point you should be able to run eclipse
from command line, If you want to add a desktop entry, investigate how to do this in your desktop environment.