Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Can't Build .java File when file is outside of project(in title described)
Can't Build .java File when file is outside of project [message #788142] Wed, 01 February 2012 06:51 Go to next message
Eclipse UserFriend
okay I am very new to eclipse and very much dislike it (but only way to do android dev without odd less supported netbeans addons).

I have a .java file that compiles. I want to open it and run it in eclipse and it opens and I can edit the code but when I go to build it asks Ant Build or Ant Build Default to execute and then nothing happens.

Note, this file is outside of my Projects folder. When I load a simple hello world that is in the src of a projects folder it runs okay.

If this program is so sophisticated it should be able to run a .java file that is not listed in my projects. I hate this program right now. I prefer geany. If there were a way to do android dev from geany I would.
Re: Can't Build .java File when file is outside of project [message #788154 is a reply to message #788142] Wed, 01 February 2012 07:12 Go to previous messageGo to next message
Eclipse UserFriend
I'll elaborate why this is a huge problem. I occasionally tinker with java and android dev (and then do something else for a few weeks or months) and often shift around files or am on a new reinstall of eclipse and eventually I end up having 5-6 or more "project folders" all with just a few files in them and they should all be in one.

So I need to be able to load source code files from any folder (I don't think i'll continue using the program if eclipse is incapable of doing that) ideally without moving or loading them into some other folder.

I guess this is more of a question about loading project files and how eclipse builds project files. I am used to just text editor and CLI compiling and still find that the most comfortable.
Re: Can't Build .java File when file is outside of project [message #788155 is a reply to message #788154] Wed, 01 February 2012 07:14 Go to previous messageGo to next message
Eclipse UserFriend
Some more detail.

I have a bunch of standalone (they can compile with single source code file) .java files in dir code_new. If I load CheckMark.java from code_new in eclipse nothing happens on compile and I don't want to move CheckMark.java into an eclipse project folder
Re: Can't Build .java File when file is outside of project [message #788162 is a reply to message #788155] Wed, 01 February 2012 07:20 Go to previous messageGo to next message
Eclipse UserFriend
I guess ultimately what the problem is, I am just trying to learn code. And that learning (and coding and compiling and debugging) is getting entangled with the learnign curve of "learning eclipse" i don't care about eclipse and don't want to learn how to use that IDE but I have little alternative for android dev. Soo....I don't know if It's eclipse (which it mostly always is and my little knowledge of eclipse) or an actual code error that is causing problems at times when using this obnoxious and clunky ide.
Re: Can't Build .java File when file is outside of project [message #788644 is a reply to message #788142] Wed, 01 February 2012 21:55 Go to previous messageGo to next message
Eclipse UserFriend
On 02/01/2012 05:51 AM, John K wrote:
> okay I am very new to eclipse and very much dislike it (but only way to
> do android dev without odd less supported netbeans addons).
>
> I have a .java file that compiles. I want to open it and run it in
> eclipse and it opens and I can edit the code but when I go to build it
> asks Ant Build or Ant Build Default to execute and then nothing happens.
>
> Note, this file is outside of my Projects folder. When I load a simple
> hello world that is in the src of a projects folder it runs okay.
>
> If this program is so sophisticated it should be able to run a .java
> file that is not listed in my projects. I hate this program right now. I
> prefer geany. If there were a way to do android dev from geany I would.

Eclipse requires Java files to be in projects in order to compile.
Re: Can't Build .java File when file is outside of project [message #788947 is a reply to message #788644] Thu, 02 February 2012 07:21 Go to previous messageGo to next message
Eclipse UserFriend
I generally create another project to try out all the code that I don't want to put in the project. Instead of copying all the code you want you can map a folder outside to an folder in eclipse - Create New Folder->Advanced->Link to alternate location.
Re: Can't Build .java File when file is outside of project [message #789147 is a reply to message #788947] Thu, 02 February 2012 12:00 Go to previous message
Eclipse UserFriend
I started with eclipse too and imho it is very intuitive and helpful for the start.
just create a project and link all the stuff you need into it, where is the problem with that? ^^

you only get into trouble if you try to load a projekt written with netbeans into eclipse.
Previous Topic:How to Draw a line inside a Table?
Next Topic:Question about Snapshot
Goto Forum:
  


Current Time: Fri May 23 10:42:55 EDT 2025

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

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

Back to the top