How to open a .java file on mac - eclipse

I was sent an email with a .java file attachment, I need to open it in Eclipse, but whenever I click to download the file, it opens in the Brackets program, how do I get it to open in Eclipse? I use MAC and Safari as a browser

Related

Eclipse Open With option

In Eclipse I want to open a .xml file in a web browser and my colleagues who have the same drop that I have are able to right click the file and select open with option. My drop does not give me that option. What do I need to do to get that option?

eclipse - how to open a text-like file type if it's registered with another application

I like using Eclipse to open up certain text-based files that are huge - 140MB - because unlike notepad++, Eclipse can open larger files.
With notepad++, I could drag-drop a file into an open instance and it'd open it. With Eclipse, whether I do File>Open file or drag-drop, it still pops-open the Windows 10 Please select an application to open the file-type
QUESTION
How can I force Eclipse to open them even if they are registered to be opened by another application?
You can select the editor to open files in with a right click.
Text Editor is eclipse, System Editor is whatever your OS chooses.
I believe default editor is what eclipse chooses based on the extension (Text editor vs. System Editor)

Opening a file without clicking through folder structure in Eclipse Remote System Explorer (RSE)

I want to edit a file (e.g. /root/get-pip.py) in Eclipse Remote System Explorer (RSE). Is it possible to open it without having to click through folder structure but instead simply typing or pasting the filepath somewhere?

Editing files with netbeans without setting up project

Is there a way to use netbeans as a simple text editor, without setting up a project?
I am interested in using netbeans features as a text editor, especially for making quick changes on remote servers.
Yes, of course you can use it as a text editor. Just Open Netbeans and select File > Open File and select the file to open from the file chooser dialog. Make changes and click Save.
If you want to edit files on network locations, again do File > Open File and paste the location of your remote file.

Open file in eclipse on mac 10.6

I have a deceivingly (at least for me) simple problem. I want to open a file in eclipse FROM Mac's finder. Whenever I try, I get the alert that Eclipse cannot open that file. Yet, from within Eclipse I can open the file, either by double clicking it in the Explorer/Navigator window or going file/Open File ...
At the end of the day, I want to be able to open a file in Eclipse by specifying the path name to that file.
Eclipse build id: Build id: 20100218-1602, with IDE for PHP Developers installed
Yes, this is something that should be simple, but it is not. The reason is that Eclipse uses the workspace as a way to abstract from the filesystem. The workspace is often similar to, but different from the file system. For one thing, only files within a certain project in the workspace are really known by Eclipse. Another difference is that a single file in the file system can be linked into the workspace and appear multiple times.
All this is to say that since the mapping from the file system to the workspace is not one-to-one, it is not easy to open any arbitrary file in the file system into your Eclipse instance.
That being said, it is possible to drag and drop a file from the finder into the editor pane. Eclipse will then attempt to open the file using whatever is the default editor for that file type.
So, dragging and dropping a Java file will open a Java editor for it (even if the file is not in the workspace), but dragging and dropping an HTML file will open it in whatever browser is set as Eclipse's default.
I think that is imposible in Eclipse.
For separated files you can use "textmate", it's fast and powerful.