General discussion


A few quick Java questions

By ObiWayneKenobi ·
I'm debating if I should learn Java, since (a) I find the syntax a lot easier to understand than C++ (no pointers or -> or :: and such; I somewhat understand those but C++ still reads very cryptic to me), (b) I know C# already so Java shouldn't be that difficult, and (c) Netbeans 5.0 and Matisse is the best GUI builder I have ever seen [even better than VS.NET 2005!). However, a few quick questions:

1) Any good books to learn? I've skimmed through the online tutorials at Sun, but they leave a bit to be desired.. I prefer books that demonstrate the basics, but also show how it can be applied to the real world by having a case study example or something, so that when you finish the book you know the language *and* have a working sample to demonstrate.

2) Maybe I'm ignorant and have been living under a rock (or maybe I just never really paid Java any mind until recently...) but since Java can be written as Applets that display in a web browser, Java should be (or is it already??) the greatest language ever for creating web applications, since you can make it function like a desktop application with dialog boxes and tab controls and whatnot without worrying about the web part; i.e. no HTML mashup with server-side functionality like ASP.NET; I can have all the features of a GUI displayed to anyone, anywhere. Maybe that *is* what Java does and I've just been unaware of it until now... it just seems perfect for developing, say, web-based CRM or ERP solutions since you avoid the hassle of laying out a page in HTML first or having to use Javascript or AJAX to simulate app functionality.. maybe there's something I'm missing.

3) I understand that Java's main appeal now is in web, and not so much Desktop applications.. in fact I know of hardly any business software that's written in Java.. I'm not abandoning my C++ studies, because it's still used, but career-wise is it a good move to even *learn* Java if I plan to do more software development than web? Or is Java's future pretty much relegated to JSP and EJB (which I'm not even sure really what it IS..)and if I learn it all I should learn it for JSP technology only?

4) Brings up a point from #3.. what exactly *is* the difference between J2SE (or JSE I guess its called now; I think they dropped the 2?) and the EE version? From what I've read, the EE seems more like a web service, with an n-tier architecture and using services to connect to desktop or web clients. Maybe I'm just not familiar with the Java terminology, so if someone could explain it as "It's like [blah] in .NET" I could probably get it easier. If that's too much to ask, any links to sites that explain it better would be appreciated, as well :)

Thanks for bearing along with the relatively n00b-like Java questions.. as I said I'm only now debating learning it since I think it might be useful in the future, but want to see if my thinking is right or not.

Thanks again,

This conversation is currently closed to new comments.

15 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Some Java answers

I'm not a Java expert by any means, but I do have a few years experience with J2EE and Java development.

1) First you'll want to learn the Java language. I learned from the book "Ivor Horton's Beginning Java 2". Takes you from "hello world" to a fully functional graphics app. Next you may want to learn JSP, then J2EE.

2) Java's big strength is its "portability". You can write an application, a client-side applet, or server-side code such as JSP and beans...and all that code will port more easily to different OS and databases. It is very suited to web applications, you can create a pretty "rich" client without being tied to a particular platform.

3) It depends on what you are trying to accomplish. While you could certainly write a fully functional client application in straight Java, it's greatest strength is in its n-tier development...using J2EE.

4) Basically J2SE includes components for client-side PC application development. It includes the Java Runtime engine (JRE - required to run a Java application) as well as the SDK (which includes the classes you need to build apps). J2EE includes everything in J2SE but it also includes components to build larger scale n-tier applications. These components include an application server -- which runs Servlets and Beans. JSP is an example of a servlet. The best way to think about a Bean (JavaBean or EnterpriseJavaBean) is that it is a Java class that runs on a server whose methods can be accessed by multiple clients.
A good book on J2EE is "Beginning J2EE1.4:From Novice to Professional".

Collapse -

Reference Java Tutorials

by aksbh In reply to Some Java answers
select document link
some useful java reference tutorials to start with
akshaya bhatia

Collapse -

Quick Java

by f.montero In reply to A few quick Java question ...

1. You might try Java programming for C/C++ developers, a 44-page pdf file from

2. They also have an interesting and practical tutorial.

Yours aye, fjm

Collapse -

Ugh, applets.

by apotheon In reply to A few quick Java question ...

Applets sound great in theory, but they're pretty awful in practice. They're far too resource-hungry for what they do, they're not nearly as platform-independent as one would think, and a lot of people simply won't be able to use the things if you include them in your web development -- many don't have a Java plugin installed, and even those who do may not have the right one for your applet. Additionally, applets can be a security concern, because you're talking about asking someone to run foreign code on their computers. Markup rendering and some pared-down Javascript functionality (such as with AJAX) is far more easily used without worrying about system security being compromised.

