Problem loading / writing files.

Hi, im trying to create and load a file to the user's home directory as follows:
File f = new File(System.getProperty("user.home") + "/settings.xml");
if (f.exists() == false)
     try
          // If the file doesn't exist, create one.
          f.createNewFile();
          // Get the url.
          URL filePath = f.toURI().toURL();
The file is created properly and exists in the proper directory. However, when i try to use the URL to write out to
file later i get the following error:
C:\Documents%20and%20Settings\User\settings.xml (The system cannot find the path specified)
I believe this is due to the %20's within the URL, how can i remove / handle these? Am i doing something incorrectly?
Also, if the file exists, i try to load it with the following code:
URL filePath = this.getClass().getClassLoader().getResource(System.getProperty("user.home") + "/settings.xml")
However the URL that is return is null and i dont know why.
thanks for the help.

Why do you want an URL for the file? Use the File object to create a FileInputStream or FileReader.

Similar Messages

  • Problems loading RAW files from Canon 6D in Elements 10

    Elements 10 - Windows: I have been using the software for a couple of years and never had a problem loading RAW files from my Canon T2i ir 60D, however I just purchased a Canon 6D and when I try to load a RAW from the 6D I get Cannot open 'C:\User...CR2' because it is the wrong type of file.  I thought cameraraw 6.5 patch would be the fix but when trying to install I get "Error loading Updater workflow"

    Will the DNG files perform the same, meaning will I retain all the information that makes RAW important for processing?
    Yes. That's why DNGs were invented. Adobe has put a lot of work into the DNG format for this very reason.
    Raw files are proprietary and manufacturer specific. Raw formats change with every make and model of camera. Software must be updated for the new Raw format of every single camera. Adobe does an admirable job of upgrading Camera Raw for every new camera.
    DNG is also a Raw format but it's open source and works in any software which can read the DNG format. If camera manufacturers used the DNG format instead of their own Raw format, you would not have to upgrade Elements 10. But they don't, and probably never will, so you must upgrade the Camera Raw plugin (and therefore Elements 10 since it's not compatible with the new Camera Raw) to read the new Raw format from the 6D or add another step to your workflow with conversion to DNG first.
    See
    http://photographylife.com/dng-vs-raw
    http://www.adobe.com/products/photoshop/extend.displayTab2.html

  • Problems loading raw files from Nikon D750 to lightroom4

    problems loading raw files from Nikon D750 to lightroom4. Any thoughts?

    This is a recently produced model so raw support was only added in LR 5.7 / ACR 8.7, updates to LR 4 ceased about two years ago when LR 5 was issued.
    Options a.) Upgrade to LR 5.
    b.) Utilize the latest Adobe DNG Converter 8.8 to convert the nef files to dng format then you will be able to import the dng files into LR 4.

  • Problem loading XML-file using SQL*Loader

    Hello,
    I'm using 9.2 and tryin to load a XML-file using SQL*Loader.
    Loader control-file:
    LOAD DATA
    INFILE *
    INTO TABLE BATCH_TABLE TRUNCATE
    FIELDS TERMINATED BY ','
    FILENAME char(255),
    XML_DATA LOBFILE (FILENAME) TERMINATED BY EOF
    BEGINDATA
    data.xml
    The BATCH_TABLE is created as:
    CREATE TABLE BATCH_TABLE (
    FILENAME VARCHAR2 (50),
    XML_DATA SYS.XMLTYPE ) ;
    And the data.xml contains the following lines:
    <?xml version="2.0" encoding="UTF-8"?>
    <!DOCTYPE databatch SYSTEM "databatch.dtd">
    <batch>
    <record>
    <data>
    <type>10</type>
    </data>
    </record>
    <record>
    <data>
    <type>20</type>
    </data>
    </record>
    </batch>
    However, the sqlldr gives me an error:
    Record 1: Rejected - Error on table BATCH_TABLE, column XML_DATA.
    ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    If I remove the first two lines
    "<?xml version="2.0" encoding="UTF-8"?>"
    and
    "<!DOCTYPE databatch SYSTEM "databatch.dtd">"
    from data.xml everything works, and the contentents of data.xml are loaded into the table.
    Any idea what I'm missing here? Likely the problem is with special characters.
    Thanks in advance,

    I'm able to load your file just by removing the second line <!DOCTYPE databatch SYSTEM "databatch.dtd">. I dont have your dtd file, so skipped that line. Can you check if it's problem with ur DTD?

  • Problem loading resources file in JSP using f:loadBundle

    Hi,
    We are facing problem while loading our properties file in JSP using f:loadBundle.we tried the following way
    <f:loadBundle basename="resources.ApplicationResource" var="msg"/>
    This properties file is src java folder and also in WEB-INF-->classes->resources folder
    but even then its not able to load.I made an entry in the faces-config for message-bundle. But of no use.
    Any pointers would be of great help.

    does your file calls
    ApplicationResource.properties ?
    If so is it in
    the package resources ?

  • Having problem loading resource file in WAR

    Forgive me to post it here, I'm not sure where I should post this question.
              I'm using weblogic 5.1 with sp 9. In an WAR file, I put an resource file
              myapp.dtd as the follwoing:
              WEB-INF/classes/myapp.dtd
              WEB-INF/classes/mypackage/MyHello.class
              In MyHello.java, I'm loading myapp.dtd using an absolute path:
              getClass().getResourceAsStream("/myapp.dtd")
              This fails and returns null.
              However, if I put myapp.dtd in the same directory as MyHello.class
              WEB-INF/classes/mypackage/myapp.dtd
              WEB-INF/classes/mypackage/MyHello.class
              and use a relative path:
              getClass().getResourceAsStream("myapp.dtd")
              This sucessfully load the resource file.
              Does anyone know the problem with the first approach? Thanks.
              -gecko
              

    A correction, both approaches seem to fail if I deploy it in a WAR file.
              However, both of them succeeded if I deploy it as an exploded WAR file. So
              the problem is not absolute path v.s. relative path. It is a problem in
              weblogic class loader's handling of WAR file. I think this is clearly a bug
              in weblogic.
              "gecko" <[email protected]> wrote in message
              news:3b8fc81f$[email protected]..
              > Forgive me to post it here, I'm not sure where I should post this
              question.
              >
              > I'm using weblogic 5.1 with sp 9. In an WAR file, I put an resource file
              > myapp.dtd as the follwoing:
              >
              > WEB-INF/classes/myapp.dtd
              > WEB-INF/classes/mypackage/MyHello.class
              > ...
              >
              > In MyHello.java, I'm loading myapp.dtd using an absolute path:
              >
              > getClass().getResourceAsStream("/myapp.dtd")
              >
              > This fails and returns null.
              >
              > However, if I put myapp.dtd in the same directory as MyHello.class
              >
              > WEB-INF/classes/mypackage/myapp.dtd
              > WEB-INF/classes/mypackage/MyHello.class
              >
              > and use a relative path:
              >
              > getClass().getResourceAsStream("myapp.dtd")
              >
              > This sucessfully load the resource file.
              >
              > Does anyone know the problem with the first approach? Thanks.
              >
              > -gecko
              >
              >
              >
              

  • Problem loading from file

    my problem
    i have array which hold the color --->int this work fine [only one digit]
    i have another array which hold --->boardpiece [ some of have two digit]
    each time i call this function(below) it give me a number
    i am to confuse at moment i was siting here from morning and i still can get answer
    [this function read text and then send it to my load funtion in my board class
    i cant tell it read whole text first and then convert both didigt to one array]
    eg. 14
    it reads 1
    send 1
    reads 4
    send 4
    and then i have more elemen in my array------>i get error[i want it to send just 14]
    // i try send as array but at moment i cant do it " i will greateful
    some one give me some hint"
    for(int i=0; i<s.length(); )
         {  if (s.substring(i,i+1).equals("")) 
              else
             {  l=substring(i+i+1
            aload =Integer.parseInt(s);
              bboard.load(aload);
                   i++;
    my save file look like this
    1
    12
    15
    7
    14
    0
    thanks

    trouble understanding me english yours

  • Problem loading swf file in flash player 9.0.47.0

    Hi all!
    I have a really strange problem and couldn't find any information over the internet.
    The problem only occurs in flash player 9.0.47.0. It works in all the others players, newer and older..
    I try to load a swf file to my web application and get the following error: "This content requires Adobe Flash Player 10.2. Would you like to install it now?"
    the log file shows:
    *** Security Sandbox Violation ***
    SecurityDomain 'http://10.1.1.84:8080/app/jsp/flex/bin-release/LP_FLEX_project.html' tried to access incompatible context 'http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?0.5087 71003223956'
    Warning: Reference to undeclared variable, 'out'
    Warning: Reference to undeclared variable, 'out'
    Warning: 'out' has no property 'text'
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Warning: checkPort is not a function
    Warning: Reference to undeclared variable, 'xOffset'
    Warning: Reference to undeclared variable, 'yOffset'
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Warning: checkPort is not a function
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Does anybody has a solution??
    Thanks alot!
    Assaf

    Maybe FP9 does not support your application / swf file?  How did you develop it?

  • Problem in writing  file....

    hi
    i am using tomcat 5.0.19 what my application doing is allowing a user to upload a text file
    and before processing it the file is writen to the Specified path on server directory(for backup purpose).
    the problem is in writing the file. the file is written to the specified location but the size is
    reduced to approx 1/3 ie a file of 100 kb to 30kb. the code which i am using is given below..
    one more thing it is working fine except for one system . Is there any problem in tomcat or
    the code is creating some probs...
    plz help....
    public void writeToFile(String fileName) throws IOException, FileNotFoundException{
              //writes Uploaded File to the Specified path on server directory;
              OutputStream bos = new FileOutputStream(fileName);
              InputStream stream = destinationNumberFile.getInputStream();
            int bytesRead = 0;
              byte[] buffer = new byte[8192];
              while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
                             bos.write(buffer, 0, bytesRead);
            //close the stream
              bos.close();
            stream.close();
         }thanks in advance..

    if so try to call the flush() method on bos before close it.Closing implies flushing, there is no need to invoke it "by hand".

  • After Effects CS 11.0.4.2: Problem loading project file (error loading plugins etc.)

    Hello Adobe community,
    after creating a new project a few days ago, my After Effects CS6 v.11.0.4 has a problem with opening the project. Only this project can't open (everything else opens).
    I atteched some pictures to explain my problem better.
    I created a video in AE and used the warp stabilization. Ater 2 days i wanted to work on the project. If i open it up it loads and brings up a problem window. (see picture 1)
    It says "After Effects Problem: After Effects crashed while opening the Effect-Plugin 'warp stabilization'".
    By clicking "Ok", another problem window opens up. (see picture 2)
    It says "After Effects Problem: After Effects crashed while opening the Effect-Plugin 'auto color'".
    If i click "Ok", the next window comes up. (see picture 3)
    It says "Cash at Processing. Latest protocolled Notification: <6796> <ae.blitpipe> <2> Making New Context"
    After clicking OK again, it says i can save a copy of the project. (picture 4)
    This pops up after saving. (picture 5)
    After that AE cloeses.
    If i open up the new projectfile, it brings up this problem. (see picture 6)
    ---> "After Effects Problem: Missing Data in file"
    But sometimes it says "No valid file-type"
    What can i do? Every other project with warp stabilization opens up.
    Does this mean i have to start from the beginning?
    Is this problem known by anyone of the community?
    You can see the files by following the link and unzipping it: Dropbox - autobot_drive.zip
    Please help me!

    Can you import that problematic project into a brand new one?
    If you enable caps lock before opening the problematic project, does it open?

  • Problem loading SWF file in FlashIsland

    Hey,
    I am trying to use FlashIsland for ABAP WebDynpro.
    Unfortunately the SWF File is not loading. When I type the URL to the SWF File directly to the browser, the SWF file loads correctly.
    In the header I have posted the statement: initialize="initApp()". My initApp I have implemented, too (see below).
                   import sap.FlashIsland;
                   public function initApp():void
                        FlashIsland.register(this);
    What can be the problem there?
    First I thougt it might be a problem of my Internet Explorer configuration or the customizing of the SAP System. But when I execute the WDR_TEST_FLASH_ISLAND application everything works fine there.
    Thanks in advance for your help.
    Kind Regards,
    Thomas Weber

    So,
    I installed Flex Builder 3 with the Standard SDK 3.2.
    Now i implemented a very simple Flex Project again:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initApp()">
         <mx:Script>
              <![CDATA[
                   import sap.FlashIsland;
                   public function initApp():void
                        FlashIsland.register(this);
              ]]>
         </mx:Script>
         <mx:Label x="166" y="115" text="TEEEEESSSSSSSSSTTTTTT" width="399" height="161" id="LBL_TEST" enabled="true"/>
    </mx:Application>
    I get the same behavior like explained before. The Flash is not loading at all!
    And again I cant do any right click on the page. I get an empty page loaded...
    Please help me! What can be the problem?
    Nice regards,
    Thomas

  • Problems loading nib files after class is split into a static library.

    I've recently split a project so that the common re-usable controls are in their own class library. My original application project now references these using a cross project reference.
    However, since I have split the projects up, my original project crashes when it loads main.xib because it cannot find one of the custom classes which is defined in the library project.
    When I first split up the projects, I noticed that there were problems with the nib files not being able to find the IB outlets of the custom classes, but I managed to get around these by going importing the relevant library class files manually (File > Read Class Files…).
    I have made sure that all of the nib files compile without warning, so as far as I can tell, Interface Builder is able to read the necessary class headers, but when I try to run the app, it crashes saying that there is an unknown class in the Interface Builder file and that the class is not coding compliant.
    Are there any steps I've missed or advice on how to troubleshoot this?

    I did a bit of digging. The reason why this wasn't working is because the class in question was referenced by the nib files, but not in code. Therefore, while the code compiled and there were no warnings with the nib files, the linker was not linking the classes because no code used them directly.
    This can be fixed by going to the Project Settings, and on the Build tab, underneath the Linking heading, adding -ObjC to the Other Linker Flags section.

  • Problem loading old files from Bridge (CS6)

    just upgraded from CS5 to CS6 (originally had CS3) now when trying to load images which were loaded in 2002 when using CS3 I get an error message 'windows cannot find  C:\Program files(x86)\Adobe PhotoshopCS3\Photoshop.exe Make sure you typed the name correctly then try again' I assume that there is an association with a file that no longer exists how can I change this?

    I am starting to get the same thing. I had CS3&5 on my PC/Win7/64 desktop, along with CS6. CS3 was loaded, but has been deactivated for some time. I deactivated CS5 yesterday. Everything was running fine. Then, today, I unistalled both suites, 3&5. Now, when I try to open an image, raw or jpg, in Bridge, I get the same response as the OP.
    My file assoc. is Photoshop for raw and jpg, but it doesn't list a version, just PS.

  • Problem loading D610 files after Camera Raw 8.3

    I recently purchased a D610. I am running PS CS6 and Lightroom 4.4. I have loaded Camera Raw and DNG Reader 8.3. The 610 files now open in Bridge and CS6 but Lightroom 4 doesnt recognize them. Is Lightroom 5 required for upgrade to 8.3 to open 610 files.

    When you say you have loaded Camera Raw and DNG Reader 8.3, do you mean that you actually "installed" them? Actually, it isn't a DNG reader but a converter that is used to create DNG copies of raw files. It will be necessary for you to use it to convert your raw files in order for Lightroom 4 to be able to open them. The DNG converter does not automatically make it possible for earlier versions to read files from new cameras. The DNG converter is a standalone program that you will have to use outside of Lightroom to create your DNG files. Then you can import those files into Lightroom.

  • Problem loading .orf files into photoshop

    I have CC on both an iMac and a MacBook Pro
    .orf files will load into photoshop on the iMac but not on the MacBook Pro.  A popup appears which states need to update for latest RAW files.  I have run and installed the latest update but without success.  Since updating I've tried switching off and back on but with no success.
    What do I do next?

    Thanks partial success
    ACR was 8.3.  I've uploaded version 8.6 using the link provided and now able to read files into photoshop but
    1. Mini bridge does not show thumbnails only a place holder with no image
    2. The version on the iMac is 8.4 which I will also update but on both computers clicking on product update on Apple menu did not show the latest ACR update.  How can I arrange for auto updates without continually checking using the above link whether an update is available.

Maybe you are looking for

  • Error while conntecting to database

    I'm new to database connectivity through beans when i use the follwing code in my jsp file ==================================== <%@ page language="Java" import="java.sql.*" %> <jsp:useBean id="db" scope="request" class="sqlbean.DbBean" /> <jsp:setPro

  • Measure to count of rows in a calculation part of cube

    Hi All, Is it possible to create measure which shows me number of rows in a fact table? I'd like to create it using mdx syntax (in a query using WITH MEMBER [Measures].[Count]). Unfortunately, I can't modify cube definition, so I have to use mdx synt

  • I have lost my outlook contacts but they are available in icloud. How do I get them back in outlook on my PC?

    I was able to see my contacts in icloud contact group in outlook, but now I get an error. "The set of folder cannot be opened.The information stoerr could not be opened." I can see my contacts on my iphone and in icloud. can I somehow get these back

  • How to force an agg table for a particular report?

    Hi, We have a report which shows duplicate records from the same table. we assume that this is because the report is hitting the fact table instead the agg table. Is there any way to force the report to hit the Agg table and not the fact? We have tri

  • Implementing surrogate keys in dimensions

    hello, First thing, I'm new to ODI! I am using Oracle data integrator 10.1.3. I have a dimension table 'Dim_Contracts' as target table. The structure is as follows: PK_Dim_Contract Primary key (surrogate key - to be populated from an Oracle database