Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
public class JNI_Ausgabe{
public native String Ausgabe(int i);
public static void main(String[] args){
new JNI_Ausgabe().Ausgabe(10);
}
static {
System.loadLibrary("c_ausgabe");
}
}
#include "JNI_Ausgabe.h"
#include <stdio.h>
#include <jni.h>
JNIEXPORT void JNICALL Ausgabe(JNIEnv *env, jobject obj, jdouble wert){
printf("Ergebnis: %10.3lf\n", wert);
}
import java.util.Date;
public class Boottime
{
static
{
System.loadLibrary("boottime");
}
private static native long getTickCount();
public static Date getBoottime()
{
return new Date(System.currentTimeMillis()-Boottime.getTickCount());
}
public static void main(String argv[])
{
System.out.println(getBoottime());
}
}
#include <jni.h>
#include <windows.h>
#include "boottime.h"
JNIEXPORT jlong JNICALL Java_Boottime_getTickCount(JNIEnv *env, jclass obj)
{
return GetTickCount();
}
@echo off
%JAVA_HOME%\bin\javac.exe Boottime.java
%JAVA_HOME%\bin\javah.exe Boottime
cl -I%JAVA_HOME%\include -I%JAVA_HOME%\include\win32 /GD -LD boottime.c -Feboottime.dll
class HelloWorld {
public native void displayHelloWorld();
static {
System.loadLibrary("hello");
}
public static void main(String[] args) {
new HelloWorld().displayHelloWorld();
}
}
public native void displayHelloWorld();
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class HelloWorld */
#ifndef _Included_HelloWorld
#define _Included_HelloWorld
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: HelloWorld
* Method: displayHelloWorld
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_HelloWorld_displayHelloWorld
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
#include <jni.h>
#include "HelloWorld.h"
#include <stdio.h>
JNIEXPORT void JNICALL
Java_HelloWorld_displayHelloWorld(JNIEnv *env, jobject obj)
{
printf("Hello world!\n");
return;
}