Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Sathyaish - 11 Jan 2007 11:14 GMT
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?
ck - 11 Jan 2007 11:57 GMT
> 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
Andrew Thompson - 11 Jan 2007 12:15 GMT
> 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.).
[quoted text clipped - 3 lines]
> 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.
Daniel Dyer - 11 Jan 2007 12:19 GMT
> 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.

Signature

Daniel Dyer
http://www.uncommons.org



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.