Rights by default assigned file created by java application

Hi everybody,

I m facing very different type of problem. i have developed an application in java(based on networking). For that application i needed to maintain a file in which i use to store ip addresses of the other computers in the network.i named the file as address.dat.application use to create this file and culd read and write into it.This application was running fine on Madrake linux. but now when i tested same code on Red hat linux i m facing problem.it is creating the file but is not able to read from it i.e when it tries to read it returns null.even properties of file show 0 Bytes.But if then i exit from application and then change the rights of the file and then again run the code its running fine.even in properties of file read rights are already assigned,i only add right to execute(but in fact i m only reading not executing). I just culd not figure out the reason for this . Culd anyone please help me. i m in a fix since without reading content of that file my application cant start at all and i have to demonstrate my application on red hat linux.Is this becoz of .dat extension?or sum problem with redhat linux?But it is running fine on mandrake linux !!!!!!

Any smallest piece of info u have then just send it.

[1259 byte] By [beginner83a] at [2007-10-1 4:55:33]
# 1
Running your application under "strace" tracks the system calls, including possibly failiing file I/O ones etc.
BIJ001a at 2007-7-9 5:29:58 > top of Java-index,Administration Tools,Sun Connection...
# 2
The default file permission are usually set by the environment.What is your umask?at the command line type umask
Peter-Lawreya at 2007-7-9 5:29:58 > top of Java-index,Administration Tools,Sun Connection...