Q:

No string printed into the file

I am creating a file called jfv.properties and I want to write a simple string into the file. In this the file is getting created the string is not getting printed. Is there problem in the below code ? I have run in the debug mode, there are no exceptions thrown.
    File file = new File(filePath,"jfv.properties");
    FileOutputStream fo = null;
    try {
        fo = new FileOutputStream(file);
        PrintWriter p = new PrintWriter(fo);
        p.println("some string");

    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }catch (SecurityException s){
        s.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    if(fo != null ){
        try {
            fo.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}

A:

The PrintWriter is not flushed. Use
p.println("some string");
p.flush();

or use autoFlush
PrintWriter p = new PrintWriter(fo, true);
p.println("some string");

or just close it.
autoFlush works for println, printf and format. See the javadoc of PrintWriter.
Details
The PrintWriter can be constructed either with another Writer, a File or filename or an OutputStream. In case of instantiating it using an OutputStream the javadoc says:

public PrintWriter(OutputStream out)
Creates a new PrintWriter, without automatic line flushing, from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.

and the javadoc of OutputStreamWriter says:

... The resulting bytes are accumulated in a buffer before being written to the underlying output stream. ...

EDIT
So your code
fo = new FileOutputStream(file);
PrintWriter p = new PrintWriter(fo);

will lead to this stream model
+-------------+           +--------------------+          +------------------+
| PrintWriter | --------> | OutputStreamWriter | -------> | FileOutputStream |
+-------------+           +--------------------+          +------------------+

Therefore a println will not directly write the string to the FileOutputStream
p.println("some string")
  +-> outputStreamWriter.write("some string")
      +--> write to internal buffer (as bytes)

p.flush();
  +-> outputStreamWriter.flush();
      +--> internal buffer flush
         +--> fileOutputStream.write(bytes)

