javah Help - “No classes were specified on the command line”

僤鯓⒐⒋嵵緔 提交于 2019-12-21 03:12:17

问题


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 DoJNI

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


回答1:


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


来源:https://stackoverflow.com/questions/4179744/javah-help-no-classes-were-specified-on-the-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!