"wolfc" wrote :
| The first construct doesn't work if the deployment unit base is the VFS root. Then
there is no parent.
|
| I could do the following to eliminate the no parent problem:
What about if you just do a simple check?
| VFSDeploymentUnit parent = di.getParent();
| if (parent != null)
| {
| VirtualFile parentRoot = parent.getRoot();
| return parentRoot.findChild(jar).toURL();
| }
| else
| {
| URL url = di.getRoot().toURL();
| if (url.getPath().endsWith("/"))
| {
| return new URL(url, "../" + jar);
| }
| else
| {
| return new URL(url, jar);
| }
|
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211405#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...