diff --git a/java/org/.DS_Store b/java/common/org/.DS_Store
similarity index 100%
rename from java/org/.DS_Store
rename to java/common/org/.DS_Store
diff --git a/java/org/linphone/.DS_Store b/java/common/org/linphone/.DS_Store
similarity index 100%
rename from java/org/linphone/.DS_Store
rename to java/common/org/linphone/.DS_Store
diff --git a/java/org/linphone/core/CallDirection.java b/java/common/org/linphone/core/CallDirection.java
similarity index 100%
rename from java/org/linphone/core/CallDirection.java
rename to java/common/org/linphone/core/CallDirection.java
diff --git a/java/org/linphone/core/LinphoneAddress.java b/java/common/org/linphone/core/LinphoneAddress.java
similarity index 100%
rename from java/org/linphone/core/LinphoneAddress.java
rename to java/common/org/linphone/core/LinphoneAddress.java
diff --git a/java/org/linphone/core/LinphoneAuthInfo.java b/java/common/org/linphone/core/LinphoneAuthInfo.java
similarity index 100%
rename from java/org/linphone/core/LinphoneAuthInfo.java
rename to java/common/org/linphone/core/LinphoneAuthInfo.java
diff --git a/java/org/linphone/core/LinphoneCallLog.java b/java/common/org/linphone/core/LinphoneCallLog.java
similarity index 100%
rename from java/org/linphone/core/LinphoneCallLog.java
rename to java/common/org/linphone/core/LinphoneCallLog.java
diff --git a/java/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java
similarity index 80%
rename from java/org/linphone/core/LinphoneCore.java
rename to java/common/org/linphone/core/LinphoneCore.java
index d519c9d1edaedd6f74997b9a4324896fe1b4df57..2ca76e6432e16a1410f4c373b839ea1a8563b14f 100644
--- a/java/org/linphone/core/LinphoneCore.java
+++ b/java/common/org/linphone/core/LinphoneCore.java
@@ -29,23 +29,23 @@ public interface LinphoneCore {
 	 */
 	static public class 	GeneralState {
 		  /* states for GSTATE_GROUP_POWER */
-	static GeneralState GSTATE_POWER_OFF = new GeneralState(0);        /* initial state */
-	static GeneralState GSTATE_POWER_STARTUP = new GeneralState(1);
-	static GeneralState GSTATE_POWER_ON = new GeneralState(2);
-	static GeneralState GSTATE_POWER_SHUTDOWN = new GeneralState(3);
+	static public GeneralState GSTATE_POWER_OFF = new GeneralState(0);        /* initial state */
+	static public GeneralState GSTATE_POWER_STARTUP = new GeneralState(1);
+	static public GeneralState GSTATE_POWER_ON = new GeneralState(2);
+	static public GeneralState GSTATE_POWER_SHUTDOWN = new GeneralState(3);
 		  /* states for GSTATE_GROUP_REG */
-	static GeneralState GSTATE_REG_NONE = new GeneralState(10);       /* initial state */
-	static GeneralState GSTATE_REG_OK  = new GeneralState(11);
-	static GeneralState GSTATE_REG_FAILED = new GeneralState(12);
+	static public GeneralState GSTATE_REG_NONE = new GeneralState(10);       /* initial state */
+	static public GeneralState GSTATE_REG_OK  = new GeneralState(11);
+	static public GeneralState GSTATE_REG_FAILED = new GeneralState(12);
 		  /* states for GSTATE_GROUP_CALL */
-	static GeneralState GSTATE_CALL_IDLE = new GeneralState(20);      /* initial state */
-	static GeneralState GSTATE_CALL_OUT_INVITE = new GeneralState(21);
-	static GeneralState GSTATE_CALL_OUT_CONNECTED = new GeneralState(22);
-	static GeneralState GSTATE_CALL_IN_INVITE = new GeneralState(23);
-	static GeneralState GSTATE_CALL_IN_CONNECTED = new GeneralState(24);
-	static GeneralState GSTATE_CALL_END = new GeneralState(25);
-	static GeneralState GSTATE_CALL_ERROR = new GeneralState(26);
-	static GeneralState GSTATE_INVALID = new GeneralState(27);
+	static public GeneralState GSTATE_CALL_IDLE = new GeneralState(20);      /* initial state */
+	static public GeneralState GSTATE_CALL_OUT_INVITE = new GeneralState(21);
+	static public GeneralState GSTATE_CALL_OUT_CONNECTED = new GeneralState(22);
+	static public GeneralState GSTATE_CALL_IN_INVITE = new GeneralState(23);
+	static public GeneralState GSTATE_CALL_IN_CONNECTED = new GeneralState(24);
+	static public GeneralState GSTATE_CALL_END = new GeneralState(25);
+	static public GeneralState GSTATE_CALL_ERROR = new GeneralState(26);
+	static public GeneralState GSTATE_INVALID = new GeneralState(27);
 	private final int mValue;
 	static private Vector values = new Vector();
 	
diff --git a/java/org/linphone/core/LinphoneCoreFactory.java b/java/common/org/linphone/core/LinphoneCoreFactory.java
similarity index 98%
rename from java/org/linphone/core/LinphoneCoreFactory.java
rename to java/common/org/linphone/core/LinphoneCoreFactory.java
index b352edca115e8a78c6f4ff5ef76ec58e026b856e..b267373a3eadef9df2ef2ef2cbf5e194d1b882a6 100644
--- a/java/org/linphone/core/LinphoneCoreFactory.java
+++ b/java/common/org/linphone/core/LinphoneCoreFactory.java
@@ -46,7 +46,7 @@ abstract public class LinphoneCoreFactory {
 		}
 		return theLinphoneCoreFactory;
 	}
-	abstract public LinphoneAuthInfo createAuthInfo(String username,String password);
+	abstract public LinphoneAuthInfo createAuthInfo(String username,String password, String realm);
 	
 	abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object  userdata) throws LinphoneCoreException;
 	
