Public Group

# What is YOUR opinion? (Java compiler)

This topic is 4168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I just started my CS1400 class, where we will be learning the basics of OOP by using Java. My instructor suggested we start off using TextPad and then move into one of the other compilers as we go. He also said we could use any compiler we wanted to, just to import it into TextPad and compile/save it prior to turning it in. So what is a great, inexpensive Java compiler? Something I can get used to and use years down the road, either on my own projects or in an employment setting. I have heard of a few, but wanted to get more than one or two opinions, I wanted to also see what people who actually used the compilers thought of them. I have heard that Eclipse was good, or BlueJ. Of course there are the MS compilers. What do you all use, and LOVE? I was thinking of something with search features where I could search for different system or Java API commands. Also something with the text sensitive thing that will show me a list of options as I type out the different commands.[/edit]

##### Share on other sites
In the past I have really enjoyed JCreator. It has word completion and you can search through the Java API documentation from within the editor. The interface is clean and it is easy to use, and the IDE also has a community who can help solve your questions. By the way, it's free.

The site is located at this web address: http://www.jcreator.com/

EDIT: I use JCreator with Sun's compiler.

##### Share on other sites
Eclipse is a bit harder to learn than most ide's, especially if your use to microsoft's ones but its proabaly one of the best for java

it might not be worth using for a intro to OOP course but if you ever do a project with more than 2 or 3 classes id recommend learning eclipse

##### Share on other sites
Quote:
 Original post by BUnzagaI just started my CS1400 class, where we will be learning the basics of OOP

I doubt it, somehow :) Most programming classes out there are actually really bad, especially when it comes to buzzwordy stuff like OOP.

Quote:
 by using Java. My instructor suggested we start off using TextPad and then move into one of the other compilers as we go.He also said we could use any compiler we wanted to, just to import it into TextPad and compile/save it prior to turning it in.

TextPad (assuming you're talking about what comes up on the first few Google hits) is not a compiler. It's a text editor; something you use to write up plain text documents - just like Notepad (suppled with Windows), but with extra features that programmers find useful when they write code. But nothing specific to Java code in particular, except possibly for Java-flavoured syntax highlighting.

The intent is to make sure you're using something that will save a plain text file. Of course, you will use a .java extension for the file, but it should look, to any file viewer, like a .txt does - i.e. it can't contain any "special" data that indicates font faces or sizes, bullet lists etc. etc. etc. like you get with a Word document (or similar). The reason is simple: no compiler will accept such things. :)

The compiler you'll be using, by default, is javac. This is the compiler that Sun supplies when you download Java (or use a version of Java that came with your computer or operating system). You need to run it from the command line, when you're not using it from an IDE (keep reading).

Quote:
 So what is a great, inexpensive Java compiler? Something I can get used to and use years down the road, either on my own projects or in an employment setting.

javac. [smile] It's not everything that everyone wants in a Java compiler, but it gets things right, and it's free.

Quote:
 I have heard of a few, but wanted to get more than one or two opinions, I wanted to also see what people who actually used the compilers thought of them.I have heard that Eclipse was good, or BlueJ.

None of these things are compilers either. They are IDEs - more powerful than text editors generally, and often specifically designed for developing Java code. Typically, they bundle together a window with text-editor behaviour with a debugger, plus *an interface to* a compiler. I.e. menu options or toolbar buttons that mean things like "compile everything that I changed since last time, and if it works, run the resulting program".

But they (at least, for any Java IDE I've heard of) don't actually compile the code itself. When you click the button, the IDE figures out what files need to be compiled, and then talks to the compiler - a separate program - to do it.

You get absolutely no bonus marks for guessing what compiler Java-specific IDEs talk to by default. ;)

There may also be interfaces to other tools used in Java development, such as the jar-packager (the default one from Sun is called jar), which binds your class files (the results of compiling your .java source) together (along with any resources your program uses - although in programs for a university course you probably won't have any of those), along with a special "manifest" file (which gives information about what version of Java was used, which class contains the program entry point, etc.), into a single file (which is actually basically a zip file, but it has a .jar filename extension instead of .zip). Actually, running your program uses one of these tools too: the actual runtime, which is called - oddly enough - java. This can run an individual class file (if it's the one that contains the program entry point, and if the other class files it depends on are all in the right places) or (with the correct command-line options) a jar file (in which case, java looks up the information in the manifest to figure out where to start; the advantage of doing this is that if you get it right, then you can be sure that things are in the right places and don't have to think about which class has the entry point).

##### Share on other sites
Quote:
 Original post by anothrguitaristIn the past I have really enjoyed JCreator. It has word completion and you can search through the Java API documentation from within the editor.

Unless they've changed it, JCreator's code completion is tragically simple. All it does is scan the local file for partial matches and add that. It doesn't actually know anything about javadoc, or the available apis, or even basic syntax parsing. Eg:

int toStringCount = 0;someObject.toStr

If you do code completion here, you'll end up with someObject.toStringCount rather than the expected behaviour.

Having said that, JCreator is a nice beginner IDE. It's simple, uncluttered and doesn't get in your way. After a while you might want a 'proper' IDE (ie. one that has a debugger), in which case I quite like Eclipse. NetBeans is also popular.

IIRC, Eclipse is the only one that includes it's own compiler rather than using the Sun one (so it can do background compilation).

##### Share on other sites
Quote:
 IIRC, Eclipse is the only one that includes it's own compiler rather than using the Sun one (so it can do background compilation).

Nope, runs on and requires JDK.

Unless you have resource limitations with regards to computer used for development, then the answer is simple: Eclipse or NetBeans.

NetBeans is better if you need visual development, forms, components, etc. Eclipse is better for straight code. Given the nature of this course, I think eclipse might be somewhat better, since it allows pretty direct file/project manipulation.

Both are free.

Perhaps one downside of these IDEs is that they offer incredibly powerful refactoring features, meaning you get instant code compilation, full logical and syntactical error checking (as far as possible), good style practices, etc. So for learning Java it'll keep an eye on everything you do - but once you're faced with working outside of such IDE, you'll realize you don't even know where to start, or know why there's so many obscure errors popping up.

##### Share on other sites
Personally, I like JCreator for an IDE. It's pretty simple to use, and I've never had the trouble with code completion another poster mentioned. If you can afford the \$20 to buy the Pro version, instead of getting the shareware one, it's even better.

For small projects, like it sounds you'll be doing, I'm more likely to just use notepad and the command prompt.

##### Share on other sites
Quote:
Original post by Antheus
Quote:
 IIRC, Eclipse is the only one that includes it's own compiler rather than using the Sun one (so it can do background compilation).

Nope, runs on and requires JDK.

It needs a JDK, but it still uses it's own compiler:

Quote:
 from the Eclipse website:JDT Core is the Java infrastructure of the Java IDE. It includes:An incremental Java compiler. Implemented as an Eclipse builder, it is based on technology evolved from VisualAge for Java compiler. In particular, it allows to run and debug code which still contains unresolved errors.

##### Share on other sites
The java heavy people at my workplace swear by NetBeans. I'm just picking up the language myself, but at first glance the IDE seems much better than Eclipse (which I've also heard many good things about, but at first glance is awkward and missing some niceties I've grown used to from Visual Studio)

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 13
• 19
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
632929
• Total Posts
3009287
• ### Who's Online (See full list)

There are no registered users currently online

×