Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

new installation -- error running in "Android Mode" The keytool seems to be missing

$
0
0

OS Platform: Debian Jessie

I am just starting a tutorial on processing.

When running the first very simple program I get an error at the key-generating phase: program "/home/ibanja/dev/android/processing/processing-3.2.3/java/bin/keytool": error=2, No such file or directory

The code is cut and pasted from the tutorial and runs fine in "Java mode" so I don't think that is the problem.

The program code is:

void  setup()
{
}
void  draw()
{
        ellipse(mouseX,  mouseY,  mouseX-pmouseX,  mouseY-pmouseY);
}

I have tried running the following command with no success:

$ keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/ibanja/.android/debug.keystore -storepass android
Exception in thread "main" java.lang.ExceptionInInitializerError
        at javax.crypto.SecretKeyFactory.nextSpi(java.base@9-ea/SecretKeyFactory.java:303)
        at javax.crypto.SecretKeyFactory.<init>(java.base@9-ea/SecretKeyFactory.java:121)
        at javax.crypto.SecretKeyFactory.getInstance(java.base@9-ea/SecretKeyFactory.java:168)
        at sun.security.pkcs12.PKCS12KeyStore.getPBEKey(java.base@9-ea/PKCS12KeyStore.java:823)
        at sun.security.pkcs12.PKCS12KeyStore.encryptPrivateKey(java.base@9-ea/PKCS12KeyStore.java:892)
        at sun.security.pkcs12.PKCS12KeyStore.setKeyEntry(java.base@9-ea/PKCS12KeyStore.java:600)
        at sun.security.pkcs12.PKCS12KeyStore.engineSetKeyEntry(java.base@9-ea/PKCS12KeyStore.java:560)
        at sun.security.util.KeyStoreDelegator.engineSetKeyEntry(java.base@9-ea/KeyStoreDelegator.java:111)
        at java.security.KeyStore.setKeyEntry(java.base@9-ea/KeyStore.java:1162)
        at sun.security.tools.keytool.Main.doGenKeyPair(java.base@9-ea/Main.java:1729)
        at sun.security.tools.keytool.Main.doCommands(java.base@9-ea/Main.java:1054)
        at sun.security.tools.keytool.Main.run(java.base@9-ea/Main.java:375)
        at sun.security.tools.keytool.Main.main(java.base@9-ea/Main.java:368)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
        at javax.crypto.JceSecurity.<clinit>(java.base@9-ea/JceSecurity.java:91)
        ... 13 more
Caused by: java.lang.NullPointerException
        at sun.nio.fs.UnixPath.normalizeAndCheck(java.base@9-ea/UnixPath.java:75)
        at sun.nio.fs.UnixPath.<init>(java.base@9-ea/UnixPath.java:69)
        at sun.nio.fs.UnixFileSystem.getPath(java.base@9-ea/UnixFileSystem.java:280)
        at java.nio.file.Paths.get(java.base@9-ea/Paths.java:84)
        at javax.crypto.JceSecurity.setupJurisdictionPolicies(java.base@9-ea/JceSecurity.java:254)
        at javax.crypto.JceSecurity.access$000(java.base@9-ea/JceSecurity.java:49)
        at javax.crypto.JceSecurity$1.run(java.base@9-ea/JceSecurity.java:82)
        at javax.crypto.JceSecurity$1.run(java.base@9-ea/JceSecurity.java:79)
        at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
        at javax.crypto.JceSecurity.<clinit>(java.base@9-ea/JceSecurity.java:78)
        ... 13 more

Is there a way to generate the key or install the keytool into /home/ibanja/dev/android/processing/processing-3.2.3/java/bin/? Is that even the problem?


Viewing all articles
Browse latest Browse all 941

Trending Articles