2

I'm looking to be more efficient when I have to create single-use Java 8 programs. IntelliJ IDEA and Eclipse are great IDEs, but I need to do this:

  • Create a project in the IDE
  • Do some configuration
  • Create the program file
  • Run it
  • Remove the recently created project from the IDE
  • Delete the recently created folder (with all the files created by the IDE) from the disk

A friend recommended me DrJava. I tried to install it but it needs Java 6, and I can't install it. I can have only Java 8 on my computer.

What would be your recommendation for an IDE with this characteristics?

  • Lightweight (for example, DrJava has only 12 MB)
  • Supports Java 8
  • It should be able to manage simple Java files, without need to create a project
  • Supports debugging
  • Supports auto-complete
  • Doesn't need to create a project to compile and run a simple Java file
  • It could be a commercial IDE, but Open Source would be better
  • Maven support would be awesome, but it's not critical

The style of work with this IDE would be:

  • Write a new Java 8 program in that IDE
  • Run it
  • Delete program

EDIT 1:

I found how to do it using Sublime Text 3. It costs USD 70, but it works. To configure it you will need to follow this instructions. It lacks of debugging and autocompletion, but it works.

EDIT 2:

I tried to use Sublime Text's JDebug plugin, but I could not make it work. To be honest, I think the problem is mine as I'm not familiarized with jdb.

By the other hand, I looked some ST plugins for autocompletion, but no one were good. There's another plugin, Javatar, but if I'm going to work with projects, I will prefer to work with IntelliJ.

So far, I'm following an advice I found here: work with IntelliJ using a Java project with simple structure, and write all the single files into it. And you know, that IDE is great.

Anyway, I will leave this question open, just in case someone can recommend us a lightweight IDE.

5
  • 1
    The project site for DrJava (drjava.org) says that "This version supports Java 6, 7, and 8". Is your experience different?
    – CPerkins
    Jul 22, 2016 at 16:24
  • Yes, I read that too. But, I installed it on my computer, and it turns out that it needs Java 6 to run :-/
    – Mario S
    Jul 22, 2016 at 22:23
  • Interesting and unfortunate.
    – CPerkins
    Jul 25, 2016 at 13:02
  • The DrJava site also mentions that the Mac app only works with Java 6. Are you on a Mac?
    – John Y
    Aug 26, 2016 at 14:55
  • Yes, I'm on a Mac :-)
    – Mario S
    Aug 26, 2016 at 22:15

3 Answers 3

2

The best option is probably to stick with a full-featured IDE (as Warren P suggested and as you eventually did).

For those who really insist on a lighter-weight IDE specifically for Java, I guess DrJava would be the best option. (You said you couldn't get it to work for you, but most other readers probably will not have that problem.)

If for some reason you want something like DrJava but can't or won't use DrJava, I recommend Geany, which has some support for Java (and many other languages), including a plugin for debugging via GDB.

1
  • The problem with Dr. Java was not make it work. The problem I found is Dr. Java for Mac needs Java 6 installed on your computer. To be honest, I didn't even try it. I don't want to have installed in my computer Java 6 and 8... I will try Geany. Thanks!
    – Mario S
    Aug 26, 2016 at 22:14
2

You may think you want that, but unless your job is to teach eight year olds, you're going to wish you just stayed with a real IDE like IntelliJ IDEA.

Reasons:

  1. Java IDEs are big and full of features because working with Java without those features is a giant pain.

  2. Code-completion is great. Having something check your style, suggest how to repair your project when it breaks is great. Recovery from errors is a major part of what IDEs give you.

  3. Project build management without an editor means writing an Ant script in XML or in Maven, by hand. Java builds don't happen without build systems, except for trivial single file Java applications. Dependency resolution and library/classpath management doesn't happen magically either. You need an IDE for it.

  4. Anything less than IntelliJ IDEA, or NetBeans, or Eclipse is going to waste hours and days (or months) of your life. I rate them as IntelliJ awesome, Netbeans almost awesome, and Eclipse as "merely ok".

If you don't want a fat IDE, then you could try JEDIT which is a text editor built in Java that has lots of lightweight plugins, one or more of them might meet your scripting needs.

4
  • I already use IntelliJ IDEA everyday. What I'm looking for is a lightweight IDE for "create single-use Java 8 programs"
    – Mario S
    Aug 25, 2016 at 15:15
  • What is a "single use" program? A demo? A script? I usually have a different workspace for those so I don't pollute my "big project" workspace.
    – Warren P
    Aug 25, 2016 at 15:48
  • Yes, those scripts are not part of the main project. Some use cases: I need to modify a database / connect to a server / do a quick test, using some libraries written on Java. Anyway, as you can see on "EDIT 2", I end up using IntelliJ with an empty project.
    – Mario S
    Aug 26, 2016 at 12:52
  • 1
    I see. You almost want something like the Python IDLE ide. Understood. Good question. Never seen it. Some people might try to use JEDIT for this though. Try it. jedit.org
    – Warren P
    Aug 26, 2016 at 16:43
0

Java has, at least it had, backward compatibility, so applications runing on older Java version should always run on newer ones. So try runing Dr. Java on version 8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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