Bir Java Port inpout32 (http://www.highrez.co.uk/downloads/inpout32/) uygulaması olan jnpout32reg (http://www.hytherion.com/beattidp/comput/pport.htm) aracılığıyla Paralel Bağlantı Noktası ile iletişim kurmaya çalışıyorum. Inpout32'i, Paralel Bağlantı Noktası Test Cihazı (download. Cnet. Com/Parallel-Port-Tester/3000-2086_4-75940249.html) ile test ettim. Bununla birlikte, java uygulaması işe yaramıyor.jnpout32pkg/jnpout32reg ile Paralel Bağlantı Noktası İletişimi
package ioTest_reg;
import hardware.jnpout32.*;
public class ioTestReg
{
static short datum;
static short Addr;
static pPort lpt;
static void write()
{
datum = 0x001;
// Notify the console
System.out.println("Write to Port: " + Integer.toHexString(Addr) +
" with data = " + Integer.toHexString(datum));
//Write to the port
long start = System.currentTimeMillis();
long stop = System.currentTimeMillis();
while (stop-start < 10000){
lpt.output((short)0x001);
stop = System.currentTimeMillis();
}
System.out.println("Finished");
}
static void do_read_range()
{
// Try to read 0x378..0x37F, LPT1:
for (Addr=0x378; (Addr<0x380); Addr++) {
//Read from the port
datum = (short) lpt.input(Addr);
// Notify the console
System.out.println("Port: " + Integer.toHexString(Addr) +
" = " + Integer.toHexString(datum));
}
}
public static void main(String args[])
{
lpt = new pPort();
Addr=0x378;
datum=0x01;
write();
// Try to read 0x378..0x37F, LPT1:
do_read_range();
}
}
portu ile bağlantısı yapıldığında ve ben (Liman 378 78 döndürür, 379 getiri 79 vs ...) limanlarından okuyabilir. Ancak çıktı yazamam. Hata verilmez, ancak alıcı tarafında hiçbir şey olmaz (Paralel Port Test Cihazı ile tersi). Nerede yanlış yapıyorum
Exception in thread "main" java.lang.UnsatisfiedLinkError: ioTest_pkg.jnpout32.ioPort.Out32(SS)V
ve arasındaki fark nedir: Ben jnpout32pkg (jnpout32reg farklı bir versiyonu) kullandığınızda
yerine, (Ben benzer şeyi yüklü olsa bile) aşağıdaki hatayı alıyorum pkg ve reg?