21 #include "logger.h" |
21 #include "logger.h" |
22 |
22 |
23 #include "jvmargsfilereader.h" |
23 #include "jvmargsfilereader.h" |
24 #include "argsmodifier.h" |
24 #include "argsmodifier.h" |
25 |
25 |
26 #ifdef __SYMBIAN32__ |
|
27 #include <AknGlobalNote.h> |
|
28 _LIT(KArgsTxt, "Note! Modified VM arguments used!"); |
|
29 #endif |
|
30 |
|
31 void logArguments(std::wstring aArg) |
26 void logArguments(std::wstring aArg) |
32 { |
27 { |
33 WLOG1(EJavaRuntime, " '%S'", aArg.c_str()); |
28 WLOG1(EJavaRuntime, " '%S'", aArg.c_str()); |
34 } |
29 } |
35 |
|
36 #ifdef __SYMBIAN32__ |
|
37 void showWarningDialogL() |
|
38 { |
|
39 ::CAknGlobalNote* globalNote = CAknGlobalNote::NewL(); |
|
40 CleanupStack::PushL(globalNote); |
|
41 globalNote->ShowNoteL(EAknGlobalInformationNote, KArgsTxt); |
|
42 CleanupStack::PopAndDestroy(globalNote); |
|
43 } |
|
44 #endif |
|
45 |
|
46 |
30 |
47 OS_EXPORT |
31 OS_EXPORT |
48 void java::runtime::modifyJvmArguments(const std::wstring& aIdentifier, |
32 void java::runtime::modifyJvmArguments(const std::wstring& aIdentifier, |
49 std::list<std::wstring>& aJvmArgs, |
33 std::list<std::wstring>& aJvmArgs, |
50 std::list<std::wstring>& aApplicationAndArgs) |
34 std::list<std::wstring>& aApplicationAndArgs) |
51 { |
35 { |
52 JELOG2(EJavaRuntime); |
36 PLOG(EJavaRuntime, "JVM File Argument modifier in use"); |
53 |
37 |
54 #ifdef __SYMBIAN32__ |
38 #ifdef __SYMBIAN32__ |
55 // Open the extension directory of the J9 VM. |
39 // Open the extension directory of the J9 VM. |
56 aJvmArgs.push_back(L"-Dcom.ibm.j9.ext.dirs=c:\\resource\\java\\jvm\\lib\\common;z:\\resource\\java\\jvm\\lib\\common"); |
40 aJvmArgs.push_back(L"-Dcom.ibm.j9.ext.dirs=c:\\resource\\java\\jvm\\lib\\common;z:\\resource\\java\\jvm\\lib\\common"); |
57 #endif |
41 #endif |
68 { |
52 { |
69 WLOG(EJavaRuntime, "new JVM arguments"); |
53 WLOG(EJavaRuntime, "new JVM arguments"); |
70 std::for_each(aJvmArgs.begin(), aJvmArgs.end(), logArguments); |
54 std::for_each(aJvmArgs.begin(), aJvmArgs.end(), logArguments); |
71 WLOG(EJavaRuntime, "new App arguments"); |
55 WLOG(EJavaRuntime, "new App arguments"); |
72 std::for_each(aApplicationAndArgs.begin(), aApplicationAndArgs.end(), logArguments); |
56 std::for_each(aApplicationAndArgs.begin(), aApplicationAndArgs.end(), logArguments); |
73 #ifdef __SYMBIAN32__ |
|
74 TRAP_IGNORE(showWarningDialogL()); |
|
75 #endif |
|
76 } |
57 } |
77 } |
58 } |
78 |
59 |