Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy File in eclipse copies file name (String) instead of file to clipboard

Having some issues with Eclipse here.

For some unknown reason when I try to copy a file from one directory to another, instead of placing the file to the clipboard it just copies the file name (a String).

What happens when I then paste it to the new directory is it creates a file called Snippet.java with the file name string in this class.

Has anyone else seen this sort of behaviour before?

Edit: Nevermind guys, rebooting my machine seemed to fix the problem. Who knows what was going on there.

like image 857
Jake Mackay Avatar asked Apr 13 '12 01:04

Jake Mackay


People also ask

How do I copy a file path in Eclipse?

Just select the file tab and hit Ctrl + C to copy file basename into clipboard. Hit Alt + Enter to bring up the file properties with absolute path and copy it manually.

How do I copy and paste a file in Java?

Apache Commons IO Another common way to copy a file with Java is by using the commons-io library. The latest version can be downloaded from Maven Central. Then, to copy a file we just need to use the copyFile() method defined in the FileUtils class. The method takes a source and a target file.

How do I find the path of a file in Eclipse?

Right click on the project's name in the Eclipse Project Explorer window, then select 'Properties' from the pop up menu. The Properties window will open. In the Properties window, select 'Resources->Linked Resources' to view the path variables.


1 Answers

I have the exact problem as described by Jake Mackay and have battled with it for several hours on the grounds that copying files is fundamental to the proper use of Eclipse.

Firstly I don't think it's an Eclipse problem as I have a similar problem in Eclipse Europa and Indigo. Also starting windows (7 service pack 1) in safe mode the problem goes away.

In my case I have narrowed the problem down to having the "Skype Click to Call v 5.10.0.9560" extension installed in "Google Chrome v 18.0.1025.168 m". When Google Chrome is not running or running with the extension disabled the problem goes away. From this I presume that Skype Click to Call is intercepting key board and mouse events for "cut/copy" and changing the normal behaviour.

For me installing the latest version of click to call, at this time v 5.11.0.9874 the problem also goes away.

like image 198
Paul Hudson Avatar answered Oct 07 '22 08:10

Paul Hudson