Commit 5f549774 authored by Martin Deinhofer's avatar Martin Deinhofer
Browse files

fixed command for running from command line

parent dafca4c1
...@@ -8,7 +8,6 @@ At times, it is necessary to use native codes (C/C++) to overcome the memory man ...@@ -8,7 +8,6 @@ At times, it is necessary to use native codes (C/C++) to overcome the memory man
2. **C/C++ Compiler** 2. **C/C++ Compiler**
* GCC compiler and Makefile ([Read "GCC and Make"](https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html)) **or** * GCC compiler and Makefile ([Read "GCC and Make"](https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html)) **or**
* Cygwin or MinGW on Windows ([Read "How to Setup Cygwin and MinGW](https://www3.ntu.edu.sg/home/ehchua/programming/howto/Cygwin_HowTo.html) * Cygwin or MinGW on Windows ([Read "How to Setup Cygwin and MinGW](https://www3.ntu.edu.sg/home/ehchua/programming/howto/Cygwin_HowTo.html)
3. **Eclipse for Java Developers** with **C/C++ Development Tool (CDT) extension** installed ([Read "Eclipse CDT"](https://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html)).
# Clone project # Clone project
```git clone https://es.technikum-wien.at/embedded_systems_public/Java-Exercises-7-JNI-HW-Interfacing.git``` ```git clone https://es.technikum-wien.at/embedded_systems_public/Java-Exercises-7-JNI-HW-Interfacing.git```
...@@ -33,13 +32,11 @@ Building the project involves two steps ...@@ -33,13 +32,11 @@ Building the project involves two steps
# Run project # Run project
Before the application can be run, you must build the native code and provide the library path to the "hello.dll" file, if it is not located in the *current working directory*. Before the application can be run, you must build the native code and provide the library path to the "hello.dll" file, if it is not located in the *current working directory*.
This can be done via the VM argument ```-Djava.library.path```. Right-click on the project and select *Run As/Run Configurations*, then select *Java Application*. In the *Main tab*, enter the main class "HelloJNI" and in *Arguments/VM Arguments*, enter ```-Djava.library.path=jni```. Finally click on *Run*. This can be done via the VM argument ```-Djava.library.path```.
You should see the output "Hello World!" displayed on the console.
## Command line ## Command line
```java -Djava.library.path=jni -cp bin java_exercises7_1_1.HelloJNI``` ```java -cp bin -Djava.library.path=jni java_exercises8_1_1.HelloJNI```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment