Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import dalvik.system.DexClassLoader;

public class Main {
    public static DexClassLoader createDexClassLoader(Context context, String dexPath, String optimizedDir,
            String nativeLibDir, boolean isDependent) {
        ClassLoader parentClassLoader;
        if (isDependent) {
            parentClassLoader = ClassLoader.getSystemClassLoader().getParent();
        } else {
            parentClassLoader = context.getClassLoader();
        }
        return new DexClassLoader(dexPath, optimizedDir, nativeLibDir, parentClassLoader);
    }
}