Eclipse launching Debugger has encountered a wrongly combined paths to an executable - eclipse

Eclipse problem occurred when I tried to launch debugger. I think that Eclipse tool wrongly combined the path to the executable file.
How to configure for '-exec-run' command in order that Eclipse can determine correct paths?

Related

Eclipse is not able to find sources during debug

I'm building my c/c++ application for arm controllers with gcc in a docker. There together with the .hex and .bin file also the .elf file is generated. Once generated they all are exported out from the container to the host machine. Now I would like to debug the application with openocd, arm-none-eabi-gdb and eclipse cdt. I'm able to start debug session on the target board, but when I stop the debugger (or it stops on its on at startup on main) it is not able to find the source files to show:
Can't find a source file at "/usr/src/Testbench/LIBS/Shell/shell.c"
The path here is the one of the build project in the docker container and has nothing to do with the new debug project on the host where all files are located now.
I tried to edit source lookup path in eclipse with no luck, I could find the file an then it worked for just that file. Also specifying the folders did not work. Anyway, doing it manually always for all files/folders in the project is not an option.
The solution should be "scripted" since all this is part of a CI/devops concept.
It seems that the "wrong" path is hard coded in the elf file. Is there a (scripted) way to change that path to match the actual project location so that eclipse and gdb just work as expected and the developper can see the debug info when debugging?
Possibly it should work on Linux and Windows ;-)
Thanks in advance for your help
Martin
Now it works! In eclipse in the debug configuration in the gdb commands I added :
set substitute-path /usr/src/ ${workspace_loc}
Then I had to go to the source lookup path in eclipse and remove everything.

problems with jar file in netbeans ide

I have done rfid reader program in netbeans ide, works fine. then,I created executable jar file by following the steps.
In the netbeans main window,
(i)select the properties under the project folder under properties > build >packaging then enter OK.
(ii)Select Run tab in main window then clean and build Main project.
After these steps, the executable jar file is created in documents> netbeansprojects>project name folder>dist.
I run the jar file from command prompt by
java -jar C:\Users\Holoteq-PC01\Desktop\RFID1\RFIDreader.jar
then i got the error as
Error: could not open C:\Program Files(x86)\Java\jre1.8.0_161\lib\i386\jvm.cfg
why the error comes like that?
i checked java location by where java then the response is
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\Windows\System32\java.exe
C:\Program Files\Java\jdk1.8.0_77\bin\java.exe
I read multiple questions pertaining to this issue,i tried almost but the error persists. Can anyone help me to resolve this issue.

Can't run tomcat server from eclipse

I can't run tomcat server from eclipse but tomcat work good if I run it using command line.
Here is the Error that appears in console:
Error: Could not find or load main class C:\Program Files\Java\jdk1.7.0_21.
What should I do to resolve the problem ?
I get this error when my JAVA_HOME environment variable doesn't match the java I'm running (typically found in my path), or Java wasn't installed correctly and the default classpath doesn't include java itself.
But mostly I think you have a path with a space in it, and Eclipse (and, to be fair, most java programs) doesn't work correctly with these paths. Move your Tomcat to a location without a space in the path and you should be able to run.
Please check the JVM path in eclipse.ini. It should be on the second line in the path (next line to '-vm'). Default value is from environment variable.
If you have multiple JVM in your machine, to have Eclipse point to the one of your choice, you can do it in this ini file. For example:
-vm
C:/Program Files/Java/jdk1.7.0_45/bin/javaw.exe
Hope this helps

Eclipse CDT doesn't run the program

I have written a small piece of code in C++(gui/wxWidgets) . It compiles/ links without any errors and produces an executable that when launched from command line opens the desired 'Hello World!' window, but when tried from within eclipse (menu, toolbar or ctrl-F11), it doesn't run. A quick error dialog appears/disappears before it can be read. After many runs I could make out that of the two msgs it displays, one reads something like "Looking for executables...". Apparently eclipse is unable to get to the executable in the Debug folder.
I tried a console application which runs without any issue from within eclipse as well.
My installation is indigo on Ubuntu 12.04.
Any ideas what could be the problem?
Problem resolved.
There was no Launch Configuration in Project Properties -> Run/Debug Settings.
Added one with defaults and it worked.

Setting up Pylint with PyDev

I have installed pylint via easy_install. I can run pylint <filename> with success. But pydev refuses to use it.
I checked "use pylint"
I configured correct path
I updated my python interpreter in eclipse to have pylit in pythonpath
I use Eclipse Galileo
I have build automatically checked
I tried cleaning whole project and no errors
What am I doing wrong?
I'm guessing you may need to mark the folder that contains your code as a source folder. You can do this under project properties.
Project->Properties->PyDev-PYTHONPATH
add relevant folders to the list of sources.
I've noticed that Pydev won't run Pylint on files with dashes (hyphens) the the filename; according to the Pydev devs, '-' is not a valid Python module name character, and it doesn't look like they intend to fix it:
http://sourceforge.net/tracker/index.php?func=detail&aid=1915426&group_id=85796&atid=577329
http://sourceforge.net/tracker/index.php?func=detail&aid=2888890&group_id=85796&atid=577332
As if nobody writes scripts in Python... Grumble grumble...
To provide an alternative solution, pylint can be used as an External Tool in Eclipse. This requires having previously installed the pylint package for a Python installation.
Remember to first have a pylintrc file somewhere where pylint can find it, failing which a "No config file found" error is printed. Typically I would touch pylintrc inside the project directory, and keep the file in version control. For reference, see pylint command-line options.
In Eclipse, select Run, External Tools, External Tools Configurations.... Click the toolbar button to create a New launch configuration. Configure as below or as desired:
Name: pylint
Location: ${system_path:pylint}
Working Directory: ${project_loc}
Arguments: --reports=n "${resource_loc}"
Remember to click inside an open file to switch focus to it before running the above external tool for it. Failing this, an error can occur.
The output of the external tool will by default be printed to the console.
Related: Setting up pep8 as an External Tool in Eclipse