Sign in to follow this  

[java] What do I need ?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, So far I've installed the Sun J2SE 1.4.2 SDK and actually used DJ Decompiler to decompile some stuff and re-compile it. Well now I want to get involved with some serious Java server-side stuff. I know C++ so I shouldn't have many problems. But what do I need ? The new JDK 5.0 ? Or maybe stick with 1.4.2 ? What about NetBeans, how's that for the IDE ? Basically I want to make stuff to run on the server, like a chat room that I can interface with, say, a Flash client. Things like that. Any guidence would be appreciated. Take care, Cyrus

Share this post


Link to post
Share on other sites
I would suggest that you stick with JDK1.4.x for now. The new 1.5 breaks a fair amount of old code, so I'd wait until it gets updated :)
Also, I would personally suggest that you don't use any of the available IDE's for now....these hide a lot of the basics like classpath stuff and creating JAR files and manifests. Point being, that you may find yourself in trouble later on because you haven't got to grips with the basics (especially classpath issues). A simple text editor should do you for now.
That said, eventually I'd recommend Eclipse over NetBeans....and I used to be a NetBeans fanatic. Eclipse rocks really quite hard indeed.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don't go anywhere near java 1.5 / 5. It screws up basic java syntax (the moron / ****head who authorized generics in java 5 should be shot - arrays no longer work!!!).

For server-side work, you MUST use 1.4.x or above, since the libs for doing almost all networking didn't arrive until 1.4.0. Make sure you have the latest version - 1.4.2_06 or later - since there were many bugs that weren't fixed until the very latest versions.

1.5.x introduces some extra networking that would be nice to have, BUT the critically important stuff that 1.4.x is missing is officially delayed until java 6 - so don't bother with 5. Also, some features (like faster JVM loading) from java 5 are officially disabled if you use java in server mode, which you typically want to do for a server (not because the name suggests it only works on servers, but because it's the high-performance mode for long-running applications, which your server will be).

PS: yes, I am very bitter about the pile of shit that is java 5.

redmilamber

Share this post


Link to post
Share on other sites
I would stick with v1.4.2 for now. The Java Tutorial has not been updated yet with v1.5 language features. Also most IDEs probably have not been updated either. As RageMatrix suggested, start without using an IDE until you are comfortable with how the compiler works. Then I would suggest Eclipse(my biased opinion :) )

When you do The Java Tutorial, I would also sugest that you do it from start to finish. Then pick up the J2EE tutorial. J2EE is where the server side stuff is. But you need to know your core Java before startng that.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by capn_midnight
weird, all my code works in Java 5, what's wrong with you guys?


If you work on a team that agress "never to use any java 5 features" then you're safe.

But...what's the point in using java 5 if you refuse to use any java 5 features?

Unfortuinately, there's no way to throw compiler errors when some bastard you're working with decides to use generics (which break arrays, amongst other things), there's no:

javac -refuseToUseCodeThatUsesShittyGenerics *.java

that would throw compiler errors if any of your 3rd party libs or linked libs tried using generics.

Share this post


Link to post
Share on other sites

wow, redmilamber, you're really angry XD
You helped me a lot in many posts I made, so I will take what you said in consideration. But, I've been using the new JDK for a while and got no big problems, really.

To answer Endemoniada's question (are you from Brazil?), take a look at java NIO (java new I/O), which was introduced in JDK 1.4.2, and help you do asynchronous networking without a great mess of native code. Unfortunately, it lacks good documentation, and you may suffer for a while.

I use NetBeans IDE 4.0, and I quite like it, but RageMatrix is right... If you're new to Java, try your hands at JCreator first. The Java Tutorial is a good place to start.

Forgive my awful english..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Anonymous Poster
Quote:
Original post by capn_midnight
weird, all my code works in Java 5, what's wrong with you guys?


If you work on a team that agress "never to use any java 5 features" then you're safe.

But...what's the point in using java 5 if you refuse to use any java 5 features?

