You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Roy Truelove <ro...@hotmail.com> on 2002/04/07 01:35:54 UTC

Classloader Problems

Hey folks,

I'm having a bit of what I think is a ClassLoader problem.  Here is my
problem code :

...
Driver tester = new sun.jdbc.odbc.JdbcOdbcDriver();
...

I'm using this code instead of Class.forName() to see if the compiler can
find the class.  The code compiles fine, but the class is not available at
runtime.  I've made sure that my rt.jar has this class, and that I only have
1 JRE in my path.  I *did* find a workaround for this problem, but what I
had to do was add this :

<pathelement path="${sun.boot.class.path}"/>

to my classpath element.  I know that's not right; if someone can tell me if
I'm doing something wrong, please let me know.

(please respond to list and to personal email; I don't have the quota to be
able to subscribe to the list)

Thanks in advance,
Roy





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Classloader Problems

Posted by Adam Murdoch <ad...@apache.org>.
On Sun, 7 Apr 2002 09:35, Roy Truelove wrote:
> ...
> Driver tester = new sun.jdbc.odbc.JdbcOdbcDriver();
> ...
>

Where are you running this code?  In a task?  An app?  A Junit test?  And how 
are you running it from ant?


Adam

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>