Opening a file in Windows - Backslash

Hi all,
I am creating a code to save a file in MySQL, by selecting the file using a FileChooser. When the FileInputStream gets the string, I am receiving and error saying the file does not exist.
I have tried replacing the backslash with forwardslash, but the error persists. The issue does not occur if I directly write the string with the forwardslash. I am lost.
This code works:
String NOMDOC = "C:/tlmconf.txt";
InputStream io = new FileInputStream(NOMDOC);
PreparedStatement stFile = conn.prepareStatement("INSERT into ....")This code does NOT work
    // PADoc is the variable getting the result from the FileChooser.
    String PADoc2 = PADoc.replace("\\","/");
    InputStream io = new FileInputStream(PADoc2);
    PreparedStatement stFile = conn.prepareStatement("INSERT into ....");I need the second code to work.
Any help will be more than welcome.
Regards, Jose.
Edited by: 878426 on Aug 9, 2011 7:50 PM
Edited by: 878426 on Aug 9, 2011 7:50 PM
Edited by: 878426 on Aug 10, 2011 5:41 AM

878426 wrote:
Hi all,
This code does NOT work
// PADoc is the variable getting the result from the FileChooser.
String PADoc2 = PADoc.replace("\\","/");
No need to use replace. Below are the links which may help you:
http://download.oracle.com/javase/tutorial/uiswing/components/filechooser.html
http://www.herongyang.com/Swing/JEditorPane-File-Chooser-Dialog-Box.html

