2012-09-28 4 views
0

을 시작하지 않습니다 내가 이클립스에서 다음과 같은 구조를 가지고 : 패키지와자바 애플릿

foo.bar.app, Main.java 및 Applet.java 포함 (THIE ifnormation이 필요한 경우 확실하지를 ...)

Java (스윙) 응용 프로그램 또는 애플릿 중 하나로서 Eclipse에서 appliacation을 올바르게 실행할 수 있습니다. 이제는 브루 서 (firefox에서만 작동해야합니다 ...)

그래서 내가 프로젝트를 마우스 오른쪽 버튼으로 클릭 -> 내보내기 -> 항아리 (runnable 항아리!), 그리고 그것을 이동 폴더/홈/사용자/데스크탑/테스트

폴더 테스트는 다음과 index.html을 포함로 :

<html> 
<head> 
</head> 
    <body> 
     <p> 
      <embed id = "test" 
      type="application/x-java-applet;version=1.6" 
      width="256" height="256" 
      archive="test.jar" 
      code="foo.bar.app.Applet.class" 
      /> 
     </p> 
</body> 

을하지만 내가 가진 모든 아래쪽에 ... 회색 상자입니다 FireFox는 Start : 애플릿이 초기화되지 않았다고 말합니다. 여기

애플릿을 시작 오류가 아마이 코드 조각

public class Applet extends JApplet { 

@Override 
public void init() { 
    super.init(); 

    // simulate properties file, empty properties should have no influence 
    Properties p = new Properties(); 

    this.setLayout(new BorderLayout()); 
    this.setSize(1000, 600); 

답변