Linux JNI实例及其JNI程序设计模板
	
    
    
	简单实例说明待补充,实例源码可在此链接下载http://d.download.csdn.net/down/2389895/sanlinux
jniNative.cpp
#include "jniNative.h"
#include "mymain.h"
#include <stdio.h>
JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject arg, jstring instring)
{
    const char *str = (const char *)env->GetStringUTFChars(instring, JNI_FALSE);
    printf("HELLO,%s\n",str);
    env->ReleaseStringUTFChars(instring,str);
    return;
}
JNIEXPORT void JNICALL Java_HelloWorld_test(JNIEnv *env, jobject arg, jstring instring)
{
    const jbyte *str = (const jbyte *)env->GetStringUTFChars(instring, JNI_FALSE);
    test((const char *)str);
    env->ReleaseStringUTFChars(instring, (const char *)str);
    return;
}
jniNative.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class HelloWorld */
//javac HelloWorld.java
//javah HelloWorld
//Copy from HelloWorld.h
#ifndef _Included_HelloWorld
#define _Included_HelloWorld
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     HelloWorld
 * Method:    print
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_HelloWorld_print
  (JNIEnv *, jobject, jstring);
/*
 * Class:     HelloWorld
 * Method:    test
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_HelloWorld_test
  (JNIEnv *, jobject, jstring);
#ifdef __cplusplus
}
#endif
#endif
mymain.cpp
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "mymain.h"
void test(const char *str)
{
    char ch[50];
    int len = 0;
    
    strcat(ch,"Hello ");
&nbs
    
     
	
	
    
    
	相关文档:
        
    
    总览
用iptables -ADC 来指定链的规
则
,-A添加 -D删除 -C 修改
iptables - [RI] chain rule num rule-specification[option]
用iptables - RI 通过规则的顺序指定
iptables -D chain rule num[option]
删除指定规则
iptables -[LFZ] [chain][option]
用iptables -LFZ 链名 [选项]
iptables -[NX] chain
用 -NX ......
	
    
        
    
    1. 在出现grub画面时,用上下键选中你平时启动linux的那一项(别选dos哟),然后按e键 
2. 再次用上下键选中你平时启动linux的那一项(类似于kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/),然后按e键 
3. 修改你现在见到的命令行,加入single,结果如下: 
kernel /boot/vmlinuz-2.4.18-14 single ro root=LABEL=/ 
4 ......
	
    
        
    
    Linux 查看所有环境变量命令:expoert 和  env 。
               指定环境变量:echo $XXX,(XXX代表环境变量名)
更改环境变量值方法:
1.修改/etc/profile文件
例:在profile文件末尾加入: 
JAVA_HOME=/usr/share/jdk1.5.0_05 
P ......
	
    
        
    
    vi编辑命令
进入编辑模式 --> i (insert) 或者 a (append)
进入命令模式 --> Esc
命令模式常用操作:
删除一行 --> dd
复制一行 --> yy
粘贴 --> p ( yy 和 p 是结合使用)
替换 --> :s/oldwords/newwords 替换当前行 :%s/oldwords/newwords 替换所有 
注:特殊字符用"\"转义&n ......
	
    
        
    
    The Intelligent Input/Output (I2O) architecture allows hardware drivers to be split into two parts: an operating system specific module called the OSM and an hardware specific module called the HDM. The OSM can talk to a whole range of HDM's, and ideally the HDM's are not OS dependent. This allows f ......