Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Java Application Development on Linux

timothy posted more than 9 years ago | from the not-those-weird-coffee-capsules dept.

Java 428

r3lody ((Raymond Lodato) writes "Java was developed to be a cross-platform language. In other words, it shouldn't matter what processor or operating system you used, just the language itself. Write Once, Run Anywhere is the slogan, and an admirable ideal to attempt to reach. So when I first saw the title of the book Java Application Development on Linux, I expected to find descriptions of some idiosyncrasies in the Linux environment that affected the Run Anywhere part of the equation. What I got was a lot more." Read on for the rest of Lodato's review.

The authors, Carl Albing and Michael Schwarz, chose to create a book that is a complete guide to writing commercial-quality Java programs. With the burgeoning presence of Linux, they focused on how to use the tools of the Linux platform to assist in the creation and maintenance of Java programs. They have broken the book up into five major parts: Getting Started, Developing Business Logic, Developing Graphical User Interfaces, Developing Web Interfaces, and Developing Enterprise Scale Software. Each chapter is self-contained, and the knowledgeable reader can pick and choose what they would like to read without losing track. Carl and Michael have properly started each chapter with a summary of what you'll learn, and conclude with a What You Still Don't Know section. A Resources section is included to give you more references for further study.

Part 1, Getting Started, provides a 10-chapter overview of Linux, Java, the SDK's (Software Development Kits) from Sun and IBM, version control via CVS, and IDEs. The first two chapters cover enough command-line Linux to manage your files and directories, plus the Vi editor to create and edit your programs. Chapter 3 gives you a summarized but complete overview of the Java language (minus the standard classes), and Chapter 4 covers how the program can deal with the context in which it's running. The next two chapters cover Sun's SDK and (mainly for comparison) IBM's development kit. In some instances, the Java program may be so large and/or so complex that running the byte codes in the Virtual Machine may not be quick enough, so Chapter 7 describes how to use the GNU Compiler for Java (gcj) to create native-code programs.

Larger programs definitely need some form of source control (actually, any project larger than a classroom exercise needs it), so source control using CVS is clearly laid out for you. While other products are available, CVS (Concurrent Versioning System) is widely available, robust, mature, and reliable, so the authors chose to describe its use in detail. For building and deploying the numerous files of a larger project, Ant provides value beyond what the make facility can offer, especially with the RMI (Remote Method Invocation) dependency problems that make can't address. Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

If the book stopped after Part I, you would still have a valuable addition to your bookshelf. However, it continues with a five-chapter discussion on how to properly develop business logic. One chapter is totally devoted to the business aspects of getting requirements, documentation, and buy-in. The next covers how to use a simple software development methodology to analyze the program and discover the objects to be created. The following chapter goes over a frequently overlooked aspect of programming - automated testing - with JUnit. The last two chapters of Part II cover storing data in databases using Oracle, PostgreSQL, and MySQL, and using the Java Database Connector (JDBC) to access them.

While Linux users (at least the older ones like me) are more used to command lines, most users want some form of a graphical user interface (GUI) to access the program and their data. Chapters 16 and 17 describe how to create a GUI using Swing and the Standard Widget Toolkit (SWT).

By far the most popular way to access programs is via a browser. Java Servlets are (maybe not so) little programs that run on the targeted web server, relieving the user of having to install an application on their local computer. This allows the user to always have access no matter which machine they're on (how many times have you complained that the program you want is on the PC where you're not?), and to always be accessing the latest version of the software (assuming the web administrator keeps it updated on the server). Chapters 18 and 19 cover Servlets and JSP (JavaServer Pages), then Chapter 20 describes Java-based web application servers (JBoss and Geronimo) for serving the servlets.

Finally, Part V covers Enterprise JavaBeans (EJBs) in what the authors describe as an almost criminally brief introduction. While it is definitely an overview, they still cover more than enough about EJBs to get you rolling, and provide many references to where you can fill in the blanks. They wrap up the book with a plea for help. The book is an Open Content book, and therefore they are requesting comments, suggestions, and patch files to help improve the text and examples.

I have to admit that Java Application Development on Linux is an extremely readable, very informative, and deep without being lengthy book. (The only complaint I have is that they tried to cover a little too much in a single book. EJBs, for instance, definitely warranted more coverage than they provided.) Carl and Michael use a very conversational tone, just as though they were sitting with you and giving you their personal attention. I found it enjoyable, interesting, and highly informative.


You can purchase Java Application Development on Linux from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

cancel ×

428 comments

Sorry! There are no comments related to the filter you selected.

Duh! (-1, Troll)

