Commit c5e645f8 authored by Martin Deinhofer's avatar Martin Deinhofer
Browse files

moved class HelloJNI to package java_exercises7_1_1

fixed makefile to support new package of class
parent 4db9d0d0
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets> <buildTargets>
<target name="clean" path="jni" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="clean" path="jni" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/> <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1425982632690260517" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="398646446360079098" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "HelloJNI.h" #include "HelloJNI.h"
// Implementation of native method sayHello() of HelloJNI class // Implementation of native method sayHello() of HelloJNI class
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *env, jobject thisObj) { JNIEXPORT void JNICALL Java_java_1exercises7_11_11_HelloJNI_sayHello(JNIEnv *env, jobject thisObj) {
printf("Hello World!\n"); printf("Hello World!\n");
return; return;
} }
...@@ -16,8 +16,8 @@ HelloJNI.o : HelloJNI.c HelloJNI.h ...@@ -16,8 +16,8 @@ HelloJNI.o : HelloJNI.c HelloJNI.h
gcc -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" -c $< -o $@ gcc -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" -c $< -o $@
# $* matches the target filename without the extension # $* matches the target filename without the extension
HelloJNI.h : HelloJNI.class HelloJNI.h : java_exercises7_1_1/HelloJNI.class
javah -classpath $(CLASS_PATH) $* javah -o HelloJNI.h -classpath $(CLASS_PATH) java_exercises7_1_1.$*
clean : clean :
rm HelloJNI.h HelloJNI.o hello.dll rm HelloJNI.h HelloJNI.o hello.dll
\ No newline at end of file
package java_exercises7_1_1;
public class HelloJNI { public class HelloJNI {
static { static {
......
Markdown is supported
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