• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it possible using FTPClient
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic