What about reflection: Class.forName("java.io.File")
This is supported by all JDK versions, but I don't know about the bean
shell (tricky!). If reflection could be used we wouldn't have to mess
with classpaths, etc.
Allan
> >>>>> "John" == John Olsson <[EMAIL PROTECTED]> writes:
>
> >> Actually, this should not be too difficult to implement almost
> >> entirely in Java. You can get the classpath from
> >> System.properties.
> >>
> John> Is this really true? I think I tested that in JDK 1.2 and all
> John> I got was the CLASSPATH, not the bootclasspath (which contains
> John> rt.jar etc). I think you can get to the bootclasspath via a
> John> sun.<something> property, but this is something that will only
> John> work for SUN JDK 1.2 and this property might be removed in the
> John> future.
>
> John> But perhaps just the entries in the CLASSPATH is enough?
>
>
> What about the "Package" class. Its 1.2 only, but it includes
> the method getPackages(). Whilst this method is a little dubious in
> the sense that it returns only the packages now to the Callee's
> classloader (which might cause some problems for with the two
> classloaders on 1.2). Once you have a list of all the package names
> you should be able to do a class name lookup by iterating through all
> the package + name combinations. Dont know how long this would take
> though.
>
>
> Phil