unix « Windows « Java I/O Q&A





1. Differences between unix and windows files    stackoverflow.com

Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak? We have a system that has been moved from a windows machine to ...

2. How do generate a directory path with double-backslash or forward-slash separators?    stackoverflow.com

I am writing a directory path to a text file from ant, which is later read by a Java Application to find another file. In my ant script I have:

<property name="fulltrainer.dir"  ...

3. Where does Java end and windows start? File seperator Question    stackoverflow.com

I want to launch a Java jar by Runtime but Windows is making problems again. I know this must have come up hundreds of times but I tried a few things (like ...

4. Java code to execute a .sh file    stackoverflow.com

I have a .sh file stored in some Linux system. The full path of the file is:

/comviva/CPP/Kokila/TransactionHandler/scripts/stopTH.sh
I am tring to execute it by
Runtime.getRuntime().exec(`/comviva/CPP/Kokila/TransactionHandler/scripts/stopTH.sh`)
but it is throwing some exception. I want to ...

5. Connecting to Unix via Windows    coderanch.com

Is the Unix file system mounted to the Windows box as a separate drive? If so, you should be able to do access files the same way you do local files on the C:. If not, does the Unix box provide an FTP server? Or are the files available via HTTP? Java provides some tools that allow you to handle files ...

6. How to access a shared folder on Windows system from Java application on Unix    coderanch.com

Hi Friends, I am working on a Java application that accesses a shared folder on a Windows system.For example in my Java code I access a file called 'myfile.txt' contained in a shared folder called 'common'. So in my code I give the folder path as: \\common\\myfile.txt Now I have created a jar out of this application and deployed it on ...

7. Move file from Windows to FtpServer(Unix)    coderanch.com

Hi I have written a java program which on running will ask the source path and dest path, giving so it will copy the list of files from source directory to dest directory. But here my requrement is to copy the files from my windows machine to a unix machine over ftp. I have all the required ip, userid, password, port ...

8. file upload works on windows, doesn't on unix    coderanch.com

Hi everyone, I have a standard file upload code that works with no issues on windows (both xp and 7) running on tomcat and called from a jsp page. But it throws an IndexOutOfBoundsException when running on a unix machine. I'm copying the code below. Any idea? Just to get one possible issue out of the way, the path is correct ...

9. Is there any api in java to connect to windows using java from unix machine    coderanch.com

Samba allows a Linux box to connect to a windows box so that you can see the Windows file system on a Linux box. Does your version of UNIX support Samba? If you can install Samba, then you can use the regular Java file support. I'll bet you will have more trouble with your IT department than you have with developing ...





10. Trying to read a file on Unix into a file on windows or into a string builder    coderanch.com

Hello, I am trying to read a file on a remote server, which is on a Unix box. I don't mind if I can read it into a Stringbuilder or a file. The normal FileInputStream fstream = new FileInputStream("filepath"); // Get the object of DataInputStream DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; //Read File Line ...

11. convert WINDOWS file into UNIX format    forums.oracle.com

1.) Read [this excellent introduction into Unicode|http://www.joelonsoftware.com/articles/Unicode.html] for the basics 2.) Understand that there is no "Windows encoding" and no "UNIX encoding". Any given Windows or Unix installation can have pretty much any default encoding. Some encodings are more common on Windows, others are more common on Unix, but there is no single encoding that's valid for either Windows or unix ...

13. upload file to windows share folder running on unix    forums.oracle.com

Hi, I am having requirement to upload the files into windows share folder, It works fine If I run the application on windows, but we moved the application to UNIX, so right now the client has to upload the files to windows shareholder , server is running on the UNIX, as I am using the simple File file = new File(//share/shareholder), ...

14. Reading Windows NT files from Unix    forums.oracle.com

15. Comparing files inside a unix directory recursively from windows    forums.oracle.com

Hi All, I'm doing a java project for comparing files inside a unix directory.The comparison is being done from windows side.To compare the files first i have to get the file details from unix to windows. II have used FTPClient API provided by Apache.Using this API im getting all the file details from UNIX to Windows. Going forward, i created a ...

16. Java - unix file to windows file    forums.oracle.com

I have a java program which saves a file to disk in linux which is then attached and emailed. The file is saved and opened in windows, so I want the file to be saved as a windows file. I have tried replacing the LineFeeds(LF) with CRLF with the command dataBuf.replaceAll("\n","\r\n"), but this does not work. dataBuf is simply a string ...





17. Unicode File movement from Windows to Unix adding Special Characters    forums.oracle.com

We have observed that this load is failing since the file is having some special characters when it is getting transferred to Unix. The file is untouched if it contains only English characters. To confirm this we created a file directly in Unix containing Ger/Jap chars and called the Oracle St Proc and it worked fine. When this same file was ...