[Logo] VUE Users Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Login] Login 
If this is your first visit to the new VUE forums, you can login using the same username and password you currently use on VUE's website. If you need an account, please create one through VUE's website. If you have problems, please contact us via the contact form on http://vue.tufts.edu
sun.awt.shell.ShellFolder (jvm portability)  XML
Forum Index » Developers' Corner
Author Message
Neil Pilgrim


Joined: 09/01/2008 10:58:24
Messages: 19
Offline

Hi,

I am trying to test VUE using jython. The jvm for it is gij on debian (lenny, amd64), which appears to masquerade as java 1.5.0, but is gij version 4.3.2.

I can load the jar file ok (so far!) but in trying: (with CLASSPATH=$VUE_DIR/VUE.jar)
...then it complains about an absence of a class, namely sun.awt.shell.ShellFolder.

The same problem arises if I just try to run the VUE jar with gij itself. Previously I've been running 2.2.8 with the built-in installer version, which I understand is to disappear, but of course works fine since it has a java interpreter/whatever built-in.

Having done a bit of googling, this appears to be a problem with the fact that this class/function is not available in all jvm's - perhaps other than those from Sun.
Eg.
http://bugs.sun.com/view_bug.do;jsessionid=8b2d6a2a5b9cece145d5af23897?bug_id=5036988
http://bugs.sun.com/view_bug.do;jsessionid=c052c8d954c95ee24d9df303cb9?bug_id=4313887

I'm not sure if the VUE team has a policy on JVM portability at this point...

Ideas? (the first bug seems to have a potential workaround?)
(Not that this helps me, since I'm trying to parse 2.2.8 VUE files, and I'm guessing the nightly/3.x VUE doesn't load those?)

--
Neil
Mike Korcynski

[Avatar]

Joined: 08/08/2008 11:36:13
Messages: 749
Offline

Neil,

We don't have a policy on JVM portability, historically we are trying to put out a product that despite its cross-platform nature integrates as tightly as possible to the various OS's it runs on. In doing this we use a number of Cocoa classes on mac when running there and in this case you the ShellFolder class to get native icons from windows. Your case is a new one, and not one that we had originally set out to address, that said I'd be happy to try and address this for a future build, so that this class is only loaded for Sun JVMs and default java icons are used in other cases.

-Mike
Neil Pilgrim


Joined: 09/01/2008 10:58:24
Messages: 19
Offline

Mike,

Is there any chance of this appearing in a 2.3.x build? I just downloaded 2.3.1 and it still complains about ShellFolder not being there (using gij).

jamvm still complains about the Rectangle issue mentioned elsewhere too, but you hadn't commented on that issue I think.

UPDATE: There doesn't seem to be a change in either of these issues in 2.4preview7 either, which I assume would be the most up to date build at this time.

This message was edited 1 time. Last update was at 05/12/2009 21:32:53

Mike Korcynski

[Avatar]

Joined: 08/08/2008 11:36:13
Messages: 749
Offline

Neil,

I put in a change for the dependency on ShellFolder today it will appear in tomorrow's development build. Where do you stand on the Rectangle issue, did you have a workaround for that? Sorry, it's been a while on that one and I am not sure where we left off on that.

Thanks,
Mike
Neil Pilgrim


Joined: 09/01/2008 10:58:24
Messages: 19
Offline

Thanks Mike; I'll test it ASAP. Hopefully that'll be the only problem in gij.

The Rectangle problem was with another jvm: jamvm. I suspect the library is the same in both cases, but jamvm is very small and so also, I'm guessing, pedantic?

Its complaint is:
  java.lang.ClassCastException: java/awt/Rectangle;
    at tufts.vue.gui.TextRow.<init>(TextRow.java:86)
[lots of lines snipped]

I did some googling before and my guess then was that line 86:
  final Rectangle2D.Float closeBounds = (Rectangle2D.Float) mRow.getBounds();
has a cast which is not guaranteed to always work (Rectangle2D -> Rectangle2D.Float) - with the caveat that I'm not a java developer!
Other code I saw used x/y/width/height members of Rectangle2D, converted to floating point if necessary.

Any ideas?
Neil Pilgrim


Joined: 09/01/2008 10:58:24
Messages: 19
Offline

Update with daily build:

gij:


jamvm:


So both JVMs are complaining about the same problem now; gij seems to agree and clear on the issue about it being an invalid cast!
Mike Korcynski

[Avatar]

Joined: 08/08/2008 11:36:13
Messages: 749
Offline

Neil,

I put an update in for this, try tomorrow's build. Sorry, I had hoped to get both changes in before you tested.

-Mike
Neil Pilgrim


Joined: 09/01/2008 10:58:24
Messages: 19
Offline

Making progress, but gij says:



Quite confusing... there's a gij message after that, but I think its just due to the other bugs before it:


jamvm now says:



This feels like a classpath bug, unless you can suggest otherwise? I'm going to try some other implementations/versions and see how I fare.
 
Forum Index » Developers' Corner
Go to:   
Powered by JForum 2.1.8 © JForum Team