Dev null unter windows




















But nul:abc. Which means that it is indeed writing to the "null" device. I wonder what I'm missing. By Ashwin Jayaprakash. Topics: java , note to self , tech. Similarly the console device in Windows is CON:. Yup, that's what I did in very the first line but Java new File "nul:". Looks like a bug in the java. File implementation. If it works, spread this solution if you want, just because I saw a lot of requests on it regarding Git for example.

Any clues? This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse.

Details required :. Cancel Submit. How satisfied are you with this reply? Thanks for your feedback, it helps us improve the site. In reply to YanisLukes's post on January 25, It seems like I have found a solution. I'm not sure if setting it to 1 the hard way will fix it, but I have fixed that by downloading default Null settings from here I hope it helps you. Viewed k times. Improve this question. Peter Mortensen Ove S Ove S 4, 2 2 gold badges 16 16 silver badges 7 7 bronze badges.

Add a comment. Active Oldest Votes. I think you want NUL , at least within a command prompt or batch files. Improve this answer. Jon Skeet Jon Skeet 1. I just looked at this again, and I retract my original statement. I was doing the write in code, and the error was getting swallowed. I'm deleting it so no one accidentally takes it as the truth. CoDEmanX: That's not my experience. Writing to the console - or even a file - can take a significant chunk of time.

I've just tested it with a program writing "Hello there" to stdout times. Redirecting to a file on an SSD took 18 seconds. Redirecting to NUL took 4 seconds. Not redirecting at all made me give up through a lack of patience after a while I dream that maybe one day, if everybody uses the colon by convention, we will be able to deprecate the dreaded special device names :- — jdm.

Show 9 more comments. You can also use this special "nul" file through redirection.



0コメント

  • 1000 / 1000