Brandon One (760352) | more than 9 years ago | (#11473089)

Application Development on Linux is for old people. Except in Nebraska.

Re:Duh! (0, Redundant)

Brandon One (760352) | more than 9 years ago | (#11473114)

In Russia Java Application on Linux develops you. Except in Nebraska.

Re:Duh! (0)

Anonymous Coward | more than 9 years ago | (#11473117)

I heard they outlawed it in Texas - those backwards FUCKS!

PROPS TO MAUS.

python (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#11473105)

but python > java

-michal

Re:python (-1, Flamebait)

grub (11606) | more than 9 years ago | (#11473333)

Flamebait? Hardly. Python rocks, Java is poo.

Re:python (0)

Anonymous Coward | more than 9 years ago | (#11473570)

RubyOnRails > Python > Java

Run everywere, my ass. (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11473113)

AFAIK newer Java versions don't run on my Linux Powerbook. Not that I miss it.

Re:Run everywere, my ass. (0)

Anonymous Coward | more than 9 years ago | (#11473186)

AFAIK newer Java versions don't run on my Linux Powerbook. Not that I miss it.

"AFAIK" eh? Try doing a little research before spewing.

Further, you could try running the OS your powerbook was designed for: MacOS X. Get an x86 notebook for 1/2 the price to run Linux faster. And yes, Java is supported very well on x86 Linux.

Re:Run everywere, my ass. (1)

spac3manspiff (839454) | more than 9 years ago | (#11473221)

Exactly, OSX was designed for UNIX not LINUX. How can you even think about using LINUX on a powerbook!

Re:Run everywere, my ass. (0)

Anonymous Coward | more than 9 years ago | (#11473262)

How about if I wanted a good CPU and good quality hardware without having to use a closed source OS?

Re:Run everywere, my ass. (0)

Anonymous Coward | more than 9 years ago | (#11473281)

It's not about being closed source. I tried MacOS X for a few months - I hated it. That was a wonderful day when I switched back to Linux.

Re:Run everywere, my ass. (0)

Anonymous Coward | more than 9 years ago | (#11473257)

> Try doing a little research before spewing.

Last time I checked, it didn't. I'm not going to do "research" (only losers think that googling is research, BTW) everyday just to install Java (which I don't miss, as I mentioned before).

So, smartass, do you know the answer?

Re:Run everywere, my ass. (2, Informative)

FatherOfONe (515801) | more than 9 years ago | (#11473599)

I normally don't reply to "Anonymous Cowards" but in this case I will make an exception.

If you are running OSX 10.3 you are running a very new version of the JVM. If you are running OSX 10.2 you are also running a very new version of the JVM. So I guess my question is what OS are you running on it?

Now you mention that you don't "miss" Java. I will argue that you don't care what an application is written in, as long as it looks good, is stable and does what you want. So I challenge you with this. How do you know what the application was written in? You probably don't. If you are a Linux/Macintosh/Windows/Netware/Solaris user and you launch your MP3 player and it works do you really care to see if it was written in C, C++, Java, Cobol?

JAVA runs on all MAJOR platforms.
It doesn't require the user to "compile" any code to run.
It has a rich GUI toolkit built in.
It handles object cleanup well.
It's speed has become excellent at most tasks
It has excellent networking support built in.
It has a giant developer base helping to add funcitonality.

Re:Run everywere, my ass. (1)

SunFan (845761) | more than 9 years ago | (#11473467)


I had no trouble with recent JDKs on Debian 3.0. Your powerbook must be the flintstones model.

Re:Run everywere, my ass. (1)

SunFan (845761) | more than 9 years ago | (#11473512)


Sorry about that, _Powerbook_ didn't sink in right away.

I'll be the first to quote Bash... (5, Funny)

vbdrummer0 (736163) | more than 9 years ago | (#11473115)

Saying that Java is good because it works on all platforms is like saying that anal sex is good because it works on all genders.

Re:I'll be the first to quote Bash... (2, Funny)

Brandon One (760352) | more than 9 years ago | (#11473147)

But anal sex is good because it works on all genders! So I guess you are saying that Java is good because it works on all platforms. Kinda redundant. Maybe you should think about considering a vocational job in the Department of Redundantcy Department.

Re:I'll be the first to quote Bash... (1, Funny)

Anonymous Coward | more than 9 years ago | (#11473211)

Either way, someone's fucking someone in the ass. In software development:

Manager/Architect: Pitcher
Coder/Client/User: Catcher.

Re:I'll be the first to quote Bash... (0, Troll)

northcat (827059) | more than 9 years ago | (#11473421)

WTF doesn parent post mean and Who modded it as Insightful?? It just looks like a poor attempt at humour or a poor attempt at humour by a dyslexic.

Re:I'll be the first to quote Bash... (1)

MST3K (645613) | more than 9 years ago | (#11473436)

Department of Redundantcy Department

And you should be employed in the Department of Mispelling.

Re:I'll be the first to quote Bash... (0)

Anonymous Coward | more than 9 years ago | (#11473527)

And you should be employed in the Department of Mispelling.

Oh. Are you hiring? Looks like you've got plenty of employees already...

Re:I'll be the first to quote Bash... (0)

Anonymous Coward | more than 9 years ago | (#11473148)

Exactly!

Re:I'll be the first to quote Bash... (1, Funny)

Anonymous Coward | more than 9 years ago | (#11473192)

Hell yeah! I knew Java ruled, now I know why!

Re:I'll be the first to quote Bash... (0)

Anonymous Coward | more than 9 years ago | (#11473251)

But it is!!! I know from both sides! And with Males and Females!

Re:I'll be the first to quote Bash... (1, Funny)

Anonymous Writer (746272) | more than 9 years ago | (#11473346)

"Fuck once... fuck anywhere"

Re:I'll be the first to quote Bash... (1)

rishistar (662278) | more than 9 years ago | (#11473376)

And it works on many mammalian species!!!

Re:I'll be the first to quote Bash... (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#11473558)

AND MOST FISH!

Re:I'll be the first to quote Bash... (0)

Anonymous Coward | more than 9 years ago | (#11473418)

Dunno, never tried with a female... never tried Java either

Re:I'll be the first to quote Bash... (4, Insightful)

Frymaster (171343) | more than 9 years ago | (#11473446)

Saying that Java is good because it works on all platforms is like saying that anal sex is good because it works on all genders.

if you're old enough to remember back that far, you will recall that when k&r released the c language, on of the big "selling points" was that it was a hardware/os agnostic language. you could write applications in c for a variety of different operating systems running on lots of different hardware and even re-use code, libs and entire applications (so long as you had the compiler, obviously).

the "write once" mantra has been with us for 30+ years... and, in that regard, java beats the living pants off the other contenders.

Re:I'll be the first to quote Bash... (1)

fimbulvetr (598306) | more than 9 years ago | (#11473523)

Whoa, sweet. Thanks for the vim tips in your sig.

Re:I'll be the first to quote Bash... (0)

Anonymous Coward | more than 9 years ago | (#11473534)

God damnit that was funny!

Web Applications suck! (-1, Redundant)

Anonymous Coward | more than 9 years ago | (#11473133)

Doesn't anybody prefer stand-alone apps? I absolutely hate in-browser applications. They're dreadful. Often slow, clumsy UI (no menus, etc.), not to mention the whole platform independence thing is a big fat lie. Consider San Jose State University, whose big stupid web database thing is pretty much IE-only. They provide a featureless and ugly backdoor for non-IE browsers. It's painful.

Re:Web Applications suck! (0)

Anonymous Coward | more than 9 years ago | (#11473627)

Your backdoor is ugly and featureless, too, but you don't hear me complaining.

Write once, run everywhere is called GCC (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11473139)

JAVA is a big fat marketing lie.

Re:Write once, run everywhere is called GCC (2, Interesting)

MightyMartian (840721) | more than 9 years ago | (#11473497)

> JAVA is a big fat marketing lie.

Which, amazingly enough for a lie, I am now using to rewrite some of our inhouse utilities in preparation from the move from Win2k to Linux servers. There's not too much overhead on CLI Java programs, and I've ported one app so far, rewritten on my Windows box, and it ran without a single hitch on the Linux server it's destined for. No recompiles, no nothing.

Re:Write once, run everywhere is called GCC (1)

SunFan (845761) | more than 9 years ago | (#11473559)


Which linker? Which version of libc? Linux or UNIX headers?

C is technically the most portable language ever, but it doens't make it trivial. People say "test everywhere" as if that's supposed to make Java look bad, but I think it is a god-send relative to hacking up the C preprocessor and figuring out autoconf.

Java: I love it, but... (-1, Flamebait)

kzinti (9651) | more than 9 years ago | (#11473145)

Write Once, Run Anywhere is the slogan, and an admirable ideal to attempt to reach.

Java's motto shouldn't be "Write once run anywhere" - it should be "Write once, test everywhere". An admirable goal, true, but don't kid yourself about what it really means.

Re:Java: I love it, but... (5, Informative)

koehn (575405) | more than 9 years ago | (#11473335)

*sigh*
I can't remember the last time I had issues with code because I changed platform, OS, or even JVM version. It's to the point where I don't think about it anymore.

Maybe if you're talking GUI code (desktop/applet), but for web or backend it's just not been an issue for me in some time. I've been developing on Java professionally for nine years now, and have have production systems in place for eight. I remember when you used to need to test every single VM, but by and large that time is done.

For example, I just finished working on a project running on J2EE 1.2 on Websphere 4 (jdk1.3.1) on Windows to running Websphere 5 (jdk1.4.1) on Z-Linux. The *only* thing I had to change was code that was written out of spec (a few JSPs forgot to import java.util.Vector). If the developers of the app hadn't been sloppy, there would have been no code change at all. This is an app that hits databases on Oracle, DB2, Teradata, and LDAP (with updated drivers for all of those, too).

I can think of plenty of counterexamples, but for most server-side business apps it really is write once, run anywhere.

Re:Java: I love it, but... (1)

photon317 (208409) | more than 9 years ago | (#11473341)


I don't love Java. All things considered, I don't see that their efforts at cross-platform compatibility are really a big win over things like the Standard C Library. In both cases, you have a language and a supposedly cross-platform standard set of library calls, and in both cases you end up having to code around the quirks of the platforms you run on. I think the right place for Java to have targetted, the place where it could have been the most useful, was as a client-side platform-indepedant environment, ala Applets in the web browser and whatnot. Unfortunately all the effort went into perfecting a server-side environment instead.

Re:Java: I love it, but... (1)

michaelggreer (612022) | more than 9 years ago | (#11473466)

That is exactly where they initially promoted it, but AWT performance was terrible and few had the broadband to download the jars in a reasonable time. So focus moved to the server side, where it performed well. Now, IBM has built native SWT widgets and performance is not as bad, although still a slow start and a monster memory hog for GUI apps. The best thing about Java now, as with Linux, is the enormous community of developers building excellent libraries (jakarta, hibernate, spring, webwork, etc). That is where it truly shines.

Re:Java: I love it, but... (4, Insightful)

pivo (11957) | more than 9 years ago | (#11473387)

Sure, you have to test on all the platforms that you support. But, what language/runtime requires less x-platform testing than Java? Today, the real issue is testing on each J2EE app server. That's where the real issues are. I haven't seen a pure Java platform issue in years.

Re:Java: I love it, but... (1)

michaelggreer (612022) | more than 9 years ago | (#11473392)

This is an old joke from 1998. In my experience, I have rarely found a problem and I regularly code and compile in OS X or Windows and deploy onto Linux servers. The one area I always have to be careful about is setting up the AWT environment, but this is sysadmin stuff and does not effect the code. What experiences have you had (since 1998) that lead you so say this? Probably in GUI apps, where I do agree. Everything gets tested on Windows, and looks like utter crap on a Mac. Except Eclipse, of course.

Re:Java: I love it, but... (1, Flamebait)

gustgr (695173) | more than 9 years ago | (#11473403)

"Write Once, Wait Forever to Run Everywhere"

Re:Java: I love it, but... (0)

Anonymous Coward | more than 9 years ago | (#11473601)


"Write Once, Wait Forever For A Laugh"

Re:Java: I love it, but... (1)

id09542 (635670) | more than 9 years ago | (#11473425)

Why do I keep having Java applications that require a specific JVM level. Not just a minimal level but an exact level. I am running 3 different JVMs on my workstation because of this. Is this just sloppy programming on someone's part or what.

Re:Java: I love it, but... (5, Informative)

mabinogi (74033) | more than 9 years ago | (#11473509)

Sloppy programming and / or paranoia by the developer.

Anything written for java 2 (1.2 and up) should work fine on the latest 1.4.x, and will probably work fine on 1.5 (I have had some funny issues with 1.5, but they were build time issues)

The only thing I've encountered that actually broke stuff in a version change was the bizarre choice by Sun to not just deprecate reading the OS environment, but to completely disable it by causing it to throw a runtime exception in 1.4 They changed their mind and re-enabled it and un deprecated it for 1.5 though.

Re:Java: I love it, but... (2, Interesting)

Raul Acevedo (15878) | more than 9 years ago | (#11473533)

I work for a fairly high profile Internet commerce company that uses WebLogic and pure Java. Our production servers all run Solaris, most of our developers run Windows XP (previously Windows 2000), and I run Linux.

We have hardly ever had any issues with "Write once, run everywhere." It works. Really. Probably writing Swing/GUI apps is different, but on the server side, developing and deploying across different platforms works like a charm. Admittedly the issues you get on development vs. production can be very different, so deploying a production system on multiple operating systems might give you different results. But as far as testing and developing on two platforms, then deploying on a third, we have no complaints.

Working on a java app now (5, Interesting)

I_am_Rambi (536614) | more than 9 years ago | (#11473157)

I do some of my development in linux, and some on windows. I have found some differences in linux but very few. There is one huge advantage of java, and one huge downfall.

The advantage: Java has abstracted alot.
The downfall: Java has abstracted alot.

For anyone who has done alot of programming in Java, they will understand.

Re:Working on a java app now (1)

alw53 (702722) | more than 9 years ago | (#11473332)

But everybody knows that Abstraction Is Good. That's why Wittgenstein and Kirkegaard are so much easier to understand than Zane Gray and Mickey Spillane.

Re:Working on a java app now (2, Insightful)

SunFan (845761) | more than 9 years ago | (#11473434)


When I programmed in Java, it wasn't Java itself that was the problem with respect to abstraction, it was the dime-a-dozen here-today-gone-tomorrow APIs that appeared on the cover of JavaPro. My co-workers would get all hot and horny over some new API only to have it backfire due to bugs, high volatility between versions, or the API just solving the problem terribly. Java itself is actually quite good, and Sun makes an good effort with it. However, with popularity came idiots, and with idiots came the APIs. Kinda like that usenet/AOL article earlier today. And don't get me started on XML. Ugh.

I hope the book has a section on porting.... (3, Interesting)

bigmike_f (546576) | more than 9 years ago | (#11473161)

The biggest issue with cross platform development is the "Gotchas". I'd like to see a list of what is actually different between all the OSes. What os specific parameters are there. What classes are unique to Linux devices. Especially with the native IO that 1.4 and later have included.

Heh (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11473163)

I took a Java class a few years back. The guy teaching it was using Rational Rose and he had educational copies for everyone. At the beginning of class, we would have to wait 5 minutes for it to fire up on his laptop. He kept saying that you needed a powerful computer to use it. Itself being written in Jave, I could only help but think, "What the fuck am I learning Java for? It's a complete dog." I stopped attending about halfway through.

Eclipse? (4, Insightful)

nhnfreespirit (809462) | more than 9 years ago | (#11473172)

From skimming through the review, I saw no mention of Eclipse. I wrote a large part of my Masters Thesis in Java on a Linux machine. Sure, Í could use vi, emacs or whatever and a command line compiler, but for me Eclipse is the Java development tool of choice.

BTW. the ret of my project was Java for a HP iPAQ 5555 which, interestinly enough was developed on Windows using IBM websphere device developer, which is based on Eclipse

Freespirit

Re:Eclipse? (1)

nhnfreespirit (809462) | more than 9 years ago | (#11473218)

Ok, so after a little more skimming, Eclipse IS mentioned, but more as a side note.... :-)

Re:Eclipse? (1)

Gr8Apes (679165) | more than 9 years ago | (#11473219)

They mention Eclipse, but the book is focused on NetBeans. Why, who the heck knows. Some conspiracy I'll bet! (where's the tinfoil hat? Oh crap, it's too late!)

Java as a word processor? (1, Funny)

Anonymous Coward | more than 9 years ago | (#11473225)

I wrote a large part of my Masters Thesis in Java on a Linux machine.

Most of us simply use LaTeX, or something similar.

Re:Eclipse? (0)

Anonymous Coward | more than 9 years ago | (#11473236)

From the review: "While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered."

Re:Eclipse? (1)

jlarkin (822276) | more than 9 years ago | (#11473252)

While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

Re:Eclipse? (1)

ralphdaugherty (225648) | more than 9 years ago | (#11473265)


From the review:

Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

rd

Re:Eclipse? (1)

leif.singer (622715) | more than 9 years ago | (#11473302)

See above:
"While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered."

Re:Eclipse? (1, Funny)

Anonymous Coward | more than 9 years ago | (#11473313)


From skimming through the review, I saw no mention of Eclipse. I wrote a large part of my Masters Thesis ...


Completed a Masters Thesis and you haven't even learned to accurately scan an article.


I wrote a large part of my Masters Thesis in Java ...


Well there's your problem. You should have used a word processor or something like TeX.

A Masters Thesis written in Java would be a strange thing indeed.

Re:Eclipse? (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#11473343)

Quote: "While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered."

what do i have questions about now.. (0)

Anonymous Coward | more than 9 years ago | (#11473179)

"Carl and Michael use a very conversational tone, just as though they were sitting with you and giving you their personal attention."

hm. mind reading book? and i was worried about a RFID chip in my passport...

The IDE Issue... (5, Insightful)

TheNarrator (200498) | more than 9 years ago | (#11473196)

The first two chapters cover enough command-line Linux to manage your files and directories, plus the Vi editor to create and edit your programs.

While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

Editing Java in vi is one of the biggest waste of time I can imagine. Eclipse and Intellij are far far more productive environments in ways that are too numerous to describe. I think a Java development on Linux book should really ignore vi and just be an Eclipse centered tour at this point with a little bit of documentation on bash usage , scripting, deployment issues and tuning the environment.

Re:The IDE Issue... (0, Flamebait)

ajm (9538) | more than 9 years ago | (#11473416)

I agree completely. For instance, any interview candidate who seriously suggested developing java in vi, or even in emacs, would have to work very, very hard to justify their position. If you're not using Eclipse or IntelliJ you're making things much, much harder for yourself, and you're much less productive than you could be.

Re:The IDE Issue... (0)

Anonymous Coward | more than 9 years ago | (#11473428)

I agree. I use vi. I type so much more than my friends using eclipse. I wish the books would explain how the hell to use the IDE. I've tried, and consistently resorted to using vi. It's pain, but it gets the job done. Every project I have tried to do in eclipse eventually gets taken over by vi, because I feel like I am fighting with the environment instead of getting the job done. I just need to get the job done, more keystrokes or not. Someone should really write a good book on how to use eclipse. I've seen it in action, and it definately makes the job easier once you can figure out how to use it to your advantage.

Re:The IDE Issue... (1)

javaxman (705658) | more than 9 years ago | (#11473449)

Editing Java in vi is one of the biggest waste of time I can imagine.

Yea.

/me puts on flame-resistant suit
You should use EMACS, of course !!!

Re:The IDE Issue... (1)

nodrogluap (165820) | more than 9 years ago | (#11473450)

XEmacs is my preferred editor for Java source files, which is probably the case for others who have a lineage of UNIX C/C++ programming and are used to its indentation scheme. If you combine XEmacs Java mode and Ant, it's pretty easy to manage even large (>1000 source file) projects. This also means that other people with just Ant can easily recompile your code.

Re:The IDE Issue... (3, Interesting)

pzarecta (775947) | more than 9 years ago | (#11473474)

I've been programming Java for years and I've always used vi. How much time have I wasted? I find IDEs a bigger waste of time. IMO, every second my right hand leaves the keyboard to reach for the mouse is time wasted. The only thing you get from a graphical IDE is the ability to step through the instructions. But there are other ways to compensate for that...

Re:The IDE Issue... (1)

madhippy (525384) | more than 9 years ago | (#11473595)

every second my right hand leaves the keyboard to reach for the mouse is time wasted

is 'keyboard' a euphemism?

Re:The IDE Issue... (4, Informative)

zipwow (1695) | more than 9 years ago | (#11473616)

The only thing you get from a graphical IDE is the ability to step through the instructions.


You *really* need to have a look at Eclipse. Debugging is nice, but it's not the whole crop.

What's at the top? It understands your code. The first thing you'll notice is the incremental compilation. You don't have to ctrl-z (or alt-tab or whatever) and run the compiler and wait. It compiles it as you're typing, and tells you where you've screwed up. That improves your efficiency right there.

Next on the list is lint-checking. This starts with needless imports, and continues with warnings for unused private methods, empty and undocumented catch blocks, and a host of things that are easily missed. It's a real eye-opener to load up your vi-edited code into Eclipse and see the cruft.

Last, and most powerful of all, is refactoring. I can, with that dreaded mouse, move a class between packages far faster than you can even if you're a regexp wizard. I can rename variables and methods without fear. In short, I can do everything I need in order to make sure that the codebase makes sense. No more comments like, "This method doesn't do this anymore, but it's too much hassle to change its name"

Knowing that classnames and packages aren't set in stone, you are much more free to get to writing the code, and change what you need to change, as you discover the need to change it.

If I had to guess, I'd guess that you tried JBuilder, didn't care for it, and haven't looked back. Eclipse is so radically different from that environment that its almost miscategorization to call it 'an IDE'.

-Zipwow

Re:The IDE Issue... (1)

ZeroZenith (83919) | more than 9 years ago | (#11473530)


Editing anything is IDEs is a bigest waste of time I can imagine. vi (vim) is the most productive editor by far. IDEs are nice when you starting out but when you need to produce vim + some plugins can't be beat.

ZZ

The Java trap (2, Interesting)

jmkrtyuio (560488) | more than 9 years ago | (#11473197)

Re:The Java trap (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#11473309)

RMS is a dirty communist who should go live in china

Re:The Java trap (0)

Anonymous Coward | more than 9 years ago | (#11473354)

"Free But Shackled": Sounds like the GPL. You're free to do whatever you wish with the code, but you are shackled to releasing the source if you release a binary.

Sounds pretty wide-ranging (4, Insightful)

Doctor Memory (6336) | more than 9 years ago | (#11473216)

Let's see, they discuss:
* Basic Linux (files, directories, vi)
* Basic Java (two different SDKs)
* Basic software development (requirements gathering, et.al.)
* Basic programming (CVS, build tools)
* Basic Web programming (servlets, presumably JSPs, no Struts/Spring/other frameworks)
* Database programming (Oracle AND PostgreSQL AND MySQL)
* And finally, Enterprise Software in the guise of EJBs (remember: friends don't let friends use Entity Beans!)

Granted it's 600 pages, but I'm wary about how much real detail they can pack into all those topics. I'm guessing this won't be much of a reference book, but rather a large collection of introductions to a variety of Java topics.

I still fail to see .. (-1, Troll)

sundru (709023) | more than 9 years ago | (#11473264)

However said i still hate JAVA, reminds me of a PS2 emulator for DOS , dont ask me why .I fail to see why C++ is not considered code and compile on any platform, seriously GCC is available on 20+ platforms and am sure all supported and required libraries are too. Yeah yeah binary compatibility rt ? Java is not actually binary either , has to be interpreted by the local parser . whats wrong with ./configure , make , make install ? and its atleast a zillion times fast than java

Re:I still fail to see .. (0)

Anonymous Coward | more than 9 years ago | (#11473320)

No one cares what you think about Java. Really.

Re:I still fail to see .. (1)

sundru (709023) | more than 9 years ago | (#11473544)

Mebbe, neither does anyone else for making your post about what i cared or did not care.

Re:I still fail to see .. (2, Funny)

furball (2853) | more than 9 years ago | (#11473340)

Your binary gets interpreted by the local parser too. It's called a CPU.

What's wrong with ./configure, make, and make install? Simple. Not everyone wants to distribute source code. Shocking, I know.

Re:I still fail to see .. (0, Redundant)

fimbulvetr (598306) | more than 9 years ago | (#11473465)

The CPU is a specialized parser. They usually do a good job, and they are fast.
Java's interpreter is slow, and is not optimized for speed, more like garbage collection or something else to help a programmer save 10% of their time.

When you code in java you trade speed of the app for the speed of the apps development.

If you don't want to distribute the source, use the BSD license.

Re:I still fail to see .. (1)

michaelggreer (612022) | more than 9 years ago | (#11473636)

Actually, Java byte code is not interpreted, and has not been for some time. You are running just-in-time compiled code. This means startup is slow, and memory is hogged, but don't claim it has to do with an interpreter.

Re:I still fail to see .. (2, Insightful)

pjt33 (739471) | more than 9 years ago | (#11473415)

It's easy to write non-portable Java code: just use hard-coded paths rooted at "c:\", or use a non-standard library (com.ms.* springs to mind). However, it's probably easier to write non-portable code in C++: just count the platform-checking #ifdefs in a typical program.

(Just as a side note, the weirdest porting problem I had was the result of someone who shall remain nameless assuming that all filesystems are case-sensitive. I unpacked the source tar onto an HFS drive and spent ages trying to work out why some externs were undefined. tree.c was being extracted over TREE.c. There are so many assumptions one can make without checking that they hold for every platform - and even if they do, a future platform may break them if they're not part of a standard to which you're working).

Re:I still fail to see .. (0)

Anonymous Coward | more than 9 years ago | (#11473548)

Wow, what a way to show your stupidity in a big forum!

1. Not all programs come with source code.
2. Not all computer users can ./configure, make and make install. They just want to run the program
3. Java is not a zillion times slower than C++. There are examples wheree Java is FASTER than C++ because of hotspot technology. Show me a study that shows Java is a "zillion" times slower than C++. You might have found one in 1996, but not now.

Wow... that's just troll-tastic! (2, Insightful)

MidKnight (19766) | more than 9 years ago | (#11473550)

I congratulate you on providing one of the best examples of trolling [wikipedia.org] I've seen in a while from a non-anonymous post. Let's see if you've covered the basics:

  • Don't even mention the article or review? CHECK.
  • Claim through a variety of tech buzzwords that something else is better than the subject matter? CHECK.
  • Offer no substantive proof other than "a zillion times"? CHECK.

Congratualations... you're a winner!

All sarcasm aside, if you don't like Java and don't develop software in Java, then a book whose title starts out Java Application Development is probably not for you. Moving right along....

Re:I still fail to see .. (1)

jbellis (142590) | more than 9 years ago | (#11473557)

If you seriously can't see the difference between having to run "make install" (oh, and good luck if autoconf didn't get things right) and "java -jar myapp.jar" you have never developed an application worth the name.

As a troll though, congrats I guess.

Re:I still fail to see .. (1)

hanshotfirst (851936) | more than 9 years ago | (#11473593)

The point of java is not compile anywhere, but run anywhere. When you compile c/c++ on one platform, you get a binary for that platform. When you compile a java class file on one platform it (in theory) will work on a comparable jvm on any platform without needing to recompile. Distribution just got easier.

Of course theory and practice are still 2 different beasts.

So...? What's the big deal? (1, Interesting)

Anonymous Coward | more than 9 years ago | (#11473286)

The book seems to cover all the major aspects of Java Development. Nice and fair and all. But what makes it so special for Linux users? All the tools mentioned are available for Windows or MacOs too. Either the book has the wrong name, or the review missed some important point?

Maybe the important point is "it does not matter which platform you use for Java programming, but by throwing in some buzzword into my booktitle, I can target more nerds and make some extra bucks". ;-)

linux powerbook (0)

Anonymous Coward | more than 9 years ago | (#11473321)

i like linux on my powerbook very much - this is a matter of personal likings, not something you can generally throw around just because YOU think something else..

well this multi-platform thing isn't real great as there's no real java-vm for linux/ppc -> IBM could at least have ported blackdown to linux/ppc.. well it doesn't matter much to me as i don't really run java apps, but probably others are affected

Commercial quality apps? (3, Insightful)

Profane MuthaFucka (574406) | more than 9 years ago | (#11473358)

I know what they mean by that, but really I'd like to have open source quality apps. That's the next level up.

Re:Commercial quality apps? (1)

nkh (750837) | more than 9 years ago | (#11473447)

You already have Azureus [sf.net] (the Bittorrent client) but it requires a lot of RAM to work properly...

Re:Commercial quality apps? (1)

fimbulvetr (598306) | more than 9 years ago | (#11473597)

I used Azureus for about 28 seconds, then it started (1.7Ghz PentiumM 1024MB running minimal X/Gentoo) and I uninstalled it.
Switched to apollon and never looked back.

Stick to FREE Java for your own protection (1, Troll)

Ars-Fartsica (166957) | more than 9 years ago | (#11473370)

I think a good baseline is to stick to that Java which can be compiled and run by the gcj* toolchain. This is for your own protection - in the event a vendor (gee guess who) ticks you off you will always have a free option.

While the gcj toolchain is not capable of supporting bleeding edge features, its likely you do not truly need these so the gcj baseline will also hold you to a sane subset of proven Java features.

Re:Stick to FREE Java for your own protection (1)

ldspartan (14035) | more than 9 years ago | (#11473531)

Is there a grid somewhere that indicates what's supported by the above toolchain? It seems like it'd be nice to develop to it, but I'd need to evaluate if it provided everything I anticipated needing before starting a project.

Thanks,
lds (a soon-to-be coorporate java programmer).

Re:Stick to FREE Java for your own protection (0)

Anonymous Coward | more than 9 years ago | (#11473592)

Then your program written on linux is stuck on Linux so 99% of the world can't run it.

That's really smart.

What if Eric S. Raymond ticks you off? He does that every time he opens his mouth.

Much better to use a JVM in my opinion.

success largely depends on expertise (2, Informative)

bwy (726112) | more than 9 years ago | (#11473414)

Write once, run anywhere becomes closer to the truth if the developer has experience with multiple platforms and knows what he is doing.

Our product that runs on Linux/Solaris/AIX/Win32 also runs wonderfully on OS/390, but this is only AFTER the code base was revisited to respect that fact that a 390 is EBCDIC. For example, ASCII config files that you ship along with your distro to the 390 will be read in the system default encoding if you're using plain Readers. You'd want to use streams with an explicit encoding type. Or, just use XML since the parsers internally understand UTF-8.

So, some may say "debug everywhere" but in some cases this isn't being completely fair, if you're placing the whole blame on the JVM.

Java -- the abusive relationship (5, Funny)

Eberlin (570874) | more than 9 years ago | (#11473427)

Well, here's another article just beckoning me back to try Java development once more. Here I am, on the rebound again, not knowing any better. Almost forgetting the tough time I had creating GUIs, coming to grips with the AWT then Swing. Going nutty putting multiple classes in a jar file and all that manifest destiny sweet talk that had me at "hello world" but not much further when I ventured out past the simple stuff.

Oh yes, it was sooo much better than VB if you can get past the quick way to make graphical interfaces. The multi-threading made creating a multiplatform port-scanning tool so much more pleasurable.

Then there was running the code on multiple platforms. The need to install the JRE, ensure you're pointing to the right CLASSPATH, and all those somewhat cumbersome things.

Yeah, after a while, I forget those experiences. I come crawling back, not wanting to be assimilated in .NET, but too afraid to jump head-on into a relationship with cpp.

I'm sure it's going to take time and effort, and I know I need to put more time in our relationship. Right now, though, I'm in the middle of a project with PHP so I'll get back to you when I can. Just remember, Java, that it's not you...it's me.

P.S. -- I think your father's a prick.

FreeBSD & Java (0)

Anonymous Coward | more than 9 years ago | (#11473517)

How well is Java supported under FreeBSD? I'm not quite familiar with FreeBSD, but a friend of mine keeps saying he has a lot of trouble with it while using FreeBSD. Especially getting Java to run in his browser. Is this true or is he just a dumb ass?

I wonder (1)

Skiron (735617) | more than 9 years ago | (#11473519)

...if this book was about any other language ever invented it would be 50 pages and 10 times quicker to read with 90% less calories burnt?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?