copy/transfer eclipse from one ubuntu(linux) machine to other

点点圈 提交于 2019-12-12 08:58:57

问题


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:

  1. Copy eclipse to the opt folder

sudo cp -r /backup/eclipse /opt/eclipse

  1. Add read permission to all files

chmod -R +r /opt/eclipse

  1. Add the executable bit to the eclipse binary

chmod +x /opt/eclipse/eclipse

  1. Add an executalbe entry to /usr/bin

sudo touch /usr/bin/eclipse

sudo chmod +x /usr/bin eclipse

  1. 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.



来源:https://stackoverflow.com/questions/15461716/copy-transfer-eclipse-from-one-ubuntulinux-machine-to-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!