2011-04-06 32 views
1

你好我最近開始使用資源編輯器,我有一個問題:我試圖創建一個簡單的項目只是爲了測試目的在資源編輯器:沒有什麼特別的只是一個標籤與你好的世界,但當我推「創建Netbeans項目「而所有項目(JavaSE,MIDP,RIM)都是創建的,它們都沒有運行。在正常的JaVA中,我只是得到一個黑屏,而在MIDP模擬器中,我收到一條消息,說「這個應用程序在後臺運行」。空的statemachine基地?

我StateMachineBase代碼是這樣的

public class StateMachineBase { 
    public StateMachineBase(String s) {} 
} 

而且我的StateMachine代碼是這樣的:

public StateMachine(String resFile) { 
    super(resFile); 
    // do not modify, write code in initVars and initialize class members there, 
    // the constructor might be invoked too late due to race conditions that might occur 
} 

/** 
* this method should be used to initialize variables instead of 
* the constructor/class scope to avoid race conditions 
*/ 
protected void initVars() { 
} 

所以我猜我prgramm顯然,因爲沒有代碼不會做任何事情。我究竟做錯了什麼?從我的理解StateMachineBase應該有所有的鍋爐代碼。我使用Netbeans 6.9.1,Lwuit最新版本以及JavaME SDK 3.0和Nokia S60 SDK。

謝謝。

回答

0

那麼我會回答我自己的帖子。隨機我發現,如果你保存res文件並重新打開它,那麼它工作正常。 Shai Almog在他的博客中證實了這一點,這是一個將在下一個版本中修復的錯誤。

Shai's answer to my post