当我试图执行
时javah -classpath NDK1_29jan/bin/classes;/home/XXXXX/Android_Eclipse_9sept/android-sdk-linux/platforms/android-15/android.jar -o HelloJNI.h com.example.hellojni.HelloJni
然后,它在控制台中显示异常
Error: no classes specified
Exception in thread "main" java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
NDK1_29jan是我的项目名称。我已经在.bashrc
文件中设置了这样的路径:
$export NDK=~/home/XXXXX/Android/ndk/android-ndk-r9d