Hi, Newbie to Linux but getting comfortable with it.
For kicks I experimented with creating a linux "executable" with Eclipse Oxygen on vmware Ubuntu virtual machine. Nothing to report there it creates a program in the IDE that if you click "run" it does just that,program executes.
However if I copy the program and its dependencies to another directory outside of Eclipse and run it it says the file could not be displayed. Its only a Hello World that just executed successfully in the IDE. When using Eclipse in windows you could run the .exe outside of IDE control as long as you had the DLLs.
Normally, when using Linux, the current directory is not included in the program search tree, for security purposes. You will need to tell the shell that the program is in the current directory by prefacing the program name with "./", ie: ./YourProgramName
xxxxuser@ubuntu:~/Desktop/test_linux_exe$ ./test_eclipse_on_linux_vm
bash: ./test_eclipse_on_linux_vm: No such file or directory
Ive looked at the apps properties and I don't see a filename extension(not that there should be one), but I can't get my hello world executed. I feel confident its looking in the correct directory.
The PATH is a colon-separated list of directories. When you give a "command" without path, the shell will check those directories in order, and if executable file is there, it will be "run".
Might consider adding the current directory to $PATH.
This is safer if you add the current directory to the very end of the path, and safer still if you're on a single-user system.
The worry is that you'll running a program you don't intend. A potential attack is to leave malicious shell scripts named ls or something in the filesystem.