Welcome to Gaia! ::


Hello there! After much procrastination, I finally managed to force myself to start learning Java. I figured I might need it at some point down the road. Well actually, I'm just getting ready in case the Minecraft API gets implemented by @jeb.

So yeah, since NetBeans seems to be the one preferred on most articles I read online, I'm faced with a problem. I don't know which one to pick. Which one of the following (below) is the one I should get? How does each one differ from the other?

User Image - Blocked by "Display Image" Settings. Click to show.

I can't decide which [ Download ] button to click. I know that I can always go the "All" route but I'd still want to know their differences. sweatdrop
Their differences are right there in front of you: The C++ edition supports only C++. The PHP edition supports only PHP. The Java EE package supports Java on both desktop and web environments. The Java SE package only supports desktop environments. (And All supports mobile apps.)

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Unless you're following a specific book or tutorial which explicitly uses Netbeans in all of the examples, I would avoid using it at all. You don't need an IDE to write software in Java, you can do it with a simple text editor and call the compiler on the command line. It's often a lot easier than fighting with the IDE to make it do what you want.
psychic stalker
Their differences are right there in front of you: The C++ edition supports only C++. The PHP edition supports only PHP. The Java EE package supports Java on both desktop and web environments. The Java SE package only supports desktop environments. (And All supports mobile apps.)

Hmm, thank you for that. I guess I need to download EE then. I initially downloaded and installed SE after posting this thread. sweatdrop

Sitwon
Unless you're following a specific book or tutorial which explicitly uses Netbeans in all of the examples, I would avoid using it at all. You don't need an IDE to write software in Java, you can do it with a simple text editor and call the compiler on the command line. It's often a lot easier than fighting with the IDE to make it do what you want.

I know that I can write for Java using Coda or Notepad++ or any other text editor but most of those don't have code suggestions. One that I find helpful when entering a new programming language since that way, I can be quite certain that I'm not using typos or the wrong term. As for compiling via the command line, I think I haven't done anything like that before, it seems pretty foreign since I've just been working with PHP that requires no compiling on my part. xp

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Shedo Chung-Hee Surashu
psychic stalker
Their differences are right there in front of you: The C++ edition supports only C++. The PHP edition supports only PHP. The Java EE package supports Java on both desktop and web environments. The Java SE package only supports desktop environments. (And All supports mobile apps.)

Hmm, thank you for that. I guess I need to download EE then. I initially downloaded and installed SE after posting this thread. sweatdrop
Actually, in the vast majority of cases SE is the one you want. EE is not very useful outside for very large business projects.

Shedo Chung-Hee Surashu
Sitwon
Unless you're following a specific book or tutorial which explicitly uses Netbeans in all of the examples, I would avoid using it at all. You don't need an IDE to write software in Java, you can do it with a simple text editor and call the compiler on the command line. It's often a lot easier than fighting with the IDE to make it do what you want.

I know that I can write for Java using Coda or Notepad++ or any other text editor but most of those don't have code suggestions. One that I find helpful when entering a new programming language since that way, I can be quite certain that I'm not using typos or the wrong term. As for compiling via the command line, I think I haven't done anything like that before, it seems pretty foreign since I've just been working with PHP that requires no compiling on my part. xp
First of all, those suggestions may seem nice, but when you're learning the language they're just a crutch that you're better off with out. It's like trying to learn BMX on a bike that still has training wheels.

Second, compiling is not hard and it's actually something that you'll want to become intimately familiar with. The best way to master Java is to work as close to the bare metal as you can. That means syntax highlighting, but no code suggestions; and running the compiler manually or with hand-written scripts so you understand what it's doing.
Sitwon
First of all, those suggestions may seem nice, but when you're learning the language they're just a crutch that you're better off with out. It's like trying to learn BMX on a bike that still has training wheels.

Second, compiling is not hard and it's actually something that you'll want to become intimately familiar with. The best way to master Java is to work as close to the bare metal as you can. That means syntax highlighting, but no code suggestions; and running the compiler manually or with hand-written scripts so you understand what it's doing.


I see, so I need to get back to using Coda then?
Okay, I have completely deleted NetBeans from my system. razz

But now I'm a bit confused at the Java download page, is Mac OS X not natively supported by Java? On this page http://jdk7.java.net/macportpreview/, it's talking about creating a JavaVirtualMachine. Unless I'm mistaken, a virtual machine is used to emulate something right? So does that mean Java isn't natively supported? On the downloads page, I can only see one for Windows, Solaris and Linux.. That mac page was separate from the rest. I thought Java was originally designed to be cross-platform?
Java is itself a virtual machine. That's how you can write a Java program and have it run "unmodified" on any computer. The virtual machine runs the program. That's simply how it works.

