Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » java.nio.file(Cannot import java.nio.file)
java.nio.file [message #1790933] Wed, 20 June 2018 10:36 Go to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
I have been using Eclipse for several years (mainly Juno) but the problem with importing java.nio.file.Files has got me baffled.
I have tried upgrading to the latest Java (SE10) and latest Eclipse (Oxygen) but it still will not allow its import.
I need this import as it allows file copy with preserved modified date (COPY_ATTRIBUTES) and I can find no other function to do this. It allows import java.nio.channel which I have used OK.

Can anyone explain why I can't import java.nio.file.Files?

I notice in this forum that java.nio. is red underlined. Is that because Eclipse doesn't understand it, even though I've used java.nio.channel in Eclipse before?

Regards
Re: java.nio.file [message #1790964 is a reply to message #1790933] Wed, 20 June 2018 16:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

You're made sure the Installed JREs preference page only points to valid JREs, and that your project references one of them? Are other types from the JRE not able to be imported?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: java.nio.file [message #1791063 is a reply to message #1790964] Fri, 22 June 2018 11:19 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791064 is a reply to message #1790964] Fri, 22 June 2018 11:19 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791065 is a reply to message #1790964] Fri, 22 June 2018 11:20 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791066 is a reply to message #1790964] Fri, 22 June 2018 11:20 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791067 is a reply to message #1790964] Fri, 22 June 2018 11:21 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791068 is a reply to message #1790964] Fri, 22 June 2018 11:21 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791069 is a reply to message #1790964] Fri, 22 June 2018 11:22 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Hello Nitin
Thank you for your prompt reply, and apologies for my delay in responding.
I have Installed JREs pointing to jre6 (which may be too early for java.nio.files) and jre1.8.0_20 (checked).
How do I determine whether a jre is valid? I reference them with other projects which don't import java.nio.files and they work fine.
All other imports are OK.
I have tried removing import java.io.File etc in case there is a clash but it makes no difference.
In this forum, the reference to java.nio.file is red underlined. Is that caused by my browser (and its association with java) or this forum?
I can import java.nio.* and java.nio.channels (which is here also red underlined) but not java.nio.file (red underlined).

Regards
Re: java.nio.file [message #1791072 is a reply to message #1791069] Fri, 22 June 2018 11:25 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Apologies for the multiple submission of my previous reply.
It appeared to have not been sent so I tried several times but it apparently had been sent.

Regards
Re: java.nio.file [message #1791073 is a reply to message #1791069] Fri, 22 June 2018 11:26 Go to previous messageGo to next message
peter turner is currently offline peter turnerFriend
Messages: 11
Registered: June 2018
Junior Member
Apologies for the multiple submission of my previous reply.
It appeared to have not been sent so I tried several times but it apparently had been sent.

Regards
Re: java.nio.file [message #1791148 is a reply to message #1791065] Mon, 25 June 2018 07:40 Go to previous message
maria katosvich is currently offline maria katosvichFriend
Messages: 1
Registered: June 2018
Location: usa
Junior Member
I reference them with other projects which don't import java.nio.files and they work fine.
Previous Topic:barcode With birt 4.
Next Topic:Too Difficult to install, to compile, to use ide, and to uninstall
Goto Forum:
  


Current Time: Thu Mar 28 11:27:15 GMT 2024

Powered by FUDForum. Page generated in 0.05375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top