java.nio.file [message #1790933] |
Wed, 20 June 2018 10:36  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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?
|
|
|
Re: java.nio.file [message #1791063 is a reply to message #1790964] |
Fri, 22 June 2018 11:19   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.09575 seconds