Eclipse applet viewer works but not browser

With the code below, my problem is that I am able to get the applet to work in eclipse but unable to get it to work in a regular IE browser. I tried various different ways of getting the path name. The code goes through printing **File name :edu/vt/vbi/pathport/client/plugin/pathinfo/pathinfo.xsl with the classloader being not null. However, it seems that the problem occurs when trying to get the url and then getting the input stream. myClassLoader.getResource(xslFileName); seems to be returning null according to the browser console but is retrieved okay by eclipse. any help would be much appreciated. thanks in advance.
String clsName = this.getClass().getName();
int lastDot = clsName.lastIndexOf('.');
String pkgName = clsName.substring(0, lastDot);
String xslFileName = pkgName.replace('.', '/');
xslFileName = xslFileName + "/pathinfo.xsl";
System.out.println("**File name :" + xslFileName);
ClassLoader myClassLoader = Thread.currentThread()
                         .getContextClassLoader();
URL url = null;
if (myClassLoader == null) {
          System.out.println("classloader is null");
} else {
     url = myClassLoader.getResource(xslFileName);
//InputStream is = myClassLoader.getResourceAsStream(xslFileName);
InputStream is = null;
try {
     if (url != null){
     System.out.println("url is " + url);
     is = url.openStream();
} catch (IOException e) {
     System.out.println("url null");
     e.printStackTrace();
if (is == null) {
     System.out.println("resource not found");
Transformer transformer = tFactory
                         .newTransformer(new javax.xml.transform.stream.StreamSource(
                                   is));

problem solved... jar path required extra / in order to be recognized. thanks

Similar Messages

Maybe you are looking for

  • Pavilion A6430f recovery error code

    Hi, I have a Pavilion a6430f desk top and I just replaced both hard drives on it. I inserted my recovery disk and began the recovery process when I received an error code of 0x400 100 130000 1002 as the hard drives were just beginning the reformattin

  • Adjusting presentation to audio length

    I'm using a complete song as the background audio to a presentation. I would like the slide presentation to end at the same time as the music ends. It requires testing to get it right, but so far, the only way I can see to do that is to play the enti

  • Internet sharing no more working after upgrading to 10.5.6

    With my early 2008 MacPro, I used to share my internet connection for my old iMacDV 400 (under MacOS 10.3.9). All the network and sharing settings were fine prior to the upgrade to 10.5.6. But after upgrading my MacPro to 10.5.6 I am no more able to

  • Skip Logic option does not appear

    12.12.2013 I watched the videos, updated today 12.12.2013, and the option for Skip Logic does not appear when inserting a page break as shown in the video. Is there another add-on that I need to purchase? This would make matters less confusing for pe

  • Sap workflow daily mail remainder

    Hi experts, I am using Workflow Scenario for travel request My requirement is like this... when a travel request is created 1.approve task should go to the manager of employee to approve.(done) 2.If he doesn't approve the request, a reminder mail sho