diff --git a/framework/src/play/classloading/ApplicationClassloader.java b/framework/src/play/classloading/ApplicationClassloader.java index 920f59da24..baf572ab46 100644 --- a/framework/src/play/classloading/ApplicationClassloader.java +++ b/framework/src/play/classloading/ApplicationClassloader.java @@ -262,7 +262,13 @@ public URL getResource(String name) { return res.getRealFile().toURI().toURL(); } } - if (Play.configuration.getProperty("play.bytecodeCache", "true").equals("true")) { + if (Play.usePrecompiled) { + File file = Play.getFile("precompiled/java/" + name); + if (file.exists()) { + return file.toURI().toURL(); + } + } + else if ("true".equals(Play.configuration.getProperty("play.bytecodeCache", "true"))) { File f = new File(Play.tmpDir, "classes/" + name); if (f.exists()) { return f.toURI().toURL();