Subject | Re: Problems finding error messages |
---|---|
Author | ben_ata |
Post date | 2004-09-13T10:32:25Z |
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy" > The
following code is used to load error messages:
loaded dynamically at runtime using an URLClassLoader:
Class drvClass = this.classLoader.loadClass(this.driverClass);
Driver driverClassInstance = (Driver)drvClass.newInstance();
Then I call connect() on the obtained instance..
Regards
Thomas
following code is used to load error messages:
>firebirdsql*.jar
> InputStream in = GDSException.class.getResourceAsStream(res);
>
> if (in == null) {
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> in = cl.getResourceAsStream(res);
> }
>
> if (in != null)
> messages.load(in);
>
> It is relatively standard way to manually load resources. Please specify
> your deployment environment (web/application server, where
> files are located, if possible, what classloader loads the driver, etc.)I'm using it from within a Swing application. The actual driver is
loaded dynamically at runtime using an URLClassLoader:
Class drvClass = this.classLoader.loadClass(this.driverClass);
Driver driverClassInstance = (Driver)drvClass.newInstance();
Then I call connect() on the obtained instance..
Regards
Thomas