Hi
I tried make the Hello world kindlet by JDK 1.6.0_27, after signed .awz2 file and copied to Kindle, it now shows my app on HOME screen.
I tried to launch it but it just popup a box said: The Main Class for request title cannot be found. anybody could help me figure out the problem?
below are my source files and build steps:
1. Main.java
Code:
package test;
import com.amazon.kindle.kindlet.AbstractKindlet;
import com.amazon.kindle.kindlet.KindletContext;
import com.amazon.kindle.kindlet.ui.KTextArea;
public class Main extends AbstractKindlet {
private KindletContext ctx;
public void create(KindletContext context) {
this.ctx = context;
}
public void start() {
try {
ctx.getRootContainer().add(new KTextArea("Hello World,lol!"));
} catch (Throwable t) {
t.printStackTrace();
}
}
}
2. Main.manifest
Code:
Manifest-Version: 1.0
Description: Test for Kindle
Main-Class: test.Main
Implementation-Title: Main
Implementation-Version: 0.0.1
Implementation-Vendor: Liuto
3. compiling ... I have put Kindlet-1.1.jar in my CLASSPATH environment
C:\xxx> javac Main.java
I got Main.class without any error.
4. Jar it...
Code:
C:\xxx> jar cvfm Main.jar Main.manifest Main.class
added manifest
adding: Main.class(in = 857) (out= 500)(deflated 41%)
5. Sign it... I have put the key file in same directory
Code:
C:\xxx> signkindlet.bat
--------------------------------------------------------------
C:\xxx>rename Main.jar Main.azw2
C:\xxx>C:\"Program Files"\Java\jdk1.6.0_27\bin\jarsigner.exe -keystore developer.keystore -storepass password Main.azw2 dktest
C:\xxx>C:\"Program Files"\Java\jdk1.6.0_27\bin\jarsigner.exe -keystore developer.keystore -storepass password Main.azw2 ditest
C:\xxx>C:\"Program Files"\Java\jdk1.6.0_27\bin\jarsigner.exe -keystore developer.keystore -storepass password Main.azw2 dntest
6. copy Main.azw2 to Kindle
Thanks,
Nian