• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Access Aix directory using java swing program(java program in windows)  RSS feed

 
Sagar Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I want to Read and write file to AIX directory /home/oradm/xyz/

Write file


Read file



But i am getting below error





I Google but not get any appropriate solution.
How to access that xyz.pdf file using java program (in windows)
Waiting for helpful reply
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Deshmukh wrote:I want to Read and write file to AIX directory /home/oradm/xyz/

Well, the message you're getting would suggest that you're running this from a Windows machine (because it's reversed the slashes). Is this location mounted as a network drive? If so, you might want to use its letter.

Alternatively, you might try using a fully qualified URI, viz:
File f = new File( new URI("file://144.11.7.145/home/oradm/xyz/xyz.pdf") );
System.out.println(f.exists());


I'm also pretty sure that you don't need the second (or third) set of doubled slashes (but I could be wrong). You usually only need those when you're using backslashes.

Winston
 
Sagar Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried as per your code but i am getting below error


java.lang.IllegalArgumentException: URI has an authority component
 
Sagar Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it possible using FTPClient
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Deshmukh wrote:Does it possible using FTPClient

Possible, but it should be unnecessary. It may be simply those extra slashes. Have you tried:
File f = new File("//144.11.7.145/home/oradm/xyz/xyz.pdf");
?

Also: Can you access the file outside Java using the string you supplied?

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!