![]() |
|
|
java classes in linux |
Post Reply
|
| Author | |
sarita
Newbie
Joined: 12 Jan 09 Location: pune Posts: 1 |
Quote Reply
Topic: java classes in linuxPosted: 12 Jan 09 at 11:16am |
|
|
|
![]() |
|
Jijo
Admin Group
Joined: 31 Dec 05 Location: United Kingdom Posts: 495 |
Quote Reply
Posted: 13 Jan 09 at 11:22am |
|
Try this example to read a file on linux system
import java.io.*;
BufferedReader bfrRead = new BufferedReader(new FileReader("/home/user/temp/the_file")); String content = ""; try { while(bfrRead.ready()) { String theLine = bfrRead.readLine(); content += theLine; // Do Stuff } bfrRead.close(); } catch(Exception ex) {
// Now catch the FileNotFoundException and IOException } System.out.println(content);
|
|
![]() |
|
ranjithkannikara
Newbie
Joined: 13 Mar 09 Location: THRISSUR,KERALA Posts: 1 |
Quote Reply
Posted: 13 Mar 09 at 11:03am |
|
Hi,
usually the classes in java are just the as in windows.. Almost all the java books for windows will be describing the classes.. Though I am not so much experienced in java have little experience in linux reply if you have any specific doubt.. Regards Ranju. |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |