Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a Maven project which is cloned from Git. Project was successfully built and runs perfectly. However when i debug and try to evaluate functions/expressions, it gives me error saying --

expression must be compiled in the context of a Java Project's build path. 

I read previous stack overflow answers and did the following (with no results)--

  1. I added java nature to .project file and then added Java Project in source lookup. Still i get same error.

  2. If i remove the Java project from source lookup and choose option --"Workspace folder" while adding Source lookup path, it gives me Null Pointer exception.

Can someone please tell me how to resolve this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
171 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try this !!!

Find the thread in your debug window that you are in the breakpoint for. Right click on it. Under relaunch should be an edit launch configuration selection. Select that.

Select Source tab. Add. Java Project. Select the java project that the code exists in.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...