使用作为参考我正在编写一些代码来手动设置线程的线程优先级(用于学习目的)。我使用以下代码: -
final IntByReference cpuset = new IntByReference(1);
final int ret = lib.sched_setaffinity(0,(16),cpuset);
System.out.println(ret);
我按如下方式编译Java代码: -
javac -classpath jna-4.0.0.jar JNATestOne.java
我收到以下错误: -
JNATestOne.java:27: error: cannot find symbol
final int ret = lib.sched_setaffinity( 0, cpuMaskSize, new LongByReference( mask ) );
^
symbol: method sched_setaffinity(int,int,LongByReference)
location: variable lib of type CLibrary
我做错了什么?