Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do you open a Java open source project in an IDE

Reply
Thread Tools

How do you open a Java open source project in an IDE

 
 
Sathyaish
Guest
Posts: n/a
 
      01-11-2007
Pardon my nescience if the title of the question makes me sound like a
nincompoop.

With Microsoft's .NET platform, there are only a handful of IDE's, most
proprietary, with Microsoft Visual Studio .NET 200x dominating the
market. As a result, if I download a C# project/source code from the
Web, I am almost sure it would have a Microsoft Visual Studio .NET
'Solution' file (.sln) or 'Project' file (.csproj). If it does, I open
the file to launch the project within Visual Studio.

If not, it is very likely that the project would have a
project/solution file of one of the other 2 or 3 available IDE's for
..NET -- SharpDevelop, Eclipse (has a plugin), and that's it.

However, with Java, since I am a newbie in the vast kingdom of Java, I
feel a bit lost when I download Java source code from the Web. For
instance, I just downladed apache's (ASF's) log4j. Most of the projects
in Java just have the .java and .class files. They do not have an IDE
file associated, for instance, a .ipr file for IntelliJ IDEA or
something. I can understand that it is so because there are many more
IDE's, most of them open source for Java, even if they're not that good
(EditPlus, IntelliJ (which is not open source) IDEA, NetBeans, Eclipse,
WSAD etc.).

My question is, when I get a folder of source Java code, with a
multi-level folder heirarchy within that, containing only .java files,
how do I open that in an IDE ensuring that the heirarchy of the files
and packages is maintained?

 
Reply With Quote
 
 
 
 
ck
Guest
Posts: n/a
 
      01-11-2007
Sathyaish wrote:
> My question is, when I get a folder of source Java code, with a
> multi-level folder heirarchy within that, containing only .java files,
> how do I open that in an IDE ensuring that the heirarchy of the files
> and packages is maintained?


I simply import the source code into a blank project (in case I am
using eclipse. I create a new java project, with project same as the
source code that I would like to view).
One more thing that you can do in Eclipse is create classpath
variables(windows>preferences>java> build path> Class Path Variables)
Click on new and add the binary (for example jar file of log4j) and
include this variable in your project. To this variable you can attach
the source code which would be a zip file generally.
Here after it would be very easy for you to look at the code.

Hope this helps.

Cheers,
Ck
http://www.gfour.net

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-11-2007
Sathyaish wrote:
> Pardon my nescience if the title of the question makes me sound like a
> nincompoop.


That's OK. The title made you sound like a nincompoop,
but your use of the word 'nescience' makes you sound like
an arrogant prat - so it all balances out (shrugs).

> ....I just downladed apache's (ASF's) log4j. Most of the projects
> in Java just have the .java and .class files.


Are you saying the log4j source distributable failed to
include a build.xml file? Most Java based projects these
days come with one, because..*

> ...I can understand that it is so because there are many more
> IDE's, most of them open source for Java, even if they're not that good..


There, there. There, there.

> (EditPlus, IntelliJ (which is not open source) IDEA, NetBeans, Eclipse,
> WSAD etc.).
>
> My question is, when I get a folder of source Java code, with a
> multi-level folder heirarchy within that, containing only .java files,
> how do I open that in an IDE ensuring that the heirarchy of the files
> and packages is maintained?


* ..most (if not all) of those IDE's understand ant
based build files.

Andrew T.

 
Reply With Quote
 
Daniel Dyer
Guest
Posts: n/a
 
      01-11-2007
On Thu, 11 Jan 2007 11:14:25 -0000, Sathyaish <(E-Mail Removed)> wrote:

> My question is, when I get a folder of source Java code, with a
> multi-level folder heirarchy within that, containing only .java files,
> how do I open that in an IDE ensuring that the heirarchy of the files
> and packages is maintained?


Is there a file called build.xml? Most open source projects will provide
this file so that they can be built using Ant, which is pretty much the de
facto standard for building Java projects. IDEs such as NetBeans can
import build.xml and configure sensible defaults for the project.

You shouldn't have any problems maintaing the heirarchy. Usually you can
just point the IDE at the root of the source tree.

Dan.

--
Daniel Dyer
http://www.uncommons.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
[IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source Ilias Lazaridis Python 6 01-28-2006 09:42 PM
[IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source Ilias Lazaridis Perl Misc 8 01-28-2006 03:52 AM
[IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source Ilias Lazaridis Ruby 0 01-26-2006 11:37 PM
The Wisdom Seeker IDe, an open source software development project for all Craig S. Ugoretz C++ 0 02-18-2004 01:53 AM



Advertisments