Home > > File problem in linux OS.

File problem in linux OS.

I am creating one jar file . In my program, when I click one survey menu in my GUI,it will collect information from remote device and store it in log file located LOG folder. In my case, I put one folder " Cal" and inside it I put myjar.jar file and that log (LOG) folder.
In Windows, when I click survey menu in GUI, the log information automatically stored in log foder as survey.txt file. And also, i create one show dialog box to show where the log file located.
my code is,
String  ss=new String(" HIllo"+"loginfo" );           
                 byte b[]=ss.getBytes ();
                       OutputStream f0=new FileOutputStream               ("LOG/survey.log",true);
                       f0.close ();    the above code is file writing in txt file.
for display dialog box,
                File file = new File("LOG/Survey.log");                      
                file = file.getAbsoluteFile(); 
                javax.swing.JOptionPane.showMessageDialog(MainFrame, "The LOG FILE is stored at -- \t \t"+file);
             }In windows, where can i install that Cal folder (inside it JAR file and LOG folder), and click that jar , all are working fine. The log file stored correctly inLOG folder and dialog box show the located path.
eg. log file stored at D:/sbk/Cal/LOG/survey.log
But my problem in linux.
when i click survey menu, it will defaultly stored in root folder and log folder. Actually i am not creating LOG folder in root folder.
I am changing file writer as , to store that JAR folder and want to store that log file in home directory.
                String  ss=new String(""HIllo"+"loginfo\n" );          May
                 byte b[]=ss.getBytes ();
                       OutputStream f0=new FileOutputStream ("/home/Cal/LOG/Survey.log",true);
                       f0.close ();    but, now also that file stored in rot directory.
what can I do.
how can I store log file in home/Cal/Log folder in Linux.
any one help this problem
Use System get prop user.home?
Read the other 2 answers
hi, i have problem with file path accessing in linux. my java class is accessing a abc.cvs file and and getting all data. it is working fine in windows xp. but i run this same file in linux it does not access the abc.cvs file and does not get any dat
Hi, I am a newbie in the flex environment. I have faced a problem for file upload from linux to windows and windows to linux And I have put crossdomain.xml file in root folder, still this problem is appear. Please help me, if anybody know the answer.
hi, i have problem with file path accessing in linux. my java class is accessing a abc.cvs file and and getting all data. it is working fine in windows xp. but i run this same file in linux it does not access the abc.cvs file and does not get any dat
I'm running into a problem in linux (Ubuntu). The following test code will throw an exception at the "FileInputStream fis... " line with the file has a unicode filename. However, Windows passes this without problems. try {      File dir = new Fi
Hi all, I'm running in a issue related to changing the file permission under Linux environment. I'm using Suse 10.0 Linux and run jdk 1.5 java runtime. I want to create a file during execution time and change the permission of the same. I use File.cr
Hi, I have read http://forum.java.sun.com/thread.jspa?forumID=256&threadID=302708, but this is the old stuff. My problem is as follows: I need to sftp-y file from one Linux account to the other Linux one. It is not a big deal. However, I would like t
Hello Hoping somebody may be able to help me with a missing related files problem in CS5. I've tried Adobe phone support but they couldn't solve the problem. *Some* of my sites (but not all) are not showing all the files related to that page. My page
Last night I did an Archive & Install from Tiger to Leopard on my Intel MacBook Pro. Today, I had trouble finding the other computers at my office. Once I finally got them to show up, I opened a Word file found on another computer, made some changes,
I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...I have problem in quicklook for mp4 files in my mounta
I use this line in my backing bean to log some events: FileHandler fhxml = new FileHandler("../webapps/MyWebApp/Log/MyWebAppLog.xml", append); fhxml.setFormatter(new XMLFormatter());That works fine in windows but when I deploy it in my Tomcat 6
There are loads of public threads about the duplicate files problem with Windows 8/8.1 File History backup system. From all the threads I've looked at, there seems to be no solution, and no acknowledgement from MS that they can even repro the problem
i have a idoc to file problem, the idoc is sent from R/3 to XI, the problem is IDOC is sent from R/3, it didnt reach to XI..... i have checked.......we05 in R/3, it gives a status 3, then i checked SM58 in R/3, it shows nothing, when i check in idx5
Hello, Community! I experience *HEAVY* Problems with Linux on my MSI K8T Neo (FSR). Since the customer support of the german dependancy seems to ignore my call for help I'm in good hope that maybe you can help me out or give me some useful advise. Fi
I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update, 11.4.62 (on a PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it (Ugh
I have already write a RMI example for self-study successfully, but there are a little class file problem that I'm not able fix it. In my RMI example there are 3 .java files (RMIServer.java, RMIClient.java and a MethodImpl.java) After I have javac an
I am using DreamWeaver CS3 on my Macintosh at home and on a PC at work. I am connecting to my website via WebDAV, and for some reason Dreamweaver cannot edit the files on the site. When I try to check out any file I get an error stating: "file.html i
I'm having bat file problems with CCM 4.2(3) with bat version 5.2(3). When adding phone/users getting an error number -2146828279 with this message "Description -Subscript Out of range".Hi Denis, Just wanted to know if the description contained
Hi Team,        While deploying RHEL6.0 i am getting error "VMWARE ERROR DOWNLOADING KICKSTART FILE ON Redhat linux 6.0" Please let me know how to fix this issues. Thanks vmware techtheoretically all I need to change would be changed it to var h
Hello, I am trying to utilize the Jakarta commons upload component. When I try to run the following locally, it works: while(i.hasNext()) {      FileItem item = (FileItem)i.next();      File fullFile  = new File(item.getName());      logger.info("Nam