Java Question (Help!?)

Ok, so I need to install Emacs, Gnu nano or some other way to write my Java code correct? Well I cannot install it because the directions seem written in some other language. Every place I look they give some wierd command I cannot mentally parse. They talk about compiling it, and typing in certain commands, but when I go to command prompt (Windows XP), I just get command not recognized. None of the instructions work.

Is there a place where I can download a self extracting file all I have to do is click, or do I need to know detailed UNIX commands or whatever these things are. Cause I am trying to follow the instructions, but nothing is working.

Please Help!

No, not really. Lots of people like Emacs and (to a much lesser extent) nano* for writing code, but there are many other options. The Eclipse IDE seems popular for Java development.

This is because you don’t have a C development environment on your system. You don’t really need one if you just want to develop Java. I know Emacs has a pre-compiled binary for installation on Windows, but I don’t know about nano. (Personally, I wouldn’t develop any code using nano unless I was in pretty dire straits. But that’s just a personal taste issue.) This is the website for the Windows port of Emacs.

But, as I said, you don’t need to use Emacs. Eclipse is right here. You might find it friendlier, if not as powerful.

*(BTW, how did you find out about nano? It’s targeted at people who grew up on pico and want an editor with the same interface that isn’t released under a license written by fascist crack monkeys on wheels.)

Wow, great! Thanks for that link, I will definately check it out.

Found about about nano from the Summer Java course I am taking. The teacher suggested Vi, Nano or Emacs, but he said we could use whatever. It is entry level, and he didn’t mention anything about a C development evironment. Though I did download and install the Java Server (J2EE?).

A nice free editor is jEdit, found at

Nano and Emacs are just command-line text editors, akin to the DOS “” program but much less user-friendly. They have nothing to do with Java beyond being text editors; notepad can get you similar results.

Try one of the IDEs! If you’re forced to work with Unix systems, you can also FTP the code over afterwards.

Nonsense. Pure and utter nonsense in every useful respect.

Emacs is a widely-used development environment that is programmable from the ground up to be whatever kind of system you want it to be. People like it because they can enter Emacs and never leave it as long as their computer is running: They have text editing, source code editing with syntax highlighting and indentation among other language-specific features, compiler control, documentation, and even Usenet news right at their fingertips (literally, through the use of command key sequences) in an integrated environment. IDEs may come close to that level of integration, but they aren’t there yet.

Comparing Emacs to edit is ignorance, plain and simple. Nano is closer to edit, albeit a bit better in some respects.

(I’ll stop ranting now. Promise. ;))

That’s probably because vi, nano, and Emacs are all Unix text editors and Unix systems come with C development environments by default. Windows systems do not.

Thanks for the correction. I never knew!

As pointed out, the OP doesn’t really have anything to do with Java specifically, but with a text editor. Way back when (that is, when I still used Windows), I used use WinEdit for coding; you can configure it to push-button compile, etc. I’m sure UltraEdit or various other text editors have similar features and that you can find one that more or less suits your tastes.

If you really want a graphical IDE, you might try NetBeans. Personally, I like vim for editing / writing source code, but NetBeans 5.0 has a pretty nifty GUI designer.

Not to hijack, but I remember a few years ago when I was learning Java that I used Forte – is that still in use? I may be getting back into Java and am wondering what IDE to use.

Another vote for Eclipse, here. Works great, and you can’t beat the price.

If you have the money, IntelliJ IDEA is awesome. As I’ve said elsewhere on the board, Eclipse is essentially a (poor) IDEA clone.

I’m pretty sure Forte was a repackaged NetBeans, so if you liked Forte, try that.

Personally, I’m a fan of IntelliJ IDEA, a very popular commercial IDE used by lots of open source developers (for whom it’s free).

If you’re looking for something simple to learn with, try downloading a trial of TextPad. It’s more powerful than Notepad but a lot simpler than Eclipse.

A few thoughts:
Do your coursework using a basic editor and the Sun JDK. Just about every problem I have ever had getting Java stuff to work correctly can be summed up in one word: CLASSPATH. The main problem is that there are countless different ways that your program can access a resource: as a file in the working directory; a file elsewhere, included in the CLASSPATH variable; a file in a jar included in CLASSPATH; a file in a jar that is referenced by a jar you included in the CLASSPATH; in a jar at a URL; among others. You need to understand quite intimately how the Java classpath mechanism works.

