그래서 여러 클래스를 정의한 Eclipse의 일반 Java 프로젝트 인 IRBenchmarker가 있습니다. 그 중 하나는 enum edu.mit.ll.irbenchmark.EvaluationMetric입니다. 이제 Google Web Toolkit Eclipse 프로젝트 인 IRBenchmarker-WebGUI를 작성 중이며 클라이언트가 EvaluationMetric 값을 매개 변수로 서버의 서비스에 전달하려고합니다.GWT가 다른 프로젝트에서 사용자 정의 클래스를 찾지 못했습니다.
나는 Eclipse 3.4 GWT 1.6 project - how to reference source from other projects?의 지침을 따라 왔지만 잘못하고 있어야합니다. 여기 내가 물건을 어떻게 세워야하는지 알아.
workspace
-- IRBenchmarker-WebGUI
-- src
-- edu.mit.ll.irbenchmark
-- IRBenchmarker_WebGUI.gwt.xml
-- IRBenchmarker
-- src
-- edu.mit.ll.irbenchmark
-- IRBenchmarker.gwt.xml
-- edu.mit.ll.irbenchmark.client
-- EvaluationMetric.java
파일 IRBenchmarker.gwt.xml에는 다음이 포함
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<!-- Expose classes useful to the web client as a Google Web Toolkit module -->
<module rename-to='IRBenchmarker'>
<inherits name='com.google.gwt.user.User' />
<source path="client" />
</module>
파일 IRBenchmarker_WebGUI.gwt.xml에는 다음이 포함
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='irbenchmarker_webgui'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name="edu.mit.ll.irbenchmark.IRBenchmarker" />
<!-- Specify the app entry point class. -->
<entry-point class='edu.mit.ll.irbenchmark.client.IRBenchmarker_WebGUI'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
이클립스 자바 IRBenchmarker - 웹 GUI의 한 경로가 포함되어 구축 프로젝트 IRBenchmarker. 내가 프로젝트를 실행하고 브라우저에서 페이지를 표시 할 때
, 나는
[ERROR] [irbenchmarker_webgui] - Line 124: No source code is available for type edu.mit.ll.irbenchmark.client.EvaluationMetric; did you forget to inherit a required module?
참고이 오류의 위, 아래의 "새로 컴파일 단위의 유효성을 검사합니다"
10:57:15.767 [INFO] [irbenchmarker_webgui] Ignored 3 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
이 있음을 얻을
나는 무엇이 누락 되었습니까?
업데이트 : IRBenchmarker의 소스를 사용하여 JAR 파일을 만들고 IRBenchmarker-WebGUI에 JAR 파일을 포함시켜 진행할 것입니다. IRBenchmarker에서 코드를 변경할 때마다 항아리를 다시 만들어야하는 것은 불편합니다.