Why do the slashes change when the console gives me the error?

Why do the slashes change when the console gives me the error?

The string input as the filename looks like this:

String file = "http://www.queen.com/website/screenshots/" + username + createTimeStampStr() + ".PNG";

The console gives me back an error saying:

java.io.FileNotFoundException: http:\www.queen.com\website\screenshots\amit1220120625_110414.PNG (The filename, directory name, or volume label syntax is incorrect) 
at java.io.RandomAccessFile.open(Native Method) 
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212) 
at javax.imageio.stream.FileImageOutputStream.<init>(FileImageOutputStream.java:53) 
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:37) 
at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393) 
at javax.imageio.ImageIO.write(ImageIO.java:1514) 
at Image.writeImage(Image.java:29) 
at Image.randomImage(Image.java:71) 
at Image.run(Image.java:120) 
at java.lang.Thread.run(Thread.java:619) 
java.lang.NullPointerException 
at javax.imageio.ImageIO.write(ImageIO.java:1523) 
at Image.writeImage(Image.java:29) 
at Image.randomImage(Image.java:71) 
at Image.run(Image.java:120) 
at java.lang.Thread.run(Thread.java:619)

Why do the slashes change when the console gives me the error? I am so confused......

View Answers









Related Tutorials/Questions & Answers:
Why do the slashes change when the console gives me the error?
errore
Advertisements
Why PriorityQueue gives such a strange behaviour?
Java errors when attempting the following.
help me to do it in jsp
Why do data scientists quit?
what is java and why do i need it?
Why do we use ORM?
verify the code and give me the code with out errors
Why we need reload application after class change?
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
how do you change the message box to a specific color
ModuleNotFoundError: No module named 'serve_me_do'
why do not required application restart after jsp changes?
when do we get null pointer exception in java
why should we over ride hashCode(), when equals was over ride()?
change database values when click next button on jsp page
do this for me plzz - Java Interview Questions
How to change table row color when click on Hyper Link in jsp?
need someone do it for me plz..people
why tomcat is shoutdown when access the jsp page - Development process
java find the error1
errors
Fashion Trends: Why do we follow them?
Why would we want a Database?
java find the error4
java find the error7
How do I change a large string into hex and then into byte so that SHA1 can be applied to it?
java find the error3
errors
do the combinations in java, pls help me its urhent - Development process
java find the error2
java find the error5
Why the null values are stored in Database when I am sending proper values?
I want to change my user name on your website ,how can i do this
i have a problem to do this question...pls help me..
why java ignore backspace event when there are more then 1 keychar for a single keystroke.
inheritance....please help me friends...!!!... this is important project that i have to do it..
why it is very slow when I am using the backend as microsoft access file for running the java webapplication - SQL
why and where we use setter and getter methods in java, please give me one example program.....
selectoptions errors in java script
Compiler errors in java
Why request.getParameter(
CONSOLE
why above code returning the value of squares is 82... even after returning an increnented value of squares... please help me...
How do I change the while loop in this code to the range with range list style display page for a resultSet() in jsp?
java errors

Ads