So, no, Java isn't "natively supported" anywhere. But the virtual machine... That is natively supported everywhere.

And NetBeans is a Java application, so it runs within that same virtual machine.

Edit: I think that unless you're on Lion, it should be already installed?
If not, I'd suggest you install the Java 6 JDK, not Java 7. There are some compatibility problems with 1.7.
Shedo Chung-Hee Surashu
So does that mean Java isn't natively supported? On the downloads page, I can only see one for Windows, Solaris and Linux.. That mac page was separate from the rest. I thought Java was originally designed to be cross-platform?
What you see there is a Developers Preview (in other words a beta, or, if you're really lucky, an alpha) of the JDK7 for OSX. Apparently they're still working on it.
psychic stalker
Java is itself a virtual machine. That's how you can write a Java program and have it run "unmodified" on any computer. The virtual machine runs the program. That's simply how it works.

So, no, Java isn't "natively supported" anywhere. But the virtual machine... That is natively supported everywhere.

And NetBeans is a Java application, so it runs within that same virtual machine.

Edit: I think that unless you're on Lion, it should be already installed?
If not, I'd suggest you install the Java 6 JDK, not Java 7. There are some compatibility problems with 1.7.


Ahh, so that was a misconception on my part. I apologize for that. As for Java 6 JDK, they say it already comes pre-installed with Snow Leopard which is what I'm using. So I guess I'm all set then... xD

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Shedo Chung-Hee Surashu
psychic stalker
Java is itself a virtual machine. That's how you can write a Java program and have it run "unmodified" on any computer. The virtual machine runs the program. That's simply how it works.

So, no, Java isn't "natively supported" anywhere. But the virtual machine... That is natively supported everywhere.

And NetBeans is a Java application, so it runs within that same virtual machine.

Edit: I think that unless you're on Lion, it should be already installed?
If not, I'd suggest you install the Java 6 JDK, not Java 7. There are some compatibility problems with 1.7.


Ahh, so that was a misconception on my part. I apologize for that. As for Java 6 JDK, they say it already comes pre-installed with Snow Leopard which is what I'm using. So I guess I'm all set then... xD
Yep, you can test this by opening up a terminal and running 'java -version' and 'javac -version' to make sure you have Java 6 (1.6) installed.
Thanks a ton for the help guys. I'm now set. biggrin I just made my first hello world app. cool I'll go back under my rock now. 3nodding
Shedo Chung-Hee Surashu
Thanks a ton for the help guys. I'm now set. biggrin I just made my first hello world app. cool I'll go back under my rock now. 3nodding
Don't you stay there. smile

Feel free to ask questions in C&T whenever you need help.
psychic stalker
Shedo Chung-Hee Surashu
Thanks a ton for the help guys. I'm now set. biggrin I just made my first hello world app. cool I'll go back under my rock now. 3nodding
Don't you stay there. smile

Feel free to ask questions in C&T whenever you need help.


Of course. smile I just want to ponder on the coding conventions. Will definitely post back if I came across a problem. smile

Hallowed Lunatic

13,050 Points
  • Dressed Up 200
  • Forum Regular 100
  • Elocutionist 200
I can name some very good conventions that will apply to all programming languages.

1. Name your variables something sensible. Nothing is worse then revisiting projects and wonder what the ******** BLAHBLAH was meant to do.

2. Pay attention to the reserved words in your language to avoid accidentally naming variables as them and then wondering why your program went wrong. Reserved words are words reserved by the language for specific purposes. For example, If and Else are reserved for selection loops

3. Plan. Plan. Plan. Plan what your program will do and how it will do it. This includes any "modules" or APIs that you might be using or referring to. After you've planned out what the program will do, write it down in what is known as structured language. Sample given below for a dice roller.

Structured language sample

Create variable "rollDice"
Create variable called "modNumber"
Create a variable called "total"
Bring up a message asking the user what dice they want to roll and then refer to the rolling module to get it and bring it back here.
Bring up a message asking the user what they wish to add to the result of the rolls and put that into the variable "modNumber"
total = rollDice + modNumber
Bring up a message saying "You rolled (total) on this roll"


I would say more but I have to go get in the shower and plan Saturday's concert events as the driver.

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum