Applet can't Load a file from outside it's JAR??

My loading code: (note: I have also tried ...getResourceAsStream("menu.properties");... )
codeBase = getCodeBase();
InputStream is = getClass().getResourceAsStream( new URL( codeBase, "menu.properties" ).toString() );
if( is == null )
  System.err.println( "Couldn't load Menubar property file:: " + new URL( codeBase, "menu.properties" ).toString());
else this.properties.load( is );
is is always null. When 'menu.properties' is inside the JAR that contains my applet class files it loads it with the direct method (getResourceAsStream("menu.properties");) and everything is good.... but when it is outside the JAR no dice.
Anybody see what is wrong or know something I need to know before I can do this?
Thanks alot,
seth

>
My loading code: (note: I have also tried
...getResourceAsStream("menu.properties");.. )
codeBase = getCodeBase();
InputStream is = getClass().getResourceAsStream( new
URL( codeBase, "menu.properties" ).toString() );
if( is == null )
System.err.println( "Couldn't load Menubar property
y file:: " + new URL( codeBase, "menu.properties"
).toString());
else this.properties.load( is );
is is always null. When 'menu.properties' is
inside the JAR that contains my applet class files it
loads it with the direct method
(getResourceAsStream("menu.properties");) and
everything is good.... but when it is outside the JAR
no dice.
Anybody see what is wrong or know something I need to
know before I can do this?
Thanks alot,
seth
Solved my own problem:
docBase = getDocumentBase();
InputStream is = new URL( docBase, "menu.properties" ).openStream();

