Re: dynamic-environment class path issues

"Kjetil S. Matheussen" <[email protected]> Wed, 2 May 2007 22:16:21 +0200 (CEST)
Newsgroups gmane.comp.java.sisc.user
Message-ID <Pine.LNX.4.64.0705022207140.9024@ttleush>

On Wed, 2 May 2007, Amit Rathore wrote:

> Hi folks,
>
> This is my first post to this mailing group. I recently started using SISC
> in my project because between SISC, ABCL, Jatha, and JScheme - I felt that
> SISC was the most usable and active. However, I've run into an issue almost
> immediately - and I'd be very grateful for any help.
>

Out of interest. Why did you give up on JScheme? (I recently jumped to 
sisc as well, and wondered whether I should try jscheme or sisc. I landed 
on sisc since a short test showed that jscheme's macroexpand was just a 
macroexpand-1, and that fault scared me off a bit. Perhaps I should have 
looked more at it.)

Also, have you looked at kawa and sixx? I tried kawa a lot, and finally 
gave up because its too weird. Sixx seems _very_ nice though, but it 
doesn't provide very much.



> Basically, what's happening is this. I'm using S2J to make a call into a
> Java class method. The method takes a string which represents a class-name
> (eg. com.company.department.something.Entity) and uses Class.forName to load
> it. This is throwing a ClassDefNotFound exception.
>
> I know the code works because I also have a different solution that uses
> JRuby, and this same code works fine in that usage. I think the error has to
> do with the fact that the SISC library is somehow changing the classpath...
> I tried looking into this using the DynamicEnvironment class, and the
> classpath returned by the getClassPath method is an empty array.
>

For me, just setting the CLASSPATH environment variable before starting 
sisc works fine.


> Any insight would be greatly appreciated... I could continue down the JRuby
> road, but that would be sub-optimal... :(
>

I don't quite understand what you are trying to do. But I have written a 
nice interface to the s2j module: 
http://www.notam02.no/~kjetism/javaoo.tar.gz

With it you can do things like this:

(define entity (new <com.company.department.something.Entity>))
(-> entity methodname "class-name")


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/