2016-08-20 87 views
0

我使用Wildfly 10和Eclipse開發的應用程序,並且需要通過這個調試到一個類TransactionScopedEntityManager「堅持」的方法:如何找到Wildfly Eclipse中調試源代碼

entityManager.persist(member); 

然而,當我按下F5進入Eclipse時,我收到了

Source not found 
Edit source lookup path 

TransactionScopedEntityManager類的來源位於何處?在我的〜/ .m2/repository/org/jboss /中:

aesh/     integration-platform/ jboss-parent/   jdf/     marshalling/   remotingjmx/   shrinkwrap/   staxmapper/   weld/               
arquillian/   jboss-dmr/   jboss-vfs/   logging/    remoting/    sasl/     spec/     threads/    xnio/ 

它擁有所有這些目錄。在哪裏可以找到類的源代碼?

回答

0

包路徑是 org.jboss.as.jpa.container。
真正的文件路徑是wildfly-master \ jpa \ subsystem \ src \ main \ java \ org \ jboss \ as \ jpa \ container。
如果您需要在Eclipse中查找源代碼,您可以使用Eclipse中的「文件搜索」功能。按'Ctrl + h'打開搜索面板,然後選擇'文件搜索'選項卡。現在,您可以在「包含文本」中輸入關鍵字並找到它們。

+0

我搜索了「TransactionScopedEntityManager」,但沒有找到該文件。我沒有wildfly-master目錄。 – user697911

+0

wildfly-master目錄是wildfly的官方源代碼。轉到github並搜索wildfly。你可以從github上下載它。這裏是鏈接https://github.com/wildfly/wildfly – Catenation

+0

我可以從那裏下載,但我的應用程序不會在我的項目中使用它。我如何在Eclipse調試中使用這個源代碼? – user697911

0

我解壓WildFly 10的源代碼,沒有在文件資源管理器搜索 「TransactionScopedEntityManager.java」,我發現它是根據 wildfly-10.1.0.Final-SRC \ JPA \子系統的\ src \主\ java中\組織\ jboss的\作爲\ JPA \容器。

手動編輯源路徑查找,直接指向「wildfly-10.1.0.Final-src \ jpa \ subsystem \ src \ main \ java \」,它可能會有幫助。