Similar Messages

  • I can not load RAW files from my nikon d810

    I Have a problem Reading RAW files from my nikon d810

    Thanks,
    Joop
    Op 26 jul. 2014 om 17:40 heeft Rikk Flohr <[email protected]> het volgende geschreven:
    I can not load RAW files from my nikon d810
    created by Rikk Flohr in Photoshop Lightroom - View the full discussion
    https://forums.adobe.com/search.jspa?q=D810
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6585986#6585986
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Lightroom by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Can I load xml file from SWC without using @embed

    I'm developing a mobile application in which I need to load xml files from File.applicationDirectory. This works great if the xml files are part of the main application swf. But I would like to move these xml files into a SWC so they could be shared across multiple applications.
    Using FlashBuilder 4.5, when a SWC is built, I can specify files to embed in the library that are not assets (Assets Tab of Flex Library Build Path). For various design reasons, I do NOT want to embed the xml files via @embed.
    When the swc is built and I open it up using a zip utility, I see the xml files in there just fine. So they are being bundled with the SWC. But how can I load these files in my main application that does not involve using @embed? When the main application is built, the swc setting for link type is "merged into code".
    I wouldn't expect the application to automatically pull out the xml files from the swc and place them in the File.applicationDirectory on the mobile device. I've tried loading from there just in case but file.exists is false (as expected).
    I've searched the web (and continue to do so) and all the answers seem to be to use @embed. Is there another way?
    Randy

    It's actually a lot easier than you think.
    Just reference the file like any'ol URL using a path relative to the SWC's src directory.
    So if you include the file "assets/xml/some.xml", just use that same string like you would any remote resource.
    For example:
    var loader:URLLoader = new URLLoader( new URLRequest("assets/xml/some.xml"));
    I believe it would also work like this "/assets/xml/some.xml", but I prefer relative paths so the link doesnt break if moved out of the SWC...

  • I can't load raw files from a Leica d-lux 6. Says it's an unsupported file. Help please!

    I cannot load raw files from a Leica d-lux 6.  Aperture says it's an unsupported file.  How do I get it to be a supported file?  Help, please!

    What is your Aperture version? Here is the list of supported raw formats for Aperture 3, see: Apple - Aperture - Technical Specifications - RAW Support
    Your camera is not on the list. Use the software that came with your camera to convert your raw files to dng or tiff images; then you can import the images into Aperture and work with them, while waiting for Apple to release raw support for your camera. Or shoot raw+jpeg pairs and use the jpeg while you are waiting.
    Is Mac OS X (10.5.1) really your current operating system? Then you may need to upgrade, when Apple finally releases raw support for your camera. The newest raw support required Aperture 3.4. to be installed.
    Regards
    Léonie

  • Jsp related.   user can down load a file from web when ever he clicks link

    hai pls do me favour its very urgent pls
    i have a link in jsp page if user clicks on a link ,,,,,,,,,, he will down load a file (page .....) and save to his worksapce or desktop.......pls help me

    Never mind...
    Message was edited by:
    Martin@Stricent

  • Can't load sql file from inside jar file?

    hi all
    i have a sql file inside my jar file
    and i want to get the path of the sql file to use it in runtime command to restore a sql dump file
    i used the following but it doesn't work:
    the path contains invalid characters such %20% instead of and?
    URL url2=getClass().getResource("backup.sql");
    String str1=url2.toString().substring(10);
    String command="cmd.exe /c  c:\\wamp\\mysql\\bin\\mysql -u root --password=anasa library < "+str1;       
    Runtime.getRuntime().exec(command);is this way is wrong?
    or there's an alternative way?

    How is the system to pull the data out of the jarfile?
    That redirection symbol means to take the information from the file, or here document, or command output that comes after it, but you don't have any of those. It will read that String as if it is a file name, but a file under that name doesn't exist. And, after you've changed it like you have, it doesn't even reference anything inside of a jar file anymore (not that the command could have used that anyway).
    If you insist on doing something like this, then you are going to need to read it with getInputStream and write it out somewhere (probably to a temp file) then use that tempfile and delete it when you're done.

  • I can't view the pdf files from outside without open them

    i had the adobe acrobat 7.0 version 7 installed on my pc
    when i upgraded it to version 9.0 , I can no longer see the cover of pdf files
    how i can view the pdf files from outside without open them
    please notice the divergence between these picture
    before
    after

    the problem becouse my windows is 64 bit
    i found a fix file , i try it and it works
    download
    http://www.pretentiousname.com/adobe_pdf_x64_fix/#downl

  • In anticipating upgrading to Premiere Elements 13, I need to know what "gotchas" there might be in loading project files from version 10 (in case someone needs another DVD/Blu-Ray)

    Particularly, can I load project files from version 10 (in case someone needs another DVD/Blu-Ray)

    cbjameson
    What computer operating system is involved?
    There is no guarantee that a project created in an earlier version can be opened in a later one. Many times it can, but...
    If you do try this, then please consider working from a copy of the project 10 project file and then trying to open that in 13/13.1.
    Reason: projects created in an earlier version and then opened and edited in a later version cannot be opened again in the
    earlier version.
    And, there is always the issue of maintaining the connect of the source media with the project file. Is this move from 10 to 13/13.1
    happening on the same computer and are the source media in the same place where they were when they were first imported
    into the 10 project. Disc menus consideration may enter into this depending on your details.
    ATR

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • How can I get Elements 12 to load raw files from my Nikon D5300. I have installed DNG Conv. 8.7.1

    I cannot get Elements 12 to recognise and load NEF files from my Nikon D5300. I have downloaded and installed the latest DNG coverter software 8.7.1 but Elements still refuses to load any NEF files.
    regards Ian.

    Hi,
    You shouldn't need to use the DNG converter unless you are using the MAC app version. The D5300 should be supported by Camera Raw 8.3 which should be compatible with Photoshop Elements 12.
    In the editor go to Help -> About Plug-in -> Camera Raw to see which version you have loaded. The latest for Photoshop Elements 12 is 8.5. If you have an older one then go to the Help menu and select Updates.
    If you are up to date, then you may have use old Nikon software to access the NEF files and that is known to corrupt them so that Photoshop Elements can't read them.
    Brian

  • I have transferred a load of files from my PC to my iMac using the migration assistant.  The message on both machines say that the process was successful bu tI can not find the files on the mac.  Any ideas?

    I have transferred a load of files from my PC to my iMac using the migration assistant.  The message on both machines say that the process was successful but I can not find the files on the mac.  Any ideas?

    When you use Migration Assitant it creates another user account and puts your files there. Please log out of your normal account and log into the new account. Had you use Setup Assistant when it asked if you were migrating that would not have occured. You have a couple of options, combine the two accounts (not recommended) or start over, use Setup Assistant and have everything in one user account. Here is a link to Pondin's guide for Lion Setup Assistant tips however if you want to combine the two accounts he has addressed that in
    http://pondini.org/OSX/Transfer.html

  • Load Flat File from App Server

    HI, all.
    I want load flat file from appliation server. I created CSV file and loaded it on app. server with FM ARCHIVEFILE_CLIENT_TO_SERVER. After I created datasource and tried load data in the infocube. In this procedure I encountered with two problem
    1. When I look file in AL11, I doesn't see cyrillic symbols, instead this symbols I see #.
    2. When I try load data with data source, I get exception RS_EXCEPTION 000 "File don't open"
    Anybody can help me resolve this problem?
    wbr, Fanil.

    Hi, kodanda pani KV.
    2. File is was closed.
    1. Can me you clearly explain what you meen?
    wbr, Fanil

  • Infopackage-Load Many Files from Application Server and later Archive/Move

    Hi All..
      I have a doubt,   I have a requirement of take many files to load into BI 7.0..  I used the infopackage before with option:
    Load Binary File From Application server
      I load information successfully... only with one file ...but If I can load many files (with different names) like the next list.. I think it's not a good idea modify the file name (path) on infopackage each time).. :
    *All of this files will be on one server that itu2019s map into AL11.. Like
    Infopfw
    BW_LOAD_20090120.txt
    BW_LOAD_20090125.txt
    BW_LOAD_OTHER_1.txt
    u2026.
    Etc..
    This directory it's not in BW server.. It's other server..but I can load form this location (one file by one)
    Could you help me with this questions:
    -     How can I Use an infopackage with routine that take all the files..one by oneu2026 in order of creation dateu2026and load into Target? Is it possible?.. I have some knowledge of ABAP.. but I don´t know exactly how I can say to system this logicu2026
    -     In addition is it possible move this files to other locationu2026 like into Infopfwarchive u2026 just to have an history of files loaded.
    I saw that in infopackage you have an option to create a routine.. in ABAP codeu2026 Iu2019m a little bit confused because I donu2019t  know how I can specify all the path..
    I try with:
    Infopfw
    InfopfwFile.csv
    Infopfw
    This is the abap code that automatically you see and you need to modifyu2026
    Create a routine for file name
    This routine will be called by the adapter,
    when the infopackage is executed.
              p_filename =
              p_subrc = 0.
    Thank you for your ideas or recommendations.
    Al

    Hi Reddy, thank you for your answer
    I have some doubuts.. when you explain me the option:
    All the above files are appending dates at the end of the file....
    You can load the files through infopackage by using Routines and pick the files based on date at the end of the file..***
    I need to ask you if you think that when you know the date of the file and the infopackage pick each file... thi can work for many files??... or how it's possible control this process?
    About this option, I want to ask you If when you menction Unix code... where it's programed this code?.. in the routine of BW Infopackage??
    ****Or
    Create two folders in your BW in Application server level, in AL11 (ask Basis team)
    I call it is F1 and F2 folders.
    First dump the files into F1 I assume that the file name in F1 is "BW_LOAD_20090120.txt", using Unix code you rename the file and then keep in the same foleder F1 or move to F2.
    Then create InfoPackage and fix the file name (i.e. you renamed), so you don't need to change everyday your file name at infopackage level.Because in AL11 everyday the file are overwrite.
    To I get BW_LOAD_20090120.txt file in F1, then I renamed to BW_LOAD.txt and loaded into BW, then tomorrow I get BW_LOAD_20090125.txt in F1, then I renamed to BW_LOAD.txt....
    so in this way it will work.You need to schedule the Ubix script in AL11.
    This is the way how to handle the application server...I'm using the same logic.
    Thank you soo much.
    Al

  • Load XML file from addon domain without cross-domain Policy file

    Hello.
    Assuming that there are two addon domains on the same server: /public_html/domain1.com       and      /public_html/domain2.com
    I try to load XML file from domain2.com into domain1.com without using cross-domain policy file (since it doesn’t work on xml files in my case).
    So the idea is to use php file in order to load XML and read it back to flash.
    I’ve found an interesting scripts that seems to do the job but unfortunately I can't get it to work. In my opinion there is somewhere problem with AS3 part. Please take a look.
    Here are the AS3/PHP scripts:
    AS3 (.swf in www.domain1.com):
    // location of the xml that you would like to load, full http address
    var xmlLoc:String = "http://www.domain2.com/MyFile.xml";
    // location of the php xml grabber file, in relation to the .swf
    var phpLoc:String = "loadXML.php";
    var xml:XML;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(phpLoc+"?location="+escape(xmlLoc) );
    loader.addEventListener(Event.COMPLETE, onXMLLoaded);
    loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
    loader.load(request);
    function onIOErrorHandler(e:IOErrorEvent):void {
        trace("There was an error with the xml file "+e);
    function onXMLLoaded(e:Event):void {
        trace("the rss feed has been loaded");
        xml = new XML(loader.data);
        // set to string, since it is passed back from php as an object
        xml = XML(xml.toString());
        xml_txt.text = xml;
    PHP (loadXML.php in www.domain1.com):
    <?php
    header("Content-type: text/xml");
    $location = "";
    if(isset($_GET["location"])) {
        $location = $_GET["location"];
        $location = urldecode($location);
    $xml_string = getData($location);
    // pass the url encoded vars back to Flash
    echo $xml_string;
    //cURLs a URL and returns it
    function getData($query) {
        // create curl resource
        $ch = curl_init();
        // cURL url
        curl_setopt($ch, CURLOPT_URL, $query);
        //Set some necessary params for using CURL
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       //Execute the curl function, and decode the returned JSON data
        $result = curl_exec($ch);
        return $result;
        // close curl resource to free up system resources
        curl_close($ch);
    ?>

    I think you might be right about permissions/settings on the server for php. Unfortunately I'm not allowed to adjust them.
    So I wrote my own script - this time I used file path instead of http address of the XML file.  It works fine in my case.
    Here it is:
    XML file on domain2.com:
    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <image imagePath="galleries/gallery_1/images/1.jpg" thumbPath="galleries/gallery_1/thumbs/1.jpg" file_name= "1"> </image>
        <image imagePath="galleries/gallery_1/images/2.jpg" thumbPath="galleries/gallery_1/thumbs/2.jpg" file_name= "2"> </image>
        <image imagePath="galleries/gallery_1/images/3.jpg" thumbPath="galleries/gallery_1/thumbs/3.jpg" file_name= "3"> </image>
    </gallery>
    swf  on domain1.com:
    var imagesXML:XML;
    var variables:URLVariables = new URLVariables();
    var varURL:URLRequest = new URLRequest("MyPHPfile.php");
    varURL.method = URLRequestMethod.POST;
    varURL.data = variables;
    var MyLoader:URLLoader = new URLLoader;
    MyLoader.dataFormat =URLLoaderDataFormat.VARIABLES;
    MyLoader.addEventListener(Event.COMPLETE, XMLDone);
    MyLoader.load(varURL);
    function XMLDone(event:Event):void {
        var imported_XML:Object = event.target.data.imported_XML;
        imagesXML = new XML(imported_XML);
       MyTextfield_1.text = imagesXML;
       MyTextfield_2.text = imagesXML.image[0].attribute("thumbPath");  // sample reference to attribute "thumbPath" of the first element
    php file on domain1.com:
    <?php
    $xml_file = simplexml_load_file('../../domain2.com/galleries/gallery_1/MyXMLfile.xml');  // directory to XML file on the same server
    $imported_XML = $xml_file->asXML();
    print "imported_XML=" . $imported_XML;
    ?>
    Regards
    PS: for those who read the above discussion: the first and the second script work but you must test which one is better in your situation. The first script will also work between two domains on different servers. No cross domain policy file needed.

  • I can't load some content from my external hard drive to itunes,

    I can't load some content from 1 of my external hard drive to itunes, it can see it and try to load the folder / files but it doesn't appear, these files worked recently as some of them are currently on my ipod touch - I had to factory restore my laptop this week (virus) so have been trying to put everything back on to sync ipod - any ideas???

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

Maybe you are looking for

  • How do I stop the + symbol from appearing in my form fields

    I've been using Acrobat 10 Pro for some time now to create and fill forms. Recently when I populate any field with data, a "+" symbol also shows up. I haven't a clue about what turned this on or how to turn it off. Please help! I need to get this bat

  • Problem with email touches

    Hi, Since 3.1.1 version, the following touches which used to exist with the ex-version have disappeared from my email page on my ipod touch : "forward, delete, archive". Instead there is just a black bar...That means that I cannont do any thing with

  • Dead ti4800?

    I believe my ti4800 just kicked the bucket today.  I was playing Lineage 2 and i got a series of vertical colored lines w/ tiny black boxes in it.  basically my vga display went to hell.  I restarted and loaded up a game - happened again! could it be

  • Changes in fields of SC trigger Email back to Requestor

    Hello! All I am using n-badi workflow for shopping cart. There is no start condition for this workflow. When a approver makes a change in price , a e-mail triggers back to requestor to ACCEPT CHANGES OR REJECT CHANGES. When an approver makes a change

  • Customization examples

    Hi everybody, I would like to request you all for the examples of custom developed info objects, infocubes, ODS objects, infosources and queries etc. and also the situations and environment which led you to do so? Thanks in advance. Anita