if( messages!=null )return;
if (appd== null) {
throw new IllegalArgumentException("appd==null");
}
LocalMessagesImplementor lmi = new LocalMessagesImplementor();
lmi.setCompiler(new org.gocha.jdk.JaninoCompiler());
lmi.setClassName(Messages.class.getName()+"Impl");
lmi.setInterface(Messages.class);
lmi.setClassRootDirectory(new File(new File(appd,"cache"),"classes"));
lmi.setMessageDirectory(new File(appd,"locale"));
// Устанавливаются по умолчанию
// lmi.setCacheByteCode(true);
// lmi.setFileFormat(LocalMessagesImplementor.FileFormat.xml);
// lmi.setMessageFilePrefix("messages");
Object o = lmi.getInstance();
if( o instanceof Messages ){
messages = (Messages)o;
return;
}
throw new Error( "failed init messages" );