2012-08-16 185 views
11

我在Eclipse中籤出了一個maven項目,無法檢查變量(右鍵單擊該變量並單擊檢查選項)。Eclipse檢查(Ctrl + Shift + I)不起作用

當我試圖這樣做,我得到以下信息:

To perform any evaluation, an expression must be compiled in the 
context of a java project's build path. The current execution 
context is not associated with a java project in the work-space. 

任何一個可以知道這樣做的原因可能是什麼?

在此先感謝。

回答

3

我的解決了這個問題做了以下內容:在project ->build path -> select source tab -> add folder

右鍵單擊,然後我加入 其中包含Java類的文件夾。

8

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. 
3

另外,在您的啓動配置中,請確保源路徑已正確指定。

也就是說: 運行/調試配置/源標籤/添加.../Java項目

確保包含源代碼項目是在該列表中!

+0

這就是它在我的情況,但隨着服務器。雙擊服務器 - >打開啓動配置 - >源代碼 - >添加 - >「您的項目」。 (應按PSR所述選擇源文件夾。) – 2017-03-01 11:04:55

0

我得到了同樣的錯誤信息。

爲了解決這個 "Debug Configuration" >> {{JAVA_DEBUG_APPLICATION_NAME}} >> Source (tab)

檢查源正確添加,

對於我來說,

  1. ,同時調試它打開類文件,它不應該被編輯的Java代碼。
  2. 得到了錯誤的消息也

我已刪除從源標籤的來源,它解決了這兩個問題

相關問題