0

So I've downloaded Eclipse IDE for Linux onto a usb flash drive, put the usb into the Raspberry Pi and tried to execute the eclipse application. It says that the file is executable but it still won't run.

After this happens though, the window just closes and nothing happens. I've even installed applications from the PiStore hoping that they would execute, but I still had no luck with it.

I use the Raspbian operating system.

  • Hello and welcome to rpi.sx! – user1129682 Sep 8 '15 at 6:23
3

For which hardware platform was the Eclipse binary built? Linux is just the operating system. You also have to discern the hardware platforms. There are different kinds:

PCs are usually based on Intel's x86 architecture, while embedded devices are mostly MIPS or ARM based.The binary has to match the hardware architecture. If your system is MIPS based, you need a binary for MIPS, and so on an so forth.

I would hazard a guess that your Eclipse binary was built for x86, because it is meant to be run on a usual desktop PC. IIRC the RPI is ARM based and therefore cannot run x86 binaries.

  • Eclipse contains native libraries (for the GUI) even though it is mostly written in Java. These needs to be compiled for the platform in question. There is an Eclipse 3.8.1 available through "sudo apt-get install eclipse" but it does not support Java 8. – Thorbjørn Ravn Andersen Jan 17 '17 at 11:29
1

At the moment you can't. There is no ARM version of Eclipse. Although Eclipse is Java based, for the UI uses SWT, that is written in native code (instead of AWT or Swing, that are part of Java). It would need to be recompiled and repackaged for ARM.

0

If you're on anything before the Pi2, forget it.

Eclipse is written in Java, hence you'll need a JRE (Java Runtime Environment) in order to run it. In a standard Raspbian this is available, but it doesn't seem to work out of the box.

Perhaps these links can help you:

How to install Oracle Java SE Embedded 7 on your RaspberryPi

Installing Oracle JDK 8 on Raspberry Pi

  • While eclipse requires java to function, the actual eclipse command is an ELF executable (don't ask me why), so even if you do have java installed, it may not work for the reasons explained in user1129682's answer. – goldilocks Oct 8 '15 at 11:33
  • Nonsense. Oracle Java 8 is installed by default on Raspbian. The problem is that the native libraries are for a different platform so Eclipse cannot run. – Thorbjørn Ravn Andersen Jan 17 '17 at 11:30
0

Is the binary of eclipse is Compatible for ARM platform. As we have x86 and x86_64 architectures same we have ARM architecture which needs a binary compiled for ARM. May be this is the reason it is not executing.

In my suggestion use apt-get install eclipse on Raspberry Pi. So that you will get the correct Package compatible for your device with out mess of dependencies.

Also to debug why it is not launching open terminal go to the location of the file by using : cd then do ./eclipse

Paste the output on that terminal

it will show you the error/log. that could help us more in debugging your issue.

0

Presumably that's the file browswer from LXDE, PCMan, and it is just being literal when it says a file is executable.

"Executable" on Unix style systems refers to a permission mode set on a file, as opposed to an intrinsic, abstract quality of the file content (which is what you perhaps were expecting). For example:

touch foobar
chmod a+x foobar

The new, empty (zero size) file foobar now has the exectuable bit set for all users (see man chmod). If instead you used chmod o+x foobar, it would only have that set for the owner; it would not be executable for other non-privileged users.

There are a few reasons for this pragmatic conception of "executable":

  • Security: Files can be set as not necessarily executable by anyone. This clarifies the concept of executable as being about permissions, and not a more technical abstract quality of the content. Just because you have permission to execute something does not mean it will ultimately work, and just because it might ultimately work does not mean it will for someone who doesn't have permission.
  • Files such as shell or python scripts, which are not compiled binaries with an entry point, (i.e., are not truly executable in a more abstract technical sense, what might be tagged .exe files on DOS derived systems1), but which can be executed by a system interpreter, can be marked as executable.

Note that the "technical, abstract quality" people may think of as executable is not obvious without examining a file's content, and even then is not guaranteed without actually trying it -- something it no filebrowser anywhere should/would do because it represents a serious security risk. Just because you plug a USB stick into a computer does not mean you want the OS to try and execute every file which claims to be executable, in order to tell you later for sure whether it is or not.

Further, that that abstract quality we may think of is still not what we often really mean by "executable", or at least would like our file browser to recognize as such (so it will, e.g., include scripts), even if we don't understand this distinction, which is why the permission mode is normally more of a pragmatic indicator.

In this case, as other people have pointed out, the reason that file won't execute is because it's not in the right format for the operating system. What happens when you try to do so depends on how you try to do -- processes are always children of other processes, and it is up to the parent, in this case PCMan, to do stuff like resolve any errors and report them to the user. However, it may have other priorities that account for why it won't always do so.

You can usually get a clue by running file on the file, which examines its content for indications of what the file is for.

file $(which file)

Runs file on itself, and on a Pi 2 will probably yield something starting /usr/bin/file: ELF 32-bit LSB executable, ARM, .... On a 32-bit ARM system running linux such a file could truly be executable (but the only way to tell if it really is to try it).

The output from file on that eclipse most likely has the ARM replaced with x86 (or x86-64 if it is also ELF 64-bit). The reason the file browser doesn't scan everything this way is that permission modes are the more normative methodology, and what someone experienced with the OS would expect it to report.


1. Using an .exe suffix is not really evidence that a file is executable either, although much like the permission bit in a *nix system, a DOS-esque OS may take it to mean that. You could copy that foobar file to a windows box, rename it foobar.exe, and the system will probably believe you even if actually executing the file will do nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.