Truthfully, for browser-embedded applet functionality, Flash is better than Java (and I don't like Flash, either).

Collapse -


by ObiWayneKenobi In reply to Ugh, applets.

Wouldn't that be a non-issue if you were using the Applet as a rich web app in a corporate environment? That's the main reason I am asking about it.. with web-based applications being all the rave lately for CRM/ERP/whatever, wouldn't it be better to be able to write a full-featured applet to do the work instead of relying on a hackjob mix of HTML, Javascript and the server-side language du jour? I can do web development just fine, but I get frustrated with having to do a mash-up to get the functionality I want (such as using AJAX) when it's so much easlier to develop a desktop app (and gives the developer more control). Again, maybe I am missing something when it comes to Applets.

Collapse -

applets etc.

by borshee In reply to But...

Well, I've been using java for just over 2 years now and there is still about 70% still to discover.
Basically applets run in a browser environment only and run in a 'sandbox' environment for security reasons and have no access to the system of the PC they are running on or you could just imagine the possibilities open for hackers.
If you want a desktop app, just build a desktop app and run it with the java re and it will run like any other app programmed in C++, Visual basic etc., just without the .exe extension, so it runs on any system with the JRE on it. It is possible to build just about any desktop app out there as far as I know. You can also build in server and database connectivity to any application.
I am unfortunately not too clued up on J2EE but that's the next step...
If you want a good book to get into the basics of Java and more, read Bruce Eckle's 'Thinking in Java'. I found this to be a really comprehensive book on the language and I think this guy knows Java backwards.
I personally think Java is great and better than the others out there as it's pretty easy to get up and running and the portability is better than any other language that I know of!
Good Luck.

Collapse -

Some opinions

by vionescu In reply to A few quick Java question ...

For learning Java try "Head First Java" or "Thinking in Java". You will need also an IDE to program in. Try Eclipse for pure Java ( It is great, the refactory kicks *** (Visual Studio's *** for sure). Later, for J2ee, you will be in the position to choose your favourite one. Applets are kind of dead now. The new toy is Ajax. For desktop applications for windows, go for C#. For enterprise web applications, go for java. For small to medium web applications you'll be much more productive with php. With java/j2ee you will configure tons of xml, you will use tons of opensource libraries (and each of them usually comes with something to configure), it will be kind of frustrating for a while, but you will find the whole process intlectually rewarding. Learn how to use ant to build or manage configurations, it's crucial. It's very important to focus on object oriented and patterns stuff, not on new toys and hype.

Collapse -

Stick with .NET

by AllAroundIT In reply to A few quick Java question ...

Write once run anywhere is touted as one of the primary benefits of java, however doesn't hold true since there is a dependance on libraries. And if you've developed java apps, almost anyone will tell you that you will run into issues.

I'd stick with .NET if I were you unless you want to be in the open source movement and enjoy that community. Recent surveys have suggested .NET in the enterprise has outpaced java (66% to 46%). The market is starving for .net resources and it's ranked as the #1 skillset.

I'm just saying that this is where the demand is these days. (Not saying there is no demand for java - but where I work we have a more difficult time finding .net resources, primarily because they get hired out from under us.)

I'm also suggesting that both are good skillsets, but I'm not sure why you are looking to change camps. That's the fundamental question - what are you looking to accomplish.

There are many opportunities out there for either skillset. You'll likely have a more difficult time trying to get a java dev job unless you take a more junior level position(which I'm assuming you are more of a senior level resource).

Collapse -

Jerel Saying Go Java

by JRL21 In reply to A few quick Java question ...

Since you can show off your java applications over the internet it's perfect a developer like you who may not be quite ready to leave all the web development behind. And yes having a C++ background definately helps a lot. I definately benefited from my C background alone, as a beginning programmer. And it looks like Java's going to be doing a whole lot more than C++. So I urge you to come along and ride the exciting Java wave.

Collapse -

Its a good idea...

by jzajac2 In reply to A few quick Java question ...

I learned Java from scratch with minimal programming knowledge. The most useful resource I found was called: Ground-Up Java by Philip Heller. It comes with some handy animated illustrations and teaches, well, from the ground up. Check it out at Borders or whatever, its sort of pricy.

Back to Web Development Forum
15 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums