change the class loading order google app engine java

Posted by Shekhar on Stack Overflow See other posts from Stack Overflow or by Shekhar
Published on 2009-10-19T11:51:31Z Indexed on 2010/04/24 16:53 UTC
Read the original article Hit count: 427

I am trying to create an application on google app engine using struts2. Struts2 internally uses freemarker .One of the Freemarker framework classes suppose X internally uses a class javax.swing.Treenode which is not in google app engine jre white list. Now in order to run my application i created a new class X in the same package structure as it was in freemarker framework and copied the class to WEB-INF classes.Then When i run my application it run fine. The problem is that i want to take out the class X from my application sourcecode and move it to newly created jar and place it in WEB-INF/lib folder. So that i can reuse the code in multiple project and my code remains clean of the freemarker code. But when i run the application it picks the old class X from the original freemarker framework.As a result i get ClassNotFoundException. Can anyone provide any help such that i can change the ClassLoading order such that my jar containing X class loads first.

© Stack Overflow or respective owner

Related posts about java

Related posts about class-loading