javaruntimes/starterutils/src.s60/j9starters60.h
branchRCL_3
changeset 14 04becd199f91
child 24 6c158198356e
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This class is meant for starting the J9 JVM.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef J9STARTERS60_H
       
    20 #define J9STARTERS60_H
       
    21 
       
    22 #include "jvmstarterimpl.h"
       
    23 #include "javasymbianoslayer.h"
       
    24 
       
    25 /**
       
    26  * Provides a utilities for starting the J9 JVM in Symbian OS.
       
    27  */
       
    28 
       
    29 namespace java // codescanner::namespace
       
    30 {
       
    31 namespace runtime // codescanner::namespace
       
    32 {
       
    33 
       
    34 OS_NONSHARABLE_CLASS(J9StarterS60) : public JvmStarterImpl
       
    35 {
       
    36 public:
       
    37     /**
       
    38      * Default constructor of the J9StarterS60.
       
    39      */
       
    40     J9StarterS60();
       
    41 
       
    42     /**
       
    43      * Constructor of the J9StarterS60 with arguments. For the argument
       
    44      * description @see jvmstarte.h#getJvmStarterInstance method with
       
    45      * same arguments
       
    46      */
       
    47     J9StarterS60(const Configuration configuration,
       
    48                  const std::wstring& indetifier);
       
    49 
       
    50     /**
       
    51      * Destructor of the J9StarterS60.
       
    52      */
       
    53     virtual ~J9StarterS60();
       
    54 
       
    55     /**
       
    56      * @see jvmstarter.h
       
    57      */
       
    58     virtual int startJvm();
       
    59     /**
       
    60      * @see jvmstarter.h
       
    61      */
       
    62     virtual int startJvm(int argc, char** argv);
       
    63 
       
    64     /**
       
    65      * @see jvmstarter.h
       
    66      */
       
    67     virtual void overrideOldHeapSize(int heapSize);
       
    68 
       
    69     /**
       
    70      * @see jvmstarter.h
       
    71      */
       
    72     virtual void overrideNewHeapSize(int heapSize);
       
    73 
       
    74     /**
       
    75      * @see jvmstarter.h
       
    76      */
       
    77     virtual void overrideNativeStackSize(int stackSize);
       
    78 
       
    79     /**
       
    80      * @see jvmstarter.h
       
    81      */
       
    82     virtual void overrideJavaStackSize(int stackSize);
       
    83 
       
    84 private:
       
    85 
       
    86     /**
       
    87      * Sets the default arguments optimized for the MIDP runtime
       
    88      */
       
    89     void setDefaultArguments();
       
    90 
       
    91     /**
       
    92      * Adds the classpaths, main class, JIT configurations and thread
       
    93      * configurations to be part of the internal lists mJvmArgs and
       
    94      * mAppAndArgs.
       
    95      */
       
    96     void completeArgumentContainers();
       
    97 
       
    98     /**
       
    99      * Reads the platform ODC files from a file. Adds the ODC files
       
   100      * into bootclasspath and adds the defined system properties.
       
   101      */
       
   102     void setInternalOdcFiles();
       
   103 
       
   104     /**
       
   105      * Appends the odc file to J9 specific system property.
       
   106      * @param odcFile Th ODC file to be appended.
       
   107      */
       
   108     void appendOdcFile(const std::wstring& odcFile);
       
   109 
       
   110 #ifdef __WINSCW__ // codescanner::ifpreprocessor
       
   111     /**
       
   112      * Gets the used J9 dll varint in winscw. This is related to probelm that
       
   113      * JVM is using WSD in implementation dlls. There are available two
       
   114      * copies of the J9 dlls having named *_2.dll and *_3.dll. This method
       
   115      * check which one should be used.
       
   116      */
       
   117     void getJ9VariantL(); // For triplicate j9 dlls
       
   118 
       
   119     std::string* mVariant;
       
   120     RLibrary     mLibLoader;
       
   121 
       
   122 #endif
       
   123 
       
   124     /**
       
   125      * Enables the thread dumping feature.
       
   126      */
       
   127     void enableThreadDumpL();
       
   128 
       
   129 private:
       
   130 
       
   131     /**
       
   132      * For adding the odc files.
       
   133      */
       
   134     std::wstring mOdcExtDirProperty;
       
   135 };
       
   136 
       
   137 } //end namespace runtime
       
   138 } //end namespace java
       
   139 #endif // J9STARTERS60_H