# Plugin: Get the Classloader for the compiled classes

**URL:** <https://discuss.gradle.org/t/plugin-get-the-classloader-for-the-compiled-classes/34888>\
**Category:** Help/Discuss\
**Created:** [February 11, 2020, 3:12pm UTC](https://discuss.gradle.org/t/plugin-get-the-classloader-for-the-compiled-classes/34888 "2020-02-11T15:12:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MeFisto94](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MeFisto94](https://discuss.gradle.org/u/MeFisto94)\
**Post date:** [February 11, 2020, 3:12pm UTC](https://discuss.gradle.org/t/plugin-get-the-classloader-for-the-compiled-classes/34888/1 "2020-02-11T15:12:06Z")

</div>

Hello Guys,  
I’m developing a transpiler plugin and thus need to access all compiled .class files.  
I tried using `project.buildscript.classLoader`, but that seems to be the ClassLoader used by the build script only (i.e. containing the Plugin etc).

Now another plugin is solving it like this:

> <https://github.com/objectProgrammer/BytecoderGradle/blob/355813c077f9eb3582feb395e41893a4d5ad9c00/src/main/java/com/github/objectprogrammer/bytecodergradle/Task.java#L50-L68>

I would hope to find a more clean solution and also: Would this even pick up the dependencies I specified? It uses getCompileClassPath(), but runtime classes won’t be available, right?

Thanks in Advance 🙂
