PrintWriter has started to use unix style linebreaks.

Hello,
I was running some text files generated under linux through a my Java program under Windows XP. Ever since then any program I write or run in Windows that uses PrintWriter will print to a file using unix style line breaks, ie. if I look at it in notepad everything appears on one line with little squares instead of line breaks. Does anyone know why Java won't use the dos line breaks anymore ?
I remember seeing someone else who had this problem but I never found out if and how they fixed it !

All I'm doing is putting a string into PrintWriter.println():
String fred = "Hello !";
String jim = "Wheee !";
PrintWriter out = null;
try
out = new PrintWriter(new FileOutputStream("Stuff.txt"));
catch (Exception x)
System.out.println("Could not open the file Stuff.txt.");     
return;
out.println(fred);
out.println(jim);The file then contains
HelloWhee !
with a unix line break between the Hello and Whee !
This was not happening untill I ran a file with all unix line breaks through the program. The code did not change. Recompiling made no difference. Now ALL programs that us PrintWriter are doing this.

Similar Messages

  • I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost?

    I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost? On visiting the store we get only one reply you may write to Apple directely. we have the similar kind of problem with iPad which is being used by my wife Mr.Neelam Vij and paid Rs.16000/- to get it replaced within a year & 6months use. so in totality we have paid Rs.28500/- + Rs. 3000/- diagnostic charges.
    1. iPhone 4 , 32 GB Black with Sr. No. 88******A4T
    2. iPad 2, 16GB White with Sr. No.DL*******KPH
    Moreover, we have no information to contact whom. even the replace set has a warranty of only three month which further confirm that Apple itself is not confident wheather product will last after replacement for more then three month. Such kind of happening do not encourage anyone to recomend this product to anyone. Would appriciate a faster response to our problem if someone from Apple is going to read this email.
    Thanks & Regards
    A K Vij
    <Personal Information Edited by Host>

    http://support.apple.com/kb/he57?viewlocale=de_de
    India
    (91) 1800 4250 744
    www.apple.com/in/support/
    hope it helps

  • HT201401 My iPhone3GS has started crashing. I'll be mid-phone call, or using an app, when the screen will go dark. I have to restart it. Then it shows low battery sign (even though it was 100%). Within 1 minute of charging, iphone starts. Pl. resolve.

    My iPhone3GS has started crashing. I'll be mid-phone call, or using an app, when the screen will go dark. I'll have to do a restart. It dumps to the warning screen that there's no power and needs to be plugged in.
    Once I connect the phone to a power source, in a couple of minutes it's ready to roll again, and displaying a "full battery" icon.
    The phone is almost always fully charged when this happens, and I don't get a crash when the phone is plugged into a power source.
    Took my iphone to apple store, they informed that battery is very good and there is no need for replacement. Might be there is a problem with iphone motherboard. But they can't repair it as my 3GS crossed warranty.
    Where should I go to repair this. Within 2 years...this 32GB 3GS is almost garbage for me with no support from apple. I am ready to send it to apple for repairs and pay the repair charges.
    I tried everything... deep reset ... factory settings .... nothing is working... Apple staff pl. take care of your customers ...

    This is a User to User Forum... You are Not Addressing Apple here...
    iPhone User Guide
    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

  • Been using an Avastor HDX-800 for storage and backup, also a SUPERDISK for smaller stuff; recently the SUPERDISK does not appear on the screen, and the light blinks while you hear it spin, also the Avastor has started to have the same problem, both USB

    Been using an Avastor HDX-800 for storage and backup, also a SUPERDISK for smaller stuff; recently the SUPERDISK does not appear on the screen, and the light blinks while you hear it spin, also the Avastor has started to have the same problem, both USB conncected, both worked well before, but both now spinning, blinking, and not showing up on the screen as before,
    Interestingly they both appear in the System Profiler, but just not working the same as before
    I have tried other USB ports, but the same responce,

    yes I did reset the PRAM, but no benefit, still the same problem
    my usb devices are:  keyboard, mouse, printer, SD-USB-M3, and LaCie d2 DVDRW:
    the mouse and printed are plugged into the keyboard: i have tried to move, these around, and have even tried just the mouse, printer and SD-USB-M3, but still the same problem
    here is a cut and paste of the current  "System Profiler>Hardware>USB"   (usb device tree)
    USB Bus:
      Host Controller Location:          Built In USB
      Host Controller Driver:          AppleUSBOHCI
      PCI Device ID:          0x0026
      PCI Revision ID:          0x0000
      PCI Vendor ID:          0x106b
      Bus Number:          0x18
    Hub in Apple Pro Keyboard:
      Version:          1.22
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Mitsumi Electric
      Product ID:          0x1002
      Vendor ID:          0x05ac  (Apple Computer, Inc.)
    HL-1270N series:
      Version:          1.00
      Bus Power (mA):          100
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Brother
      Product ID:          0x0008
      Serial Number:          L9J286292
      Vendor ID:          0x04f9
    Basic Optical Mouse:
      Version:          0.00
      Bus Power (mA):          100
      Speed:          Up to 1.5 Mb/sec
      Manufacturer:          Microsoft
      Product ID:          0x0084
      Vendor ID:          0x045e
    Apple Pro Keyboard:
      Version:          1.22
      Bus Power (mA):          250
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Mitsumi Electric
      Product ID:          0x0204
      Vendor ID:          0x05ac  (Apple Computer, Inc.)
    SuperDisk USB 120MB drive:
      Version:          0.0e
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Imation
      Product ID:          0x0002
      Vendor ID:          0x0718
    Hub in Apple Pro Keyboard:
      Version:          1.22
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Mitsumi Electric
      Product ID:          0x1002
      Vendor ID:          0x05ac  (Apple Computer, Inc.)
    HL-1270N series:
      Version:          1.00
      Bus Power (mA):          100
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Brother
      Product ID:          0x0008
      Serial Number:          L9J286292
      Vendor ID:          0x04f9
    Basic Optical Mouse:
      Version:          0.00
      Bus Power (mA):          100
      Speed:          Up to 1.5 Mb/sec
      Manufacturer:          Microsoft
      Product ID:          0x0084
      Vendor ID:          0x045e
    Apple Pro Keyboard:
      Version:          1.22
      Bus Power (mA):          250
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Mitsumi Electric
      Product ID:          0x0204
      Vendor ID:          0x05ac  (Apple Computer, Inc.)
    HL-1270N series:
      Version:          1.00
      Bus Power (mA):          100
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Brother
      Product ID:          0x0008
      Serial Number:          L9J286292
      Vendor ID:          0x04f9
    Basic Optical Mouse:
      Version:          0.00
      Bus Power (mA):          100
      Speed:          Up to 1.5 Mb/sec
      Manufacturer:          Microsoft
      Product ID:          0x0084
      Vendor ID:          0x045e
    Apple Pro Keyboard:
      Version:          1.22
      Bus Power (mA):          250
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Mitsumi Electric
      Product ID:          0x0204
      Vendor ID:          0x05ac  (Apple Computer, Inc.)
    SuperDisk USB 120MB drive:
      Version:          0.0e
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          Imation
      Product ID:          0x0002
      Vendor ID:          0x0718
    USB Bus:
      Host Controller Location:          Built In USB
      Host Controller Driver:          AppleUSBOHCI
      PCI Device ID:          0x0026
      PCI Revision ID:          0x0000
      PCI Vendor ID:          0x106b
      Bus Number:          0x19
    LaCie d2 DVDRW USB:
      Capacity:          451.76 MB
      Removable Media:          Yes
      Detachable Drive:          Yes
      BSD Name:          disk2
      Version:          0.00
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          LaCie
      OS9 Drivers:          No
      Product ID:          0x1011
      Serial Number:          FFFFFFFFFFFF
      S.M.A.R.T. status:          Not Supported
      Vendor ID:          0x059f
    LaCie d2 DVDRW USB:
      Capacity:          451.76 MB
      Removable Media:          Yes
      Detachable Drive:          Yes
      BSD Name:          disk2
      Version:          0.00
      Bus Power (mA):          500
      Speed:          Up to 12 Mb/sec
      Manufacturer:          LaCie
      OS9 Drivers:          No
      Product ID:          0x1011
      Serial Number:          FFFFFFFFFFFF
      S.M.A.R.T. status:          Not Supported
      Vendor ID:          0x059f

  • My ipod nano this morning has started to tell me the accessory (lightening to 30-pin adaptor) I use for playing it through my docking station is not supported. It worked fine up until last night. Does anyone know why this might be?

    My ipod nano this morning has started to tell me the accessory (lightening to 30-pin adaptor) I use for playing it through my docking station is not supported. It worked fine up until last night. Does anyone know why this might be?

    Clean any debris from the adapter, docking station connector and the connector on the Nano.

  • Our organization uses an Oracle database hosted on a Unix platform and one of our data processing outputs is a "stuffer" document that has a barcode, and Unix jobs automatically send the document to a printer.   Is there a way, or does Adobe have a produc

    Our organization uses an Oracle database hosted on a Unix platform and one of our data processing outputs is a “stuffer” document that has a barcode, and Unix jobs automatically send the document to a printer.
    Is there a way, or does Adobe have a product or solution, to create a PDF version of the document including the barcode, before it’s sent to a printer?

    What format is the document that is printed? Or what technology is used to format the printer? There isn't a standard way of doing things in Unix.

  • My mac has started sending yahoo emails out as if they were being sent from an old gmail account I haven't used in years. Why has this just started happening?

    My mac has started sending yahoo emails out as if they were being sent from an old gmail account I haven't used in years. Why has this just started happening? 

    It is important to understand that Mail uses TWO servers, a Receiving Server and a Sending Server.
    When you create a new mail message, or reply to a message, the Sender server is shown in the message composition window like this:
    That drop-down window allows you to select which of the Sending Servers you previously set up should be used.
    In general, once you choose a Sending server, its choice will "stick" for all future replies to messages from that Receiving mailbox.

  • HT3964 I have macbook air late 2010 model... it works fine otherwise but it has started being overheated in normal situations where normally it used to work fine and draining more battery....... battery time is almost half now. should i reset SMC. Would i

    I have macbook air late 2010 model... it works fine otherwise but it has started being overheated in normal situations where normally it used to work fine and draining more battery....... battery time is almost half now.
    should i reset SMC... would it help?

    I'm doubtful it's a missing driver too, but I feel as though it's driver related. The first time XP was installed, after first boot without installing drivers, it was without sound etc, but fundamentally the system worked. Now after first boot, it's very buggy. Thanks for your suggestion Tonny. I ran the tool but it turns out the HDD is fine. Besides, everything runs fine in safe mode.
    Does anyone know if (generally speaking) there is any firmware on the graphics card that would get updated via a Windows update? i.e. is it possible that Windows update downloaded a driver for the graphics card that installed new firmware that wasn't all that compatable with XP?

  • My Mac has started lagging badly whenever I use Flash.

    I've got a 2.4 GHz MacBook Pro 7,1 with 4 GB of memory running OS X 10.6.8 and recently it has started lagging severely whenever I open a flash video or game.  I use to never have any problems playing games on my computer or streaming any video, even up to 1080p.
    Then, recently, it started lagging whenever I used flash, and it's bad enough that my cursor begins jumping, scrolling is basically impossible, the video only shows a frame every few seconds and it **** near crashes my entire computer.  During these times the % CPU for flash in activity monitor will jump up to over 100. 
    This issue has really started to bug me and I've tried everything I can to fix it.  I've downgraded to older versions of flash, uninstalled and reinstalled Google Chrome, done all of the system updates for my computer, but nothing works.  I just wanted to know if there's any way I could fix this to have my computer back in working condition.  Any help would be greatly appreciated.

    I am having the same problem, and it's driving me crazy! I have the same macbook as chrispy17, except with Lion. Does anyone know how to fix this?

  • I am using OS 10.7.5.  During the last week, it has started running very slow.Any ideas?, I am using OS 10.7.5.  During the last week, it has started running very slow.Any ideas?

    I am using Mac OS 10.7.5.  During the last week, it has started running very slow.  Any thoughts?

    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    Repair the Hard Drive - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • My iPhone 3Gs has started crashing when using apps once the battery gets down to around 80%.

    My iPhone 3Gs has started crashing when using apps once the battery gets down to around 80%. Sometimes it will reboot on its own, and other times you have to leave it for an hour or so and then manually turn the phone on again. Any ideas?

    Did you try to reset the phone by holding the sleep and home button until the Apple logo comes up again?
    If this does not work, try to save as much data as you can and set it up "as new device": How to back up your data and set up as a new device

  • I have a Mac OS X Snow Leopard version and my fan keeps coming on. I have been away for a week so it has not been used and yet when I started it up the fan started straight away. Is there anything I can do? Please help! Thanks

    I have a Mac OS X Snow Leopard version and my fan keeps coming on. I have been away for a week so it has not been used and yet when I started it up the fan started straight away. Is there anything I can do? Please help! Thanks

    Yes, look in Activity Monitor (Applications /Utilities /Activity Monitor.app) and see what it eating up all the %CPU. If anything is over 40%, post the name here to get advice or just kill it straight away with the red 'Quit' button.
    If nothing is using up CPU resources, but the fans are going full blast, do an SMC reset. Read the instructions here:
    http://support.apple.com/kb/HT3964

  • I have an iPad that is now over twelve months old, it doesn't get over used, however in the last few days, it has started to get very hot after only a few minutes use, is this a fixable issue

    I have an iPad that is now over twelve months old, it doesn't get over used, however in the last few days, it has started to get very hot after only a few minutes use, is this a fixable issue

    Is it getting hot only when charging?
    Not normal. Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • My iphone 4 is almost 2 years old and has started locking up.  what do i do to get it working as it used to?

    my iphone 4 is almost 2 years old and has started locking up.  what do i do to get it working as it used to?

    Have you tried: restarting, resetting, restoring?

  • Can I use Unix symbolic links between Mountain Lion and Snow Leopard Mail folders?

    After upgrading to Mountain Lion, I partitioned my iMac HD to have two partitions: Macintosh HD has Mountain Lion; I reinstalled Snow Leopard on Macintosh HD 2. Best part: you can access your user-created files from EITHER disk partition. But not so OS X Mail. I wanted to revert to Snow Leopard, since I don't like the iOS-like Mountain Lion (swipe THIS!), but Mail is a problem since all my Snow Leopard Mail was successfully migrated over to Mountain Lion during upgrade.
    Is there a way to use Unix symbolic links between actual OS X Mail folders in Mountain Lion and OS X Mail in Snow Leopard?
    It seems the (trial) symbolic link created pointed to a blank file.

    It's not a matter of "letting" each maintain its own database, William. By default, I believe, I have no control over what gets written. In fact, if there were a way to set a preference that says, use this index named "spotlightindexSL' only [while in SL], that might solve my problem. Then when booting up in ML, it would just go after the index it last made.
    My guess is that while I am in ML or SL and not the other, there are all sorts of changes to files and the system freaks and says "Oh, now look at what a mess I've made — there are all sorts of files unaccounted for. Now I have to rebuild the whole thing."
    I have 2 had drives in my Mac, both 500GB. One (Working Disk) has no operating system and all my files, and the other drive is partitioned 470/30gb with SL on the 470 and ML in the 30. When I restart in either OS, the auto-start Indexing as if for the very first time, and do both hard drives (in total: 3 partitions of files, not counting the ML Restore partition).
    I know it all uncoventionally — just wanted to see what my $20 new OS will cost me in software upgrades, in particular my $1800 Adobe Design Suite CS4 and a few others.

Maybe you are looking for