Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Not Created Until Program Exit  RSS feed

 
Josiah Savoie
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been going over my code line by line, over and over again for nearly and hour now.... and I still can't figure this out.
When I execute method , the method returns true and throws no exceptions. It even
says that the file exists. However, the file is not created and cannot be accessed until the program has exited.



Please let me know if you find anything or if you need more code.
Also sorry if it's not the most readable (too much to format here)
 
Josiah Savoie
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was completely my fault...

The issue was my savePortLibrary() method saves the variable portLib.
However, I was calling that method before I assigned file to portLib. So
that was my issue.
 
Tony Docherty
Bartender
Posts: 3210
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for updating the thread with the solution.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!