facebook

source not found when debugging plain java application

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #297314 Reply

    jadeite1000
    Member

    Hi:

    I am using Myeclipse 7.0
    Build Id;7.0-20081201.

    I created a simple java application project called page50. This is not a web application.
    I created a java class file called test1.java. I right click on it and choose menu “Debug As” and choose “Debug Configurations.” In the “Main” tab, I make sure the Project:Page50
    Main class:test1. I toggle a breakpoint in the java class file.

    I checked the following checkbox:
    Include system libraries when searching for a main class
    Include inherited mains when searching for a main class
    Stop in main.

    When I right click on “Debug as” and choose “Java Application” I get the following error:

    Source not found.
    Edit Source Lookup Path..

    I click on the button “Edit Source Lookup Path..”
    In the Source Lookup Path I see the following:
    Page50
    Default

    I see my project “Page50” in the Source Lookup Path. What am I doing wrong.

    Yours,

    Frustrated.

    #297338 Reply

    rmcvay
    Member

    Do you have a main() in your class? Why are you searching system and inherited mains?

    #297353 Reply

    jadeite1000
    Member

    @rmcvay wrote:

    Do you have a main() in your class? Why are you searching system and inherited mains?

    Hi:

    I have a main in my class file.
    In myEclipse 7, I unchecked the following checkbox:
    Include system libraries when searching for a main class
    Include inherited mains when searching for a main class
    Stop in main.

    I still get the error “Source not found.”

    I download the latest version of eclipse and I import from the same jar and java files from the project I created in MyEclipse 7.0 I donot have this problem when debuggin the java file that the “Source not found.” Is there something I set in MyEclipse’s project that cause this problem.

    Yours,

    Frustrated.

    #297409 Reply

    rmcvay
    Member

    I import from the same jar and java files from the project

    You have a supporting jar? I did a little one class java project and it debugged fine but maybe your project is a little more complex than that.

    #297587 Reply

    jadeite1000
    Member

    @rmcvay wrote:

    I import from the same jar and java files from the project

    You have a supporting jar? I did a little one class java project and it debugged fine but maybe your project is a little more complex than that.

    Hi All:

    I tried another way. I
    I created a project in eclipse and was able to debug the java code.
    I copy the project to another workspace and import into MyEclipse 7.
    When I tried to debug the code I get “Source not found”. I believe this prove that there is some settings in MyEclipse that allows my MyEclipse to see the source code when debugging. It have no problem in Eclipse.

    Yours,

    Frustrated

    #297589 Reply

    rmcvay
    Member

    That’s probably true.

    #297592 Reply

    jadeite1000
    Member

    @rmcvay wrote:

    That’s probably true.

    Hi All:

    I right click on the java class file called MainTest AND CHOOSE “Debug Configurations..” Under the “classpath” tab I clicked on “Add Projects” and choose “page50” as the project and now when I debug the java code I can see it. When I removed the java project “page50” I can also see the java code. But either way, when I called a java class from a jar file it gives me the following error:

    Exception in thread “main” java.lang.NoClassDefFoundError: com/ibatis/common/resources/Resources at MainTest.main(MainTest.java:12).

    The strange thing is that the “page50” project under “Java Build Path” in the “Libraries” tab, I can see the java jar file ibatis-common-2.jar and ibatis-dao-2.jar files. Also, I can compile my MainTest.java file. But for some reason, when I runned it complain it cannot find it “NoClassDefFoundError”. Is there something I can do in MyEclipse so when I debug the MainTest.java code and when it runs over a ibatis code it can at least not give me the above error.

    I tried the same project in Eclipse and have no problems whatsever and able to debug the MainTest.java code completely.

    Yours,

    Frustrated.

    #298125 Reply

    support-joy
    Member

    jadeite1000,
    I am not able to reproduce this at my end. Can you send your java code and screen shots of debug configuratins page at run>debug configurations showing the main and class path tabs.
    I will also need your installation details from MyEclipse > Installation Summary > Installation Detail
    Also MyEclipse does not support direct exporting. you should copy the relavent code from eclipse project and past it to the myEclipse project.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: source not found when debugging plain java application

You must be logged in to post in the forum log in