Click here to Skip to main content
15,886,518 members
Home / Discussions / Java
   

Java

 
GeneralRe: Java application to transfer files and folders Pin
saigowthami27-Apr-13 2:40
saigowthami27-Apr-13 2:40 
QuestionMultiple strings received on TCP socket Pin
Sachin k Rajput 10-Apr-13 0:43
Sachin k Rajput 10-Apr-13 0:43 
AnswerRe: Multiple strings received on TCP socket Pin
Richard MacCutchan10-Apr-13 1:31
mveRichard MacCutchan10-Apr-13 1:31 
GeneralRe: Multiple strings received on TCP socket Pin
Sachin k Rajput 10-Apr-13 1:47
Sachin k Rajput 10-Apr-13 1:47 
GeneralRe: Multiple strings received on TCP socket Pin
Richard MacCutchan10-Apr-13 2:27
mveRichard MacCutchan10-Apr-13 2:27 
AnswerRe: Multiple strings received on TCP socket Pin
jschell10-Apr-13 8:36
jschell10-Apr-13 8:36 
GeneralRe: Multiple strings received on TCP socket Pin
Sachin k Rajput 10-Apr-13 20:31
Sachin k Rajput 10-Apr-13 20:31 
QuestionFile Path Problem Pin
Sachin k Rajput 9-Apr-13 22:36
Sachin k Rajput 9-Apr-13 22:36 
I want to create a file path from a string.
My code is:
Java
String   files = "";
                   if(files!= null)
                   {
                      InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input); 
   files = reader.readLine(); 
   
                     File sourcefile = new File(files);
                     System.out.print(sourcefile.toString());
                      StringBuilder sURL = new StringBuilder("file:///");
                       
                       sURL.append(sourcefile.getCanonicalPath().replace('\\', '/'));

}


But it is returning me project path in place of file path.

How can I do it?
Please Suggest!
QuestionRe: File Path Problem Pin
Richard MacCutchan10-Apr-13 0:25
mveRichard MacCutchan10-Apr-13 0:25 
AnswerRe: File Path Problem Pin
Sachin k Rajput 10-Apr-13 0:45
Sachin k Rajput 10-Apr-13 0:45 
QuestionRead JNDI from c# Pin
Member 11184949-Apr-13 1:59
Member 11184949-Apr-13 1:59 
AnswerRe: Read JNDI from c# Pin
Richard MacCutchan9-Apr-13 5:16
mveRichard MacCutchan9-Apr-13 5:16 
GeneralRe: Read JNDI from c# Pin
Member 11184949-Apr-13 8:28
Member 11184949-Apr-13 8:28 
GeneralRe: Read JNDI from c# Pin
jschell9-Apr-13 9:19
jschell9-Apr-13 9:19 
GeneralRe: Read JNDI from c# Pin
Richard MacCutchan9-Apr-13 9:40
mveRichard MacCutchan9-Apr-13 9:40 
GeneralRe: Read JNDI from c# Pin
Member 111849410-Apr-13 22:55
Member 111849410-Apr-13 22:55 
GeneralRe: Read JNDI from c# Pin
Richard MacCutchan10-Apr-13 23:14
mveRichard MacCutchan10-Apr-13 23:14 
GeneralRe: Read JNDI from c# Pin
Member 111849410-Apr-13 23:21
Member 111849410-Apr-13 23:21 
GeneralRe: Read JNDI from c# Pin
Richard MacCutchan11-Apr-13 0:38
mveRichard MacCutchan11-Apr-13 0:38 
GeneralRe: Read JNDI from c# Pin
Member 111849411-Apr-13 0:42
Member 111849411-Apr-13 0:42 
SuggestionRe: Read JNDI from c# Pin
Prasad Khandekar2-May-13 19:49
professionalPrasad Khandekar2-May-13 19:49 
QuestionJava Program to accept input from user and then display output . Pin
Aman kumar routh4-Apr-13 3:35
Aman kumar routh4-Apr-13 3:35 
AnswerRe: Java Program to accept input from user and then display output . Pin
emadrefai4-Apr-13 6:20
emadrefai4-Apr-13 6:20 
GeneralRe: Java Program to accept input from user and then display output . Pin
Aman kumar routh4-Apr-13 6:29
Aman kumar routh4-Apr-13 6:29 
AnswerRe: Java Program to accept input from user and then display output . Pin
Richard MacCutchan4-Apr-13 6:29
mveRichard MacCutchan4-Apr-13 6:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.