这是一段JAVA调用TSC条码打印机的代码;有详细的注释!
1,需要把dll文件拷贝到c:\windows\system32目录下
2,工程里面需要加载JNative.jar包(网上很多下载的)
/*******************************************************************************
* $Header$
* $Revision$
* $Date$
*
*==============================================================================
*
* Copyright (c) 2001-2006 Primeton Technologies, Ltd.
* All rights reserved.
*
* Created on 2011-11-30 Dicky Penghuaibing
*******************************************************************************/
package com.sie.barcode;
import org.xvolks.jnative.JNative;
import org.xvolks.jnative.exceptions.NativeException;
public class BarcodeTest {
/**
* @param args
*/
public static void main(String[] args)throws NativeException, IllegalAccessException {
BarcodeTest.barcode_print("BAR03743902");
}
//打印方法,传入需要打印的条码参数
public static v