1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
169 |
169 |
170 return result; |
170 return result; |
171 } |
171 } |
172 |
172 |
173 JavaStarterImpl::JavaStarterImpl(const std::list<std::wstring>& args): |
173 JavaStarterImpl::JavaStarterImpl(const std::list<std::wstring>& args): |
174 mJvmStarter(0), |
174 mJvmStarter(0), |
175 mRuntimeStarterUtils(0), |
175 mRuntimeStarterUtils(0), |
176 mOriginalArgs(args), |
176 mOriginalArgs(args), |
177 mShudownOk(false), |
177 mShudownOk(false), |
178 mIsMainApp(true), |
178 mIsMainApp(true), |
179 mConfiguration(JvmStarter::UNDEFINED) |
179 mConfiguration(JvmStarter::UNDEFINED) |
180 |
180 |
181 { |
181 { |
182 JELOG2(EJavaRuntime); |
182 JELOG2(EJavaRuntime); |
183 mRuntimeStarterUtils = new RuntimeStarterUtils(); |
183 mRuntimeStarterUtils = new RuntimeStarterUtils(); |
184 } |
184 } |
210 // Solves the UID of the application and sets the root path. |
210 // Solves the UID of the application and sets the root path. |
211 setUidAndRootPath(); |
211 setUidAndRootPath(); |
212 |
212 |
213 // Create the start screen and start it if needed. |
213 // Create the start screen and start it if needed. |
214 std::auto_ptr<java::util::DynamicLibLoader> coreUiLoader; |
214 std::auto_ptr<java::util::DynamicLibLoader> coreUiLoader; |
215 CoreUi& coreUi = CoreUi::getUiInstance(coreUiLoader); |
|
216 if (mUiParams.getScreenMode() != NO_START_SCREEN) |
215 if (mUiParams.getScreenMode() != NO_START_SCREEN) |
217 { |
216 { |
218 LOG(EJavaRuntime, EInfo, "StartUI"); |
217 LOG(EJavaRuntime, EInfo, "StartUI"); |
219 coreUi.start(mAppUid, &mUiParams); |
218 CoreUi::start(coreUiLoader, mAppUid, &mUiParams); |
220 LOG(EJavaRuntime, EInfo, "StartUI ok"); |
219 LOG(EJavaRuntime, EInfo, "StartUI ok"); |
|
220 } |
|
221 |
|
222 // Add the rest of the JVM args. |
|
223 for (std::list<std::wstring>::const_iterator iter = mFlagArgs.begin(); |
|
224 iter != mFlagArgs.end(); ++iter) |
|
225 { |
|
226 LOG1(EJavaRuntime, EInfo, "Adding args %S", iter->c_str()); |
|
227 mJvmStarter->appendRawJvmArgument(*iter); |
221 } |
228 } |
222 |
229 |
223 // Sets the -jar, -jad, -cp (or -classpath) args if were provided. |
230 // Sets the -jar, -jad, -cp (or -classpath) args if were provided. |
224 // Also a main class is set if needed. |
231 // Also a main class is set if needed. |
225 handleJadJarCpArgs(); |
232 handleJadJarCpArgs(); |