It really helps in understanding these issues when you have to set all of your environment variables and compile your project on the command line. Even though most developers use fancy IDEs to edit their Java projects, the command-line experience in working with Java will be invaluable when you are fussing around with a WebLogic server running on some Unix machine at a remote site and you can’t figure out why your EJB doesn’t see the properties file you are certain you provided. There won’t be an IDE on that machine to help you.

If you can put up with it, install vim on your machine. My reasoning for this is that no matter what flavor of Unix you encounter, you will always have vi at your disposal. The same cannot be said about any other editor. It pays to be able to dash off some quick edits on the server machine without having to FTP files to your Windows box for the task.

An IDE such as Eclipse will help you out substantially in managing all of the files in your project, managing your classpath, and building your project. Eclipse has a strong following and continues to improve by leaps and bounds. I personally have a soft spot for JBuilder, but it is too expensive. I’m hoping that with some persuasion, fancy plugins, and a few compromises, we can migrate to developing with Eclipse.

If you are adventurous, you might want to look at the Ant build tool and start using Ant on the command line to build your project. Many Java shops use nothing more than Ant and Sun’s JDK to build their products (in our group, though we use an IDE for editing the code, we always make our production builds on the command line using Ant).

I’m going to have to disagree heartily with minor7flat5. You really don’t want to start mucking around with environment variables and such if you don’t have to. As you’re in an introductory course, an simple-to-use IDE is what’s called for.

I like to use Netbeans for my Java development. IntelliJ IDEA is a brilliant IDE, but it’s too expensive just for course work. You can download Netbeans for free from Sun at . If you don’t have the Java JDK installed on your machine, you can download a Netbeans/JDK bundle from .

You should find Netbeans pretty easy to work with. All you have to do is create a project and then start writing classes.

True. But no matter what kind of flavor of modern Unix you encounter (Linux and the open-source BSDs, in other words), you can always count on having Emacs at your disposal.

IRIX, HP/UX, AIX, and Eunice are dead. Let them rot.

Assuming you find IDEs simple to use. Here’s an amusing essay on this topic: Does Visual Studio Rot the Mind?

I suppose, from both Rysto’s and Derleth’s comments it seems I have a bit of a minimalist slant on things. I guess that is so.

I want to be clear that I would never expect any of our developers to work with stone-aged tools, command-line commando all the way. I just expect folks to be conversant in the extreme basics. You say emacs is everywhere, and it is, until you need to make a little tweak on a fresh installation of Solaris on a brand new machine that your system administrator hasn’t quite finished configuring – is emacs there? Maybe, maybe not. Where would it live? Not sure. vi is there, though.
I just checked, and on my home Linux server I don’t have emacs installed.

To make a long story short, it pays to be able to use vi when you find yourself on a strange machine in a strange land and you really only need to make a piddly change in a file.

Once you get settled in, use the right tool for the job. Download and install emacs or whatever. For extensive editing I’ll FTP the file to my desktop machine and use TextPad or XML Spy to do the work.

Likewise, the foundation of understanding all of the Java classpath stuff is important: many of the more challenging bugs come from an unclear understanding of how classes are discovered. Nevertheless, armed with that knowledge, go ahead and have a tool do all of the tedious bookkeeping for you by all means!

The talk of ftp’ing files to edit reminded me of a utility I use at work.

Crimson Editor (

Nice free text editor with FTP built in so once you’ve told it where the file is by opening it or saving it, from then on it’s just one click to open or save it remotely.

I certainly take your meaning and I kind of agree to some extent. I agree enough that I do know how to use vi to make somewhat complex changes to files without blowing parts of them away by accident. I also know ed about that well, as well as sed even though sed doesn’t quite qualify. Handy in a pinch, though.

However, vi can be learned any time. (Or, at least, later.) Trying to learn vi at the same time as you’re trying to learn Java is more difficult than doing the equivalent with Emacs.

Which distro? Or did you roll your own? In every Slackware, Red Hat, and Fedora base install I’ve ever seen, Emacs is there. (Slack 10.0, Red Hat 7.1-9 and FC1-4.) It wasn’t there in Ubuntu 5.10, but neither was vi. Neither was gcc, in fact, nor any other nontrivial dev tools. Installing Emacs is as easy as installing vi via Synaptic, which is also the reason I’m never going back to non-deb distros.