tags:

views:

619

answers:

9

Hi,

Other than the Java language itself, you have to learn the java framework. Similiar to how you have to learn the .net framework in addition to the language (C#/VB).

How important is it to know unix? Or rather, what unix areas should one focus on?

Seeing as many people run java based applications (desktop/web) on unix boxes, what sort of unix skills do you need? Are we just talking basic directory traversing, creating files, etc or is there much more to it?

A: 

I think your metaphor means you should learn Java library in addition to the language itself.

Certainly knowing UNIX will help a bit as it increases your general knowledge, but I don't think it's really directly related to Java at all.

Mehrdad Afshari
+8  A: 

Really, you don't need unix skills directly for writing java-based applications. However, if you want to develop java-based applications on unix boxes and deploy there, you want a good working understanding of how to operate and administer a unix box.

But for the areas you mention (directory traversing, creating files), you'll be using Java APIs that only occasionally touch on Unix-specific ("\n" vs "\r\n", directories rooted at "/", etc.) information. When they do touch, it's not something you need to know in a programming sort of way, it's something you need to know in a user/administrator sort of way.

Richard Campbell
To maintain portability, it is best for a Java program not to use Unix-specific information, Among other, by using System.getProperty("line.separator") instead of '\n', etc... See getProperty from http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html
Liran Orevi
A: 

As well as knowing how to traverse directories, you need to be able to edit and grep files. You need to know how do do some basic process management also. But the level of detail you need depends on what you want to do on a unix system. Eg. web development requires that you run a web container such as tomcat. You will probably want to learn the package manager of your system of choice.

Martin OConnor
A: 

It depends on your OS. You can do Java development on Windows in which case no Unix/Linux knowledge is required. That said, even on Windows GNU/Cygwin utilities can be helpful.

Steve Kuo
+3  A: 

Not important for the language it self.

You can learn java very well and never have touched a unix box at all.

If you want to deploy on a unix server however you should know just the basics.

File paths, new lines, permissions, etc. but the knowledge needed can be acquired after a few hours in the typing in the terminal.

Most of the os specifics are abstracted into the language from the beginning. Those that cannot be abstracted ( such as cron for instance ) are left behind.

OscarRyz
+11  A: 

The answer as read from Sun marketing material is that Java is cross platform, so you don't.

The practical answer is that you need to know enough to get your own application up and running on the platform where you plan to use it. Getting to know Apache or Tomcat configuration helps if you're working with web development, and so does knowing how to use the basic network analysis tools - the ifconfig, netstat and traceroute commands are all useful. File permission tools are also a must for getting a system working - look into chmod and chown and how those commands work.

Desktop systems have it easier, since most windowing systems are very good at working cross platform, but you still need to know a little bit about how the file system and permissions are structured.

Dan Monego
I'd vote this up but I dont want to ruin poster's perfect 666 rep
willcodejavaforfood
+2  A: 

You don't really need Unix skills to use Java, but if you do you'll have a good toolbox relevant for any kind of development. I certainly appreciate the ability to grep my entire source tree for files, use Perl for code generation and so forth. Even a simple matter of counting all lines of source code can be hard to do in a GUI only world. Knowing the basic Unix command line tools will make you a better developer imo.

Brian Rasmussen
A: 

I assume that you are talking about learning and not developing a full scale project. Because of the JVM, which by vision should provide a uniform API towards the programmers, regardless of the underlaying system, Java programs are meant to be written in a way that is not specific to the underlaying system (up to the point of using JNI etc').

That means that as a writer of small programs for learning, your knowledge of the underlaying system should be minimal.

If you are not using IDE, you should at least know how to run 'javac', 'java' from the command line, and to test your program.

If you are Using an IDE like Eclipse, from the point that the IDE is running, you should expect an experience that is almost isolated from the system underneath.

However keep in mind that this is the vision, and it is always advised to know at least a bit about what's going on on your own system.

Liran Orevi
A: 

You don't need to know *NIX to develop a Java application, maybe if you're going to run it on a *NIX machine or if it uses something very attached to *NIX it'll be good if you know the basis about file names and permissions, for example.

The need of knowing *NIX comes with the need of deploying the app on a *NIX server. If this is the case it'll be good if you know something about system variables (set the JAVA_HOME, for example), the tipicall directory structure of a *NIX machine, and basic use (creating files, directories, deleting, symlinks...).

I think it's very good to know some scripting (bash, csh, sh). Depending of the complexity of the deployment this can give you extra points at the look of your boss for example.

HED