private Stack<URL> getLibraries(File jsonFile)
    {
        Log.i("Loading libraries.");
        Stack<URL> libraries = new Stack<URL>();
        JarProfile profile = null;
        try
        {
            profile = Util.readObject(jsonFile, JarProfile.class);
        }
        catch (IOException e)
        {
            Log.w("Invalid jar profile loaded. Library loading will be skipped. (Path: " + jsonFile + ")");
            return libraries;
        }

        for (int i = 0; i < profile.libraries.size(); i++)
        {
            JarLibrary library = profile.libraries.get(i);
            if (library.isActive() && library.getFile() != null && library.getFile().exists())
            {
                try
                {
                    libraries.add(library.getFile().toURI().toURL());
                    Log.i("Found library: " + library.getFile());
                }
                catch (MalformedURLException e)
                {
                    Log.w("Unable to convert library file to URL with path: " + library.getFile());
                    e.printStackTrace();
                }
            }
            else
            {
                Log.i("Skipping library: " + library.name);
            }
        }

        return libraries;
    }