Accessibility

TechNote (Archived)

JRun 4: Error '500 Could not invoke Java compiler' when compiling JSP

Issue


The following error may be seen when compiling a JSP page:

 500 Could not invoke Java compiler, please make sure jikesw is in C:\JRun4/bin or put a JDK bin directory in your path.  jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could not invoke Java compiler, please make sure jikesw is in C:\JRun4/bin or put a JDK bin directory in your path.  at jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:467)  at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:132)  at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:100)  at jrun.jsp.Translator.compilePage(Translator.java:176)  at jrun.jsp.Translator.translate(Translator.java:254)  at jrun.jsp.Translator.translate(Translator.java:101)  at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:693)  at jrun.jsp.JSPServlet.translate(JSPServlet.java:125)  at jrun.jsp.JSPServlet.service(JSPServlet.java:113)  at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)  at jrunx.util.DynamicClassLoaderFilter.doFilter(DynamicClassLoaderFilter.java:48)  at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)  at jrun.servlet.FilterChain.service(FilterChain.java:101)  at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)  at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)  at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)  at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)  at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)  at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)  at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 

Reason


JRun 4 running on a Windows server has a limit of 32,768 characters in length for its classpath. This is due to a Windows API limitation that limits environment variables to 32K in length. JRun uses this API call on Windows when running the Java compiler.

Solution


There is no fix for this, as it is a Windows limitation. This problem does not occur with other operating systems.

A workaround for this issue is to use short directory names and structures. Instead of placing class files or JAR files many sub-directories deep, place them in a directory right off the root directory, for example C:\myJars. Keeping short directory paths allows the use of a classpath with more individual JAR files.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:7f887f12
OS:Windows (All)

Products Affected:

jrun