3

I just installed Eclipse Neon for ubuntu without using terminal , I unarchived it and ran the program and it installed like in windows. Now when I type eclipse in terminal it can't open it.

I am thinking that any software that is not installed using terminal can't be accessed from it, am I right?

It asks me to install eclipse by using sudo apt install eclipse-platform , which means Terminal otherwise my OS has no idea if any program named eclipse is already installed.

Anwar
  • 76,649
Sheldon_Cooper
  • 31
  • 1
  • 1
  • 2
  • Can you tell us how you installed Eclipse? What archive you downloaded and which program you ran and how? by double clicking or from terminal? – Anwar Aug 16 '16 at 17:12
  • I downloaded "eclipse-inst-linux64.tar.gz" from eclipse website and extracted it and ran the "eclipse-inst" and then a setup as in windows appeared and using GUI I installed eclipse. – Sheldon_Cooper Aug 16 '16 at 17:22
  • If the link above doesn't help, edit the question including what failed and didn't work – Anwar Aug 16 '16 at 17:26
  • Thanks , Anwar for the link. But still I have a doubt that when we don't install a software with terminal the terminal or OS have no idea that it is installed unlike windows. Is it true ? – Sheldon_Cooper Aug 17 '16 at 00:14
  • No, it's not true – Anwar Aug 17 '16 at 03:19
  • Hi, Sheldon ( looks like someone is Big Bang Theory fan ? ) If you install something, it is on disk , and therefore can be accessed via terminal. Also, your question title is unclear right now. It suggests you want to install eclipse, but really you already did and you want to find it from terminal – Sergiy Kolodyazhnyy Aug 27 '16 at 18:44
  • Also, can you provide the link to where i can get the .gz file ? – Sergiy Kolodyazhnyy Aug 27 '16 at 18:47
  • Nevermind, I found it – Sergiy Kolodyazhnyy Aug 27 '16 at 18:49

1 Answers1

4

N.B.: This answer provides example of my own values. Adjust to your own as necessary

In the beginning of installation, the installer prompts user for installation folder

enter image description here

In the screenshot , it will be placed into my ~/.eclipse/java-neon.

So in order to access eclipse from terminal, I have to add it to my PATH variable like so:

  1. Open ~/.bashrc with text editor
  2. add `$PATH=$PATH:/home/xieerqi/eclipse/java-neon/eclipse/eclipse
  3. save and exit.
  4. Run source ~/.bashrc in terminal

Now , if I run eclipse in terminal, it will be launched.

If you also would like to make it openable via Dash or Launcher, you will need to have a ~/.local/share/applications/eclipse.desktop file created

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/home/xieerqi/eclipse/java-neon/eclipse/eclipse
Icon=/path/to/icon
Terminal=false

Note that icon part is optional

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497