View Single Post
Old 07-02-2012, 12:42 AM   #63
digory
Enthusiast
digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 28
Karma: 50000
Join Date: Jun 2012
Device: kindle touch
OK, thanks. But the editor is the minor problem.

The KTextArea isn't documented in Amazon's dev kit reference, so I replaced the KTextArea with a Button. Now it compiles, cool! However, it still doesn't work. The following is a bash script that generates my azw2:

Code:
#!/bin/bash

PROJECTNAME=HelloWorld
CLASSPATH=../lib/Kindlet-2.1.jar
export CLASSPATH

echo "Making $PROJECTNAME..."

if [ -f developer.keystore ]; then
  echo "developer.keystore exists!"
else
  echo "Generating developer.keystore..."
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias dk$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias di$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias dn$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
fi

echo "Compiling..."
javac *.java

echo "Creating jar file..."
/bin/rm $PROJECTNAME.jar >&/dev/null
/bin/rm $PROJECTNAME.azw2 >&/dev/null
jar cvmf $PROJECTNAME.manifest $PROJECTNAME.jar *.java

echo "Creating signed azw2 file..."

jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar dk$PROJECTNAME
jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar di$PROJECTNAME
jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar dn$PROJECTNAME

mv $PROJECTNAME.jar $PROJECTNAME.azw2

echo "Done."
The PROJECTNAME (the azw2's name) can be any arbitrary name, or does it need to have the same name as the public class (which is Main)? Anyway, when I move this azw2 to the documents folder, it doesn't show up in the Kindle. There is still something wrong here...

Last edited by digory; 07-02-2012 at 12:49 AM.
digory is offline   Reply With Quote