diff --git a/java/org/linphone/core/LinphoneCoreListener.java b/java/common/org/linphone/core/LinphoneCoreListener.java
similarity index 100%
rename from java/org/linphone/core/LinphoneCoreListener.java
rename to java/common/org/linphone/core/LinphoneCoreListener.java
diff --git a/java/org/linphone/core/LinphoneProxyConfig.java b/java/common/org/linphone/core/LinphoneProxyConfig.java
similarity index 100%
rename from java/org/linphone/core/LinphoneProxyConfig.java
rename to java/common/org/linphone/core/LinphoneProxyConfig.java
diff --git a/java/j2me/org/linphone/core/LinphoneCoreException.java b/java/j2me/org/linphone/core/LinphoneCoreException.java
new file mode 100644
index 0000000000000000000000000000000000000000..10900a633e71809d575afa136e3fb4a966323d09
--- /dev/null
+++ b/java/j2me/org/linphone/core/LinphoneCoreException.java
@@ -0,0 +1,47 @@
+/*
+LinphoneCoreException.java
+Copyright (C) 2010  Belledonne Communications, Grenoble, France
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+package org.linphone.core;
+
+
+public class LinphoneCoreException extends Exception {
+	Throwable mE;
+	public LinphoneCoreException() {
+		super();
+	}
+
+	public LinphoneCoreException(String detailMessage) {
+		super(detailMessage);
+
+	}
+	public LinphoneCoreException(Throwable e) {
+		mE = e;
+	}
+
+	public LinphoneCoreException(String detailMessage,Throwable e) {
+		super(detailMessage);
+		mE = e;
+	}
+
+	public void printStackTrace() {
+		super.printStackTrace();
+		mE.printStackTrace();
+	}
+	
+
+}
diff --git a/java/org/linphone/core/LinphoneCoreException.java b/java/j2se/org/linphone/core/LinphoneCoreException.java
similarity index 93%
rename from java/org/linphone/core/LinphoneCoreException.java
rename to java/j2se/org/linphone/core/LinphoneCoreException.java
index b1967943929c1f1258000c7a47f00b51c8145e35..a424e2871903694fdaa4de76b36df4e2c09639cb 100644
--- a/java/org/linphone/core/LinphoneCoreException.java
+++ b/java/j2se/org/linphone/core/LinphoneCoreException.java
@@ -29,11 +29,11 @@ public class LinphoneCoreException extends Exception {
 	}
 
 	public LinphoneCoreException(Throwable e) {
-		super(e.getMessage());
+		super(e);
 	}
 
 	public LinphoneCoreException(String detailMessage,Throwable e) {
-		super(detailMessage +" reason ["+e.getMessage()+"]");
+		super(detailMessage,e);
 	}