This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JNIThread { | |
/* This method will be called asychrounously from | |
* native code. There is no native method because | |
* we will use JNI_OnLoad to make the magic happens. */ | |
public static void calledAsynchronously() { | |
System.out.println("Asynchronous hello from Java"); | |
} | |
public static void main(String[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// At this example I will show how to throw and handle exceptions from native | |
// code. And how you can map the native return codes to different Exceptions in | |
// Java. I follow principles here. | |
// | |
// First. Less is more. The less classes you have tied to native code, the | |
// better. You can simply think this as encapsulation. The native code should | |
// be encapsuled in the smallest number of classes as possible. | |
// | |
// Sencond. Play safe. Surround all the error report so that at last one | |
// exception arrises. Even when native code return unexpected values. This |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In this example I will show how to cache classes, method and field IDs. Caching | |
// these lookups can improve performance of native calls by safing native code | |
// from extra JNI calls. | |
public class JNICache { | |
// Here we load our native library at a static block. This ensures that the library | |
// is loaded as soon as the class is loaded. This will make caching simpler and safer. | |
static { | |
System.loadLibrary("cache"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DESCRIPTION = "JDK 8.60 plus JavaFX compiled for iMX.6" | |
LICENSE = "MIT" | |
TARFILE = "jdk1.8.0_60-plus-JFX.tar.gz" | |
SRC_URI = "file://${TARFILE}" | |
FILES_${PN} = "/opt/jdk1.8.0_60/*" | |
# Disable -dbg package creation. | |
INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | |
INSANE_SKIP_${PN} = "already-stripped dev-so ldflags" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn archetype:generate -DgroupId=io.github.gkos -DartifactId=springexmpl -DarchetypeArtifactId=spring-mvc-archetype -archetype-webapp -DinteractiveMode=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> | |
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> | |
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js" type="text/javascript"></script> | |
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushJava.js' type='text/javascript'></script> | |
<script language='javascript'> | |
SyntaxHighlighter.all(); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2016 Daniel Hilst SellI <[email protected]> | |
# Released under the Apache 2 license | |
DESCRIPTION = "Java depency manager and build tool" | |
HOMEPAGE = "http://maven.apache.org" | |
LICENSE = "Apache2" | |
SECTION = "devel/java" | |
DEPENDS = "" | |
_pkg_prefix = "apache-maven-${PV}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[geckos@csi24 build_x11]$ bitbake rpm-native | |
WARNING: Host distribution "ArchLinux" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. | |
Loading cache: 100% |#########################################################################################################################################################################################################| ETA: 00:00:00 | |
Loaded 2806 entries from dependency cache. | |
Parsing recipes: 100% |#######################################################################################################################################################################################################| Time: 00:00:00 | |
Parsing of 2235 .bb files complete (2230 cached, 5 parsed). 2811 targets, 208 skipped, 6 masked, 0 errors. | |
NOTE: Resolving any missing task queue dependencies | |
Build Configuration: | |
BB_VERSION = "1.30.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[geckos@csi24 build_x11]$ bitbake pharosserver-imx6-image | |
WARNING: Host distribution "ArchLinux" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. | |
Loading cache: 100% |################################################################################################################| ETA: 00:00:00 | |
Loaded 2818 entries from dependency cache. | |
Parsing recipes: 100% |##############################################################################################################| Time: 00:00:01 | |
Parsing of 2258 .bb files complete (2241 cached, 17 parsed). 2835 targets, 184 skipped, 6 masked, 0 errors. | |
NOTE: Resolving any missing task queue dependencies | |
Build Configuration: | |
BB_VERSION = "1.30.0" |