Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I would like to start working on my own custom IDE. The biggest reason I want to work on the IDE is to help me gain an even greater, more intimate understanding of java (and other languages I add into it.)

I don't want to do anything super fancy or revolutionary, I'd be happy if I could create something as compact as the BlueJ IDE I used in high school and be content.

I have a few question on the specifics of the task that I hope I can get cleared up before I start investing time in this:

  • Is there anything I should be aware of when writing the parser?
  • Does anyone have any pointers that I should be aware of; pitfalls, brick walls or other constraints?
comments disabled on deleted / locked posts

migration rejected from stackoverflow.com Oct 29 '13 at 13:15

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too broad by gnat, Kilian Foth, MichaelT, World Engineer Oct 29 '13 at 13:15

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

up vote 10 down vote accepted

First of all, I have not written an IDE, because I have found that Eclipse and IntelliJ IDEA serve my needs for the Java projects I have worked on thusfar.

Instead of creating a new IDE from scratch, why not contribute to an existing open-source IDE project, such as Eclipse or BlueJ? Writing your own IDE may give you experience writing Java, but will more than likely just give you experience writing an IDE. Your time could be better spent improving upon an existing IDE and building on the experience of others.

Check out the BlueJ bug database and see what you think. http://bugs.bluej.org/trac/bluej/

I hope that helps, best of luck!

Please don't add signatures to your posts. See the faq for more information. Thanks! :) –  Anna Lear Jun 29 '11 at 3:59
@Anna Thanks for pointing that out, my apologies. I'm new here! –  Robert Dyson Jun 29 '11 at 4:06
Your absolutely right, I really should help some open source projects. The only reason I haven't tried to do so is my severe lack of a) organization and b) lack of group and mainstream production expirience. I fear I would be more of a hinderance to others than a benefit; that being to sole reason I wanted to work on my own project. That way I would know whats going on and maybe get my self to the level that I would be useful to others. –  AedonEtLIRA Jun 29 '11 at 14:55
Find a well-organized open source project and jump in. Look through their bug/feature/wish list and see if there is something small you can do. Even something like fixing typos in documentation will help you get used to downloading the source, making changes, testing them, and submitting your work to the VCS. –  Barry Brown Jun 29 '11 at 19:27
Thanks for you advice. That sounds like a good idea. I will have to see what I can do then. –  AedonEtLIRA Jun 29 '11 at 22:59
show 1 more comment

There are tons of great editors out there, complete with parsers, code completion, and syntax coloring. Although the editor is the "face" of the IDE, it's not where the action is. The real strength of any IDE is not what you see; it's what it hides from you. I would not start your project by writing the editor.

Instead, focus on the build system. That is, what happens between the time you press the "run" button and when your Java app starts? Roughly, your IDE needs to do the following:

  1. Set the CLASSPATH variable so JAR files can be located.
  2. Compile all .java files in the project.
  3. Locate the file with the main() method. If there's more than one, query the user. Or something else?
  4. Launch the .class file that contains main(), providing a console for textual I/O.

Since this is a Java IDE, you will have to make a critical decision up front:

Will you compile the source files by calling javac on the command line and launch the app by calling java?


Will you compile the source files by invoking javax.tools.JavaCompiler.CompilationTask on each file and then spawning a new Thread to run the .class file that contains main()?

One of these approaches will get you up and running quickly and has the advantage of allowing your IDE to work with other languages as well. The other will get you very intimate with Java internals, but will tie your IDE to the Java ecosystem.

I see thank you for your critical insight. I didn't even think about those two desicions –  AedonEtLIRA Jun 29 '11 at 14:51
add comment

Contrary to what others have posted, if we all just stuck to one what others have already made, then we would be stuck programming from a DOS-like prompt.

Making an IDE of your own is a good concept. My question would be "Why not?" Yes, there are other well established IDEs out there, but then again, look at how Linux as an operating system started. Someone probably told him "Why reinvent the wheel? Windows is already made!" But look at Linux now. The problem I see with a lot of other programmers is that they aren't willing to venture into other areas others have already established themselves in. With that type of thinking, we would all be still be driving Ford Model-Ts.

So what I would suggest is that you do your homework using other IDEs and see how using them work differently from others. Take note of their layouts and how users interact with them to get a task done. From there, see if you can compile a list of features, high points and low points, advantages and disadvantages for each that's worth noting and see if you can incorporate some of these features into your own and anything new you can come up with. Be sure you know the objective of your IDE.

Above all, a programming IDE is nothing more than your basic Notepad application on steroids. Don't let nobody say you can't do this or stir you away. Just build a bare-bones basic editor and build up in baby-steps from there.

A good example is Twitter vs Myspace & Facebook. The wheel was reinvented, but a different appeal.

add comment

Writing an IDE involves a significant amount of Yak Shaving, very little of what you'll find yourself doing has anything to do with what you're trying to accomplish.

Instead, you're probably best to start with something existing and rewrite only the bit you're interested in rewriting. Eclipse is a great place to start because everything is pluggable. Want to write a new parser? Then just write a new parser. A new edit window? New language cross-reference engine? Keep the existing stuff, and plugin your new stuff. Many other IDEs are similarly extensible.

Eventually you can build a complete new IDE by rewriting everything one bit at a time. But it's helpful to have an existing scaffolding to hold things up while your testing what you've built.

Remember, Linux was originally built on Minix. None of it remains, but it was useful at the beginning.

add comment

There are so many good IDEs are available, Still if you want to write your own IDE, you can use EMF, Eclipse framework to write own IDE.

add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.