-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
90 additions
and
90 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -28,9 +28,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -43,7 +43,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -52,7 +52,7 @@ JavaVM* create_vm() { | |
options[1].optionString = const_cast<char*>("-Xcheck:jni"); | ||
args.options = options; | ||
args.ignoreUnrecognized = JNI_FALSE; | ||
|
||
JNI_CreateJavaVM(&jvm, (void **)&env, &args); | ||
return jvm; | ||
} | ||
|
@@ -64,5 +64,5 @@ int main(){ | |
JavaVM* jvm = create_vm(); | ||
MyComplexClass *testOfMyClass = new MyComplexClass(jvm); | ||
cout << "My Computation: " << testOfMyClass->myVeryComplexComputation(1.2,80) << endl; | ||
return 0; | ||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -28,9 +28,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -43,7 +43,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -52,7 +52,7 @@ JavaVM* create_vm() { | |
options[1].optionString = const_cast<char*>("-Xcheck:jni"); | ||
args.options = options; | ||
args.ignoreUnrecognized = JNI_FALSE; | ||
|
||
JNI_CreateJavaVM(&jvm, (void **)&env, &args); | ||
return jvm; | ||
} | ||
|
@@ -64,5 +64,5 @@ int main(){ | |
JavaVM* jvm = create_vm(); | ||
Plop *plop = new Plop(jvm); | ||
cout << "Does nothing. It is just to test the bug." << endl; | ||
return 0; | ||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -28,9 +28,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -43,7 +43,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -52,7 +52,7 @@ JavaVM* create_vm() { | |
options[1].optionString = const_cast<char*>("-Xcheck:jni"); | ||
args.options = options; | ||
args.ignoreUnrecognized = JNI_FALSE; | ||
|
||
JNI_CreateJavaVM(&jvm, (void **)&env, &args); | ||
return jvm; | ||
} | ||
|
@@ -64,5 +64,5 @@ int main(){ | |
JavaVM* jvm = create_vm(); | ||
Bar *plop = new Bar(jvm); | ||
cout << "Does nothing" << endl; | ||
return 0; | ||
return 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -28,9 +28,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -43,7 +43,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -52,7 +52,7 @@ JavaVM* create_vm() { | |
options[1].optionString = const_cast<char*>("-Xcheck:jni"); | ||
args.options = options; | ||
args.ignoreUnrecognized = JNI_FALSE; | ||
|
||
JNI_CreateJavaVM(&jvm, (void **)&env, &args); | ||
return jvm; | ||
} | ||
|
@@ -72,5 +72,5 @@ int main(){ | |
plop->doNothingPleaseButDisplay(23); | ||
cout << "Hashcode of my two strings " << plop->giveMeTheHashCodePlease(const_cast<char*>("plop"), const_cast<char*>("plop2")) << endl; | ||
cout << "Inverse my boolean. True becomes : " << plop->workingWithBoolean(true) << endl << "False becomes : " << plop->workingWithBoolean(false) << endl;; | ||
return 0; | ||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -43,7 +43,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -89,9 +89,9 @@ int main(){ | |
|
||
bool arrayOfBool[]={true, false, true, true}; | ||
bool *boolReturned = plop->dealingWithBooleans(arrayOfBool, 4); | ||
|
||
for (int i=0; i < 4; i++){ | ||
cout << "Value " << i << " : " << boolReturned[i] << " (was " << arrayOfBool[i] << ")" << endl; | ||
} | ||
return 0; | ||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,20 @@ | |
# | ||
Sylvestre LEDRU - <[email protected]> <[email protected]> | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
This software is a computer program whose purpose is to generate C++ wrapper | ||
for Java objects/methods. | ||
This software is governed by the CeCILL license under French law and | ||
abiding by the rules of distribution of free software. You can use, | ||
abiding by the rules of distribution of free software. You can use, | ||
modify and/ or redistribute the software under the terms of the CeCILL | ||
license as circulated by CEA, CNRS and INRIA at the following URL | ||
"http://www.cecill.info". | ||
"http://www.cecill.info". | ||
As a counterpart to the access to the source code and rights to copy, | ||
modify and redistribute granted by the license, users are provided only | ||
with a limited warranty and the software's author, the holder of the | ||
economic rights, and the successive licensors have only limited | ||
liability. | ||
liability. | ||
In this respect, the user's attention is drawn to the risks associated | ||
with loading, using, modifying and/or developing or reproducing the | ||
|
@@ -25,9 +25,9 @@ that may mean that it is complicated to manipulate, and that also | |
therefore means that it is reserved for developers and experienced | ||
professionals having in-depth computer knowledge. Users are therefore | ||
encouraged to load and test the software's suitability as regards their | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
requirements in conditions enabling the security of their systems and/or | ||
data to be ensured and, more generally, to use and operate it in the | ||
same conditions as regards security. | ||
The fact that you are presently reading this means that you have had | ||
knowledge of the CeCILL license and that you accept its terms. | ||
|
@@ -45,7 +45,7 @@ JavaVM* create_vm() { | |
JNIEnv* env; | ||
JavaVMInitArgs args; | ||
JavaVMOption options[2]; | ||
|
||
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */ | ||
args.version = JNI_VERSION_1_4; | ||
|
||
|
@@ -75,7 +75,7 @@ int main(){ | |
cout << "Exception caught:" << endl; | ||
try { | ||
int myIntsWithExceptionCatched = plop->getIntFromArrayOfSizeThree(22); | ||
|
||
}catch(GiwsException::JniException e) { | ||
cout << "getJavaDescription: " << e.getJavaDescription() << endl; | ||
cout << "getJavaStackTrace: " << e.getJavaStackTrace() << endl; | ||
|
@@ -99,5 +99,5 @@ int main(){ | |
int myIntsWithException = plop->getIntFromArrayOfSizeThree(223); | ||
cout << "Value from the Java with good pos : " << myInts <<endl; | ||
|
||
return 0; | ||
return 0; | ||
} |
Oops, something went wrong.