Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
embedded_systems_public
Java-Exercises-8-JNI-PiFaceCAD
Commits
d624d797
Commit
d624d797
authored
Nov 08, 2019
by
Martin Deinhofer
Browse files
merged README
parents
d8b411ad
5fcfa158
Changes
2
Show whitespace changes
Inline
Side-by-side
README.md
View file @
d624d797
...
@@ -9,8 +9,8 @@ See [Remote Development Setup](RemoteDev-Setup.md) tutorial.
...
@@ -9,8 +9,8 @@ See [Remote Development Setup](RemoteDev-Setup.md) tutorial.
Building the project involves two steps
Building the project involves two steps
1.
Connect to the remote device
1.
Connect to the remote device
2.
Build native code on command line
2.
Build
Java +
native code on command line
*
Command line:
```cd jni && make```
```
cd jni && make```
# Run project
# Run project
...
@@ -20,7 +20,3 @@ This can be done via the VM argument ```-Djava.library.path```.
...
@@ -20,7 +20,3 @@ This can be done via the VM argument ```-Djava.library.path```.
## Command line
## Command line
```
java -Djava.library.path=jni -cp bin java_exercises8_1_1.HelloJNI
```
```
java -Djava.library.path=jni -cp bin java_exercises8_1_1.HelloJNI
```
\ No newline at end of file
jni/makefile
View file @
d624d797
# Define common variables
# Define common variables
CLASS_PATH
=
../bin
CLASS_PATH
=
../bin
JAVA_SRC_PATH
=
../src
JAVA_SRC_PATH
=
../src
JAVA_HOME
=
/usr/lib/jvm/jdk-8-oracle-arm
32
-vfp-hflt
/
JAVA_HOME
=
/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt
#Paths to libmcp23s17 and libpifacecad
#Paths to libmcp23s17 and libpifacecad
LIB_MCP23S17
=
../../libmcp23s17
LIB_MCP23S17
=
../../libmcp23s17
...
@@ -16,7 +16,7 @@ all : libhello.so
...
@@ -16,7 +16,7 @@ all : libhello.so
run
:
run
:
java
-cp
$(CLASS_PATH)
-Djava
.library.path
=
../jni java_exercises8_1_1.HelloJNI
java
-cp
$(CLASS_PATH)
-Djava
.library.path
=
../jni java_exercises8_1_1.HelloJNI
java_exercises8_1_1/HelloJNI.class
:
java_exercises8_1_1/HelloJNI.class
:
$(JAVA_SRC_PATH)/java_exercises8_1_1/HelloJNI.java
javac
-cp
$(CLASS_PATH)
-d
$(CLASS_PATH)
$(JAVA_SRC_PATH)
/java_exercises8_1_1/HelloJNI.java
javac
-cp
$(CLASS_PATH)
-d
$(CLASS_PATH)
$(JAVA_SRC_PATH)
/java_exercises8_1_1/HelloJNI.java
# Targets for java_exercises8_1_1
# Targets for java_exercises8_1_1
...
@@ -33,4 +33,4 @@ HelloJNI.h : java_exercises8_1_1/HelloJNI.class
...
@@ -33,4 +33,4 @@ HelloJNI.h : java_exercises8_1_1/HelloJNI.class
javah
-o
HelloJNI.h
-classpath
$(CLASS_PATH)
java_exercises8_1_1.
$*
javah
-o
HelloJNI.h
-classpath
$(CLASS_PATH)
java_exercises8_1_1.
$*
clean
:
clean
:
rm
HelloJNI.h HelloJNI.o libhello.so
rm
-rf
HelloJNI.h HelloJNI.o libhello.so
$(CLASS_PATH)
/
*
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment