开发者

javah Help - "No classes were specified on the command line"

开发者 https://www.devze.com 2023-01-25 05:50 出处:网络
I\'m running Ubuntu Linux with Eclipse installed, and I\'m trying to work with JNI to do so I need to use javah, but it doesn\'t seem to be working

I'm running Ubuntu Linux with Eclipse installed, and I'm trying to work with JNI to do so I need to use javah, but it doesn't seem to be working I have just recently installed Ubuntu and am unfamiliar with Linux/bash shells

for my eclipse project called myJNI, I have class DoJNI containing the native method.

in Terminal:

javah -classpath .;\home\thomas\Documents\LinuxProgramming\EclipseWorkspace\myJNI\bin\org\me\jni DoJN开发者_运维知识库I

errors I get are: No classes were specified on the command line


Use forward slashes instead of backslashes, and a colon instead of a semi-colon:

javah -classpath .:/home/thomas/Documents/LinuxProgramming/EclipseWorkspace/myJNI/bin/org/me/jni DoJNI

Also, I suspect that you don't really want org/me/jni on the classpath, but just the bin directory, using the classname org.me.jni.DoJNI:

javah -classpath .:/home/thomas/Documents/LinuxProgramming/EclipseWorkspace/myJNI/bin org.me.jni.DoJNI
0

精彩评论

暂无评论...
验证码 换一张
取 消