Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Opening Files(I'm having a tough time understanding Eclipse...)
Opening Files [message #910595] Mon, 10 September 2012 04:03 Go to next message
D F is currently offline D F
Messages: 1
Registered: September 2012
Junior Member
Is it possible to simply open a file, save/compile it, and run it? I've been at it for a few hours and I'm only able to run a new class file created under a project. I can not open simply open and run a file, and even with a project up I am unable to bring an existing file into the project; it just opens and I have the same problem.

Is this intentional? Am I missing something? I suppose I could just open the existing files and copy/paste their contents into a New class under a Project, but that seems awfully tedious and far too time-consuming to be reasonable.
Re: Opening Files [message #910654 is a reply to message #910595] Mon, 10 September 2012 06:53 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2274
Registered: July 2009
Senior Member
Yes, the project is usually what tells Eclipse what you're building against, and allows it to incrementally build your sources as you change them. Past the simple 'Hello, World' case, you won't be dealing with a singular class file.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Opening Files [message #910656 is a reply to message #910595] Mon, 10 September 2012 06:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26054
Registered: July 2009
Senior Member
Yes, you need to have the files in your workspace projects. You can use
File->Import...->General->* to import things into your workspace.
You'll want to import them into a Java Project's source folder.


On 10/09/2012 6:03 AM, D F wrote:
> Is it possible to simply open a file, save/compile it, and run it?
> I've been at it for a few hours and I'm only able to run a new class
> file created under a project. I can not open simply open and run a
> file, and even with a project up I am unable to bring an existing file
> into the project; it just opens and I have the same problem.
>
> Is this intentional? Am I missing something? I suppose I could just
> open the existing files and copy/paste their contents into a New class
> under a Project, but that seems awfully tedious and far too
> time-consuming to be reasonable.
>
Re: Opening Files [message #910855 is a reply to message #910595] Mon, 10 September 2012 13:59 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 9/9/2012 10:03 PM, D F wrote:
> Is it possible to simply open a file, save/compile it, and run it? I've
> been at it for a few hours and I'm only able to run a new class file
> created under a project. I can not open simply open and run a file, and
> even with a project up I am unable to bring an existing file into the
> project; it just opens and I have the same problem.
>
> Is this intentional? Am I missing something? I suppose I could just open
> the existing files and copy/paste their contents into a New class under
> a Project, but that seems awfully tedious and far too time-consuming to
> be reasonable.

Eclipse is really for building applications.

In my most active work spaces, I keep a scratch project around in which
I can just throw something quick to try out
Previous Topic:Arithmetics Example
Next Topic:exit code=13
Goto Forum:
  


Current Time: Sun Sep 21 20:16:14 GMT 2014

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

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