Similar Messages

  • I cannot open a pdf file with aole-mail. I can open pdf files from windows explorer. I have associated pdf with adobe reader. My operating system is window

    I cannot open a pdf file with aol e-mail. I went to preferences in Adobe Reader but did not know what to enter for Incoming IMAP and outgoing SMTP. I can open pdf files from windows explorer as  I have associated .pdf files with adobe reader. My operating system is windows 7.
    When I try to open the pdf file within aol e-mail I get a message: 'Your security settings do not allow this file to be downloaded'.  I have not changed my security settings (Tools, Internet Options, security).

    Or http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Can't open PDF files from Windows Explorer on Windows 8.1

    Hello,
    after I've upgraded to Windows 8.1, I can't open PDF files from Windows Explorer (directly double clicking the file). The AcroRd32.exe runs in the background (2x !) as I see the processes in task manager, but there is no user interface visible. I have Acrobat
    Reader 11.0.06, the desktop version (not Metro). I tried uninstalling the Acrobat reader and installing it again but this didn't help. The only way to open PDF files is to close the AcroRd32.exe from the task manager, open empty Acrobat Reader from the desktop
    and then drag&drop the PDF file over that window. This is quite inconvenient. Is there a way to fix this issue so I can open PDF files directly from windows explorer?
    Many thanks!

    I had to install adobe reader, but   PDF's used to display just fine with IE, any idea what happened ?
    Windows 8.1 pro.
    thx
    lee

  • Windows 2k8R2 - Receiving Error when logging in ( MMC Cannot open the File: C:\Windows\system32\ServerManager.msc)

    Windows 2008 R2 - I just started receiving this when i log in, and also when i try to manage the machine:
    MMC Cannot open the File:
    C:\Windows\system32\ServerManager.msc
    This may be because the file does not exist , is not an MMC console , or was created by a later version of MMC. This may also be be because you do not have sufficient access rights to the file.
    This always worked before, and works for other users just not me on this particular box. This is a production box and i need a resolution quick please. Thanks in advance.
    PM

    Has the system update readiness tool been run without error?
    http://windows.microsoft.com/en-US/windows7/What-is-the-System-Update-Readiness-Tool
    Then check the %SYSTEMROOT%\Logs\CBS\CheckSUR.log file for errors.
     You can also try creating a new MSC
    Start|Run|"mmc"|File|Add/Remove|Server Manager|Add|Local|OK|OK|File|Save As
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Adobe reader 10.1.2 could not open the file '/C/WINDOWS'

    since adobe reader 10.1.2 urls don't work in pdf files to folders.
    C:\WINDOWS\xy.xls  
    ok
    C:\WINDOWS
    not ok > adobe reader 10.1.2 could not open the file '/C/WINDOWS'
    C:\WINDOWS
    ok > with deactivated protected mode
    no problems with 9.5.0 or 10.1.1 with activated protected mode 
    is that known? any other workaround?
    thanks

    Hi,
         I also have Reader 10.1.2 installed on my machine and I also cannot open a link in the PDF, that will eventually call an exe file. I don't think that there would be different behaviour on your machine. So, I think, now this is the expected behaviour Reader 10.1.2 onwards.

  • SAP Management Console : Error MMC cannot open the file "C:\WINDOWS\sapmmc.

    Hi Experts,
    We are installing the xmii system on a server, it was not installed completely.
    Now we have deleted the xMII folders from Add and Remove in Control Panel.
    After deleting these folders, when we are opening SAP Management Console, it is giving one <b>Error MMC cannot open the file "C:\WINDOWS\sapmmc.msc."</b>
    Please help us to resolve this problem, we have no idea to resolve the same.
    Regards,
    Study SAP

    Hi,
    Looks like your mmc dll is corrupted, with your install and uninstall of software.
    Two Options:
    1. Upgrade the Kernel with latest Patch level, which comes with new SAPMMC.dll file
    OR
    2. Just download the SAPMMC*.sar file from service market place and extract in exe directory, since it is windows re-booting the server doesn't hurt.
    Hope this helps. points are welcome.
    -K

  • 'MMC cannot open the file C:\Windows\SAPMMC.MSC'

    Hi
    When I try and run SAPMMC on the desk top I get the error :
    'MMC cannot open the file C:\Windows\SAPMMC.MSC'
    this is because the file does not exists, is not an MMC console, or was created by a later version of the MMC'
    I have full permissions on this server, has anyone seen this error before?
    The file C:\Windows\SAPMMC.MSC does exist, infact there is a .1, .2, .3 and .4 version in C:\Windows.
    Thanks for any help.

    Hi,
    Check out following link and notes inside it.
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=936273]
    Hope this helps.
    Manoj Chintawar

  • Error:Cannot open the file c:\windows\sapmmc.msc

    Hi Folks,
    I have been using SAP IDES ECC 6.2 for a while and now all of a sudden encountered a problem CANNOT OPEN THE FILE C:\WINDOWS\SAPMMC.MSC.
    I am a technical consultant and i know nothing about basis and sap installations.
    Is this error so fatal? How can i fix the problem..
    Thanks in advance.
    Ranjith kumar.

    Hi
    Ranjith
    Hi,
    Looks like your mmc dll is corrupted, with your install and uninstall of software.
    Two Options:
    1. Upgrade the Kernel with latest Patch level, which comes with new SAPMMC.dll file
    OR
    2. Just download the SAPMMC*.sar file from service market place and extract in exe directory, since it is windows re-booting the server doesn't hurt.
    Regards
    Bhaskar

  • How open xmp file in window 7

    When I do post processing by Raw, XMP file automatically created.
    1.How open this file in window 7?
    2. I need keep this file because I have same file in Adobe 12?
    3. What happened if delete it?
    4. If it not need how prevent to created it?

    Also before go to any adjustment we can ( I always do)   made copy or duplicate the  original and working with the copy.
    This is completely unnecessary.
    Adobe software never overwrites or modifies your RAW files. (Not true for original JPG files, in which case Adobe software could overwrite the original JPG file)
    It has nothing to do with saving as DNG or saving as JPG. Furthermore, if you are editing a RAW, in general I see no point to save it as a DNG, when saving it as a RAW by clicking on "DONE" accomplishes the same thing.

  • Why does Illustrator crash when opening a file on Windows 8.1

    This morning I opened Illustrator and opened the file I was working on and the app crashed. It happened even when I tried to make a new document. I have CC, CC 2014 and CC (64-bit) and they all do the same thing. I'm running a Surface Pro 2 on Windows 8.1. Any ideas?

    I don't get a error message from the program itself. Windows decides to shut down illustrator. If I had just bought myself a mac...
    The next message from windows is:
    I've installed Design and web CS6. Each program works without issues except illustrator.

  • Bizarre error when trying to open .fla files in Windows Explorer

    "Windows cannot find '(path of the .fla file INCLUDING the filename)'. Make sure you typed the name correctly, and try again. To search for a file, click the Start button, and then click Search." error message given when I click on any .fla file in Windows Explorer to open it in Flash 8 Pro (as I've ALWAYS done before). Flash opens but no file is opened in it. If I click the fla file a second time THEN it opens in Flash (which is already opened from the first attempt.). This never happened before. I have 2 more laptops that work fine (as did THIS Win XP-SP3 pc until about a week ago), ALL with Flash 8 Pro (1 laptop w/XP-SP3 - just like the main PC with the new 'problem'), 1 laptop w/Vista Ultimate SP2. Even compared registry entries from XP laptop side-by-side - no differences at all. Everything is literally 'word-for-word'. Also compared FileMap.xml - no differences. Reinstalled Flash (no success) then out of frustration reinstalled XP with full disk format (and then everything else all over again - took 3 days) - still no success. Files open from the Flash 'File\Open' menu no problem - just not from Windows Explorer anymore. Nothing is different than before (when everything was ok - same installed programs, apps, updates, exact same 'set-up' as far as Windows drivers, system settings, prefs etc goes. VERY bizarre!

    As you know Flash 8 was a Macromedia product. They don't exist anymore - being absorbed by the all powerful, all seeing, all knowing Adobe Systems (sort of reminds me of the BORG on Star Trek - you know 'Resistance is futile').
    I tried literally everything - to no avail. Since I did try everything - up to and including a complete HDD full format and OS reinstall (which only accomplished deleting several days of my life that I'll never get back) I have come to the conclusion that it must be something inherent in the program that only affects installations performed after 12/31/12.
    My 2 laptops have no issues because the program has been on them for years and has never been reinstalled, but I would be willing to bet if I had to reinstall it on them I would start getting the same problem (since it's now past 12/31/12).
    On 12/31/12 Adobe did something in a way 'similar' to CS2 owners by rendering the activation of CS2 products inoperative. I found this out the hard way after I had just reinstalled everything while trying to deal with this issue. I had to spend hours on the phone to finally get the news from 'Dave' in Indonesia that Adobe decided to just arbitrarily render their CS2 customers paid-for software obsolete and inoperative! (Out of fairness they DID provide 'replacement' apps that don't require activation - thus avoiding MEGA lawsuits).
    Anyway - I'm just saying that software makers can build anything into their product, including date specific limitations without the consumer ever being aware of it.
    With the exception of this issue it otherwise works fine, and I guess I'll just have to deal with it from now on by dbl-clicking on Fla files TWICE instead of once - otherwise affectionately known as 'quadruple-clicking', (but if you count closing the error window then it's 'quintuple-clicking').
    I don't mind being proven wrong - so if somebody out there knows what is going on here (besides my theory of software developers time limitations resulting in complete world domination) feel free to reply. I'll get an email telling me someone replied and I'll come to this post and have a look.
    (suggestions to reinstall will be ignored - been there, done that)

  • Can't open pdf files in Windows 8 with Acrobat XI

    I have windows 8, and Mozilla Thunderbird email client.  When attempting to open PDFs I get this message "Adobe Reader could not open 'Wiring Invoice 409343281 Dated 04_05_2013-2.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."  I have tried documents from numerous different sources, all with the same result.  I have uninstalled, reinstalled, repaired, restarted, etc.  I did not have this issue with XP and Acrobat reader X.   HELP!!  I cannot print invoices until this is corrected....thanks!

    Hi,
    Are you try to open PDF file attachments from Mozilla Thunderbird.?
    Could you try to save the PDF file locally and then try to open the PDF file?
    Or try downloading sample PDF from here http://www.samplepdf.com/sample.pdf and open it in Adobe Reader.
    Thanks

  • Why i can't open freehand files in Windows which are created in Mac??

    As i use Mac to operate freehand in my company. But when i open those files at home by using Windows freehand, i can't open them? Why?? Please help..thanks!

    Most obvious - make sure the Mac file have the correct ".FH10" file extension.
    I use FHMX on Windows7 and regularly open Mac files from FH8 without any dramas.
    Try back-saving the Mac files to FH8 (with .FH8 file extension) and opening those on the PC.
    Failing that, convert individual layers to PDF open those on the PC and re-assemble the drawing.
    Good Luck

  • Cannot open Excel files on Windows share and ONLY Excel files

    I'm browsing a Windows share and for whatever reason it will not let me open Excel files directly from the network location. If I view the Coverflow, I can see a a preview of the actual file as well as copy it to the desktop and open it.
    I receive an error message that says "filename.xls could not be found."
    I can open up any other file from the network location, but not Excel files.
    I checked the file permissions and they mirror the other file types, it may be worth mentioning that I utilize network synchronization and view these files from a PC as well. I also noticed when I create a new file in that location, it will only appear in OS X and not Windows, but is still completely accessible.
    Any help is appreciated!
    Thanks

    Re:  Windows 8 vs. Excel problem
    Does your new Dell computer have MS Office installed?
    Jim Cone
    Portland, Oregon USA
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • Can't open pdf file in window 7

    When I open pdf file, an icon is popped up showing "Adobe Reader stopped operation. Program stopped normal operation because of problem happened. Window will inform you later if probem is solved."

    I had uninstalled the Adobe Reader program twice and installed again but it can't be worked.
    Also, your second method can't be solved my problem.
    The problem is as follows:
    When I open pdf file through internet and the mouse’s cursor is inside the IE8 browser , the box popped up. Because I used Chinese windows 7. The meaning likes this
    "Adobe Reader had stopped operation
    Windows are trying to find the solving problem…"
    Then, second box popped up.
    "Adobe Reader had stopped operation
    Because of problem, the application had been stopped.
    Windows closed the program, to be informed you later if problem is solved"
    Same problem in opening pdf file in my computer’s folder.
    But it can work with the keyboard if the mouse’s cursor is not in the pdf document area. Or using Google Chrome browser to see internet pdf file.

Maybe you are looking for

  • Can't get dictation to work on my IMAC with ML

    I have Mountain Lion up and working on my '09 Imac, and it shows dictation icon, etc but can't get it to show text in messages or in mail. Any ideas?

  • How do I change the number listed in Settings 'my number' to the correct mobile number?

    Hi all, Recently taken out new contract with 3 network, and using a PAC code from Vodafone UK, I transfered my existing number to 3. In SETTINGS - PHONE - MY NUMBER the temporary number issued by 3 network is showing!! Plus it's showing in FACETIME a

  • Lost purchased songs

    Today when I was syncing my iPod and downloading the new software on my iPod touch 2nd generation. I looked at my music on it, I had lost all of the music that I had bought on my iPod. What do I do to get it back. It was a lot and I want those songs

  • Where to find the redeem code?

    I ordered Adobe Creative Cloud service two months ago, after the trial, Photoshop CC 2014 request me provide a redeem code to active it, I don't know where to find it, what should I  do?

  • Vlan Assignment

    Hi,  presently, I use ISE v1.1.2 to push VLAN by their number id.  no issue using this method. Now, I want to start pushing VLAN by their names.  Using this method, the client (wireless) is not placed in the VLAN. All switches have their VLAN name co