Index: /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp	(revision 14080)
+++ /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp	(revision 14081)
@@ -4,29 +4,57 @@
 #include <cstddef>
 #include <stdio.h>
-///////////////////////////////////////////////////////////////////////////////////////////
+
 namespace com_example_issm
 {
+	/*Global variables{{{*/
 	fac* f;
 	FemModel *fm;
-//------------------------------------------------------------------------------------
-	jint initilize(JNIEnv *env, jclass clazz, jstring file)
+	/*}}}*/
+	jint initialize(JNIEnv *env, jclass clazz, jstring jsolution_type, jstring jabsfile, jstring jrelfile) /*{{{*/
 	{
-		char *nativefile = (char*)env->GetStringUTFChars(file,0);
+		
+		/*arguments to constructor: */
+		int argc; //arguments to constructor.
+		char** argv = NULL;
+		COMM    communicator = 1; //fake communicator for constructor
+		const char* issmname = "issm.exe";
+		char *solution_type = NULL;
+		char *absfile = NULL;
+		char *relfile = NULL;
+
+		/*retrieve from java machine: */
+		solution_type = (char*)env->GetStringUTFChars(jsolution_type,0);
+		absfile = (char*)env->GetStringUTFChars(jabsfile,0);
+		relfile = (char*)env->GetStringUTFChars(jrelfile,0);
+
+		/*creat arguments to call constructor for FemModel: */
+		argc=4; 
+		argv=(char**)malloc(argc*sizeof(char*));
+		argv[0]=(char*)issmname;
+		argv[1]=solution_type;
+		argv[2]=absfile;
+		argv[3]=relfile;
 
 		f = new fac();
 
-		//call Model constructor passing in infile as File Descriptor parameter.
-		fm  = new FemModel(nativefile);
+		/*call Model constructor passing in infile as File Descriptor parameter.*/
+		fm  = new FemModel(argc,argv,communicator);
 
-		env->ReleaseStringUTFChars(file, nativefile); //must realease the char*
+		/*release strings: */
+		env->ReleaseStringUTFChars(jsolution_type, solution_type); //must realease the char*
+		env->ReleaseStringUTFChars(jabsfile, absfile); //must realease the char*
+		env->ReleaseStringUTFChars(jrelfile, relfile); //must realease the char*
+	
+		/*figure out size of solution: */
 		//jint size = (jint) fm->bufferSize();
-		//return size;
+		jint size =7;
+		
+		return size;
 
-		return 0; //return 0 for now.
 	}
-//------------------------------------------------------------------------------------
-	//fill out the first two slots, extract the same way in java using get(int position)
-	void solve(JNIEnv *env, jclass clazz , jint alpha, jobject buf)
+	/*}}}*/
+	void solve(JNIEnv *env, jclass clazz , jint alpha, jobject buf) /*{{{*/
 	{
+		/*fill out the first two slots, extract the same way in java using get(int position)*/
 		jdouble *dBuf = (jdouble *)env->GetDirectBufferAddress(buf);
 
@@ -34,7 +62,6 @@
 		// fm -> solve(dBuf, alpha);
 
-	}
-//------------------------------------------------------------------------------------
-	jlong factorial(JNIEnv *env, jclass clazz, jlong n)
+	}/*}}}*/
+	jlong factorial(JNIEnv *env, jclass clazz, jlong n) /*{{{*/
 	{
 		if( f != NULL)
@@ -42,17 +69,16 @@
 		return 0;
 	}
-
-//------------------------------------------------------------------------------------
-	static JNINativeMethod method_table[] =
+	/*}}}*/
+	static JNINativeMethod method_table[] = /*{{{*/
 	{
 			{"fac"      	,     "(J)J" 	, (void *) factorial},
-			{"createISSMModel"   ,"(Ljava/lang/String;)I"  , (void *) initilize},
+			{"createISSMModel"   ,"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I"  , (void *) initialize},
 			{"processBuffer", "(ILjava/nio/DoubleBuffer;)V", (void *) solve}
 	};
+	/*}}}*/
 }
-//------------------------------------------------------------------------------------
+
 using namespace com_example_issm;
-
-extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
+extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) /*{{{*/
 {
     JNIEnv* env;
@@ -72,3 +98,3 @@
     }
 }
-///////////////////////////////////////////////////////////////////////////////////////////
+/*}}}*/
Index: /issm/trunk-jpl/src/android/ISSM/project.properties
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/project.properties	(revision 14080)
+++ /issm/trunk-jpl/src/android/ISSM/project.properties	(revision 14081)
@@ -12,3 +12,3 @@
 
 # Project target.
-target=Google Inc.:Google APIs:16
+target=android-14
Index: /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java	(revision 14080)
+++ /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java	(revision 14081)
@@ -55,11 +55,13 @@
     public void createModel()
     {
+		String solution_type="DiagnosticSolution";
     	String file = "";
     	if( mapName.equals("greenland"))
 		{
-    		file = "test102.petsc";
+    		file = "test102";
 		}
-    	else file = "test102.petsc";
-    	size = issmNative.createISSMModel(issmFolder + file);
+    	else file = "test102";
+
+    	size = issmNative.createISSMModel(solution_type,issmFolder + file,file);
     }
 //------------------------------------------------------------------------------------------------
Index: /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/IssmJni.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/IssmJni.java	(revision 14080)
+++ /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/IssmJni.java	(revision 14081)
@@ -6,5 +6,5 @@
 	public native long fac(long n);
 	public native void processBuffer(int alpha, DoubleBuffer buff);
-	public native int createISSMModel(String file);
+	public native int createISSMModel(String solution_type, String absfile, String relfile);
 	static 
 	{