Unfortuinately, there's no way to throw compiler errors when some bastard you're working with decides to use generics (which break arrays, amongst other things), there's no:

javac -refuseToUseCodeThatUsesShittyGenerics *.java

that would throw compiler errors if any of your 3rd party libs or linked libs tried using generics.


In what way do Generics break arrays? I've been using Java 1.5 for the last six months at work and I've had no problems with any of the new language features (and we have used most of them). Can you provide a code sample that doesn't work properly?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Anonymous Poster
Unfortuinately, there's no way to throw compiler errors when some bastard you're working with decides to use generics (which break arrays, amongst other things), there's no:

javac -refuseToUseCodeThatUsesShittyGenerics *.java

that would throw compiler errors if any of your 3rd party libs or linked libs tried using generics.

Can't you just use the "-source 1.4" flag with the compiler? Although personally I'm staying firmly with 1.4 for the forseeable future.

OT.

Share this post


Link to post
Share on other sites
Hi guys,

Thanks a lot for all that info.

Alright, I just formatted my hard drive this weekend and have a nice clean installation of Win XP Pro (SP2) so I want to make sure I install the right thing.

At the Java site it says that to compile servlets I need the 'JavaServer Web Development Kit'. I used to download just the J2SE 1.4.2 so should I download the J2EE SDK now instead ?

The J2EE 1.4 has the 'Sun Java System Application Server Platform' in it, is that the development kit I need to compile servlets or is that an actual server (like IIS) ?

Thanks again guys, I really appreciate it.

PS - no, I'm not from Brazil, I'm from New York :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Anonymous Poster
Quote:
Original post by Anonymous Poster
Unfortuinately, there's no way to throw compiler errors when some bastard you're working with decides to use generics (which break arrays, amongst other things), there's no:

javac -refuseToUseCodeThatUsesShittyGenerics *.java

that would throw compiler errors if any of your 3rd party libs or linked libs tried using generics.

Can't you just use the "-source 1.4" flag with the compiler? Although personally I'm staying firmly with 1.4 for the forseeable future.

OT.


That will also disable all the other modifications from java 5, some of which are *genuinely useful and an improvement to the java language* (unlike generics, which is an ugly hack to make Sun's Collections API look a little less shit, and in so-doing make Sun look a little less incompetent).

Share this post


Link to post
Share on other sites
Quote:
Original post by Endemoniada

Alright, I just formatted my hard drive this weekend and have a nice clean installation of Win XP Pro (SP2) so I want to make sure I install the right thing.

There is no such thing.
Quote:

At the Java site it says that to compile servlets I need the 'JavaServer Web Development Kit'. I used to download just the J2SE 1.4.2 so should I download the J2EE SDK now instead ?


J2EE is extension of J2SE so you need to have both. Don't forget to download documantation.

Share this post


Link to post
Share on other sites
I thought you were brazillian because of your nick =D It's a common word around here.

As Raghar said, you will need both the J2SE and the J2EE. The application server is where you deploy your servlets and beans applications.

Good thing to do is to read the java tutorial, also the version for J2EE. That will teach you how to deploy applications and all stuff related to the server 'manteinance'. Try that before using an IDE that does everything for you - like Netbeans.

Cya
Son of Cain

[Edited because of typing mistakes. Forgive my english, I always ask for that]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
/me goes rummaging through closet, looking for his Troll-slaying sword (+2 against all giant-sized humanoids)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Notepad disadvantages: no bracer highlighting, no auto indent, no colors.
It's great for writting books however.

If by command line means batch file then double click, it's comparable with right click and choice from menu.

And yes do not what was it...

Something about trolling.

Share this post


Link to post
Share on other sites
To those complaining about Java 5.0 in relation to generics/arrays:
Please post a link or provide a real explanation of the issue. Without any kind of substantiation, your claims mean nothing. I've been using generics with arrays in my code together since they were released, and I have experienced nothing but joy.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this