# Friday, August 2, 2002
« No Title | Main | No Title »
No Title

Stuart commented:

Btw, I'm just trying out your latest snapshot. I'll add further comments as I get further, but so far I had to make a couple of changes to let me build:

VS.NET treated "if (false)" on line 1732 of vm.cs as creating unreachable code. I changed it to "if (false.Equals(true))" so that it didn't treat it as a compiletime constant.

I'm used to using the if(false) construct, because that's the way to not get the compiler to complain in Java. Anyway, I just commented it out now, it's only there for debugging. So it will go away in the near future, I hope.

And the default compilation options disallowed unsafe code, so I had to change that in order for BigEndianBinaryReader.cs to compile.

Aren't you using my VS.NET project? That should include the proper switches for it to build, at least it builds on my machine ;-)

Okay, I've got it to the point of giving me an intelligent error at runtime, at least. Issues so far:

It doesn't (seem to) honor CLASSPATH, at least when run from a command prompt.

That is correct, for the time being it uses the IKVM_CLASSPATH environment variable. BTW, zips and jars are not supported (and won't be for a while, because I want to write the Zip/Jar class loader in Java. That isn't going to happen until after I've got the ahead-of-time compiler working).

Now the showstopper that I haven't been able to figure out how to get past. As far as I can see the download doesn't include *any* of the GNU Classpath libraries, which means that (as far as I can see) it can't run anything at all. I'm guessing that this is just a simple omission from the zip - is that right?

I don't include the classpath stuff to keep the zip small. I did earlier post a link to the compiled classpath classes that I use. I've created a new snapshot (many small changes) and also posted a zip containing the classpath classes plus a few of my own modifications (the source for those is in the classes directory in ikvm.zip).

Friday, August 2, 2002 10:12:28 AM (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Friday, August 2, 2002 8:15:41 AM (W. Europe Daylight Time, UTC+02:00)

Wow, it worked - my Java code actually gave a usage message! :)

When I tried to actually run my Java code it barfed with what seems to be a "native method not ported" error. Can you give me some hints on how I should implement this kind of thing? I'm assuming that for most native methods the idea is to implement them in C# code using the C# standard libraries. The particular method that was the first one to barf for me was File.isDirectoryInternal() which sounds like it should be pretty easy to port.

Also, do you know whether there's an easy way to generate patches in VS.NET? If I can fill in a few trivial native methods to make my code work, it'd be a waste for me not to give them to you to include in future releases. But I'm not really familiar with VS.NET and I don't see the equivalent of "cvs diff -u" ;)

I agree with you about if(false) - it surprised me that it doesn't work, but that seems to be the case. I was using your VS.NET project, or at least, I opened the whole thing from your .sln file, so I thought it should have picked up the right switches too.

I agree with not including the Classpath stuff in your snapshot, but just scanning through your blog, I couldn't immediately find the link to the classpath classes. Does radio.weblogs.com let you put static content including links into your blog? It might be worth having a "latest snapshot", "latest classpath classes" and "how to use this" (including at least the IKVM_CLASSPATH tip which I don't think I'd ever have figured out by myself) in the static header of your blog.

Friday, August 2, 2002 8:25:59 AM (W. Europe Daylight Time, UTC+02:00)

Never mind on the "tips on how to fix it" thing - I just found classpath.cs with all the "native" methods in it. Still interested in whether you know of an easy way for me to send you my fixes, though...
Comments are closed.