• 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

can't able to write in file & Path class not found

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir,
I have two problems
1.
I am reading a webpage using URL class and want to write it on a page usin a function. my code as follow



but it is not working can any one tell me what is the problem in this snippet


2.
I am having jdk 6 but unable to use Path class to create a file and to use it.
also Path class api also not found .

I unable to cereate a file by usin Path class

so please help me.

Thank you
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseCodeTags . It will make your code much easier to read. I can't see what might be wrong though. It would help if you also posted what was not working about it, whether that's a thrown exception, or just no output.

I had actually never heard of the Path class, but with a little research I found that it's being introduced to the java.nio.file package in Java 7. That unfortunately means you can't use it in Java 6.
 
pradipta kumar rout
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir,
my following code creates a file cc.txt but the string is not written there.

kindly rectify the code or suggest me what to do.my above program also create a file but not able to write any string over the file.

Thank you
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it really so difficult to UseCodeTags ?

Read the API for BufferedWriter. All of it. It's not that large.
reply
    Bookmark Topic Watch Topic
  • New Topic