When you save an object in java (using serialize), where is the file created?
For example if you used this method http://www.rgagnon.com/javadetails/java-0075.html
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using the ObjectOutputStream for serialization and wrapping it around a FileOutputStream then the objects will go into that file.
For example (from the ObjectOutputStream Javadoc):
This will create a file “t.tmp” in the working directory of the java application.
And about the working directory…
If you are using an IDE to launch your application then the working directory depends on where the IDE puts the compiled classes and how it runs your application.
You can use the following code to print the working directory:
The “.” represents the “current” directory.