Java IDE

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Java IDE

Post by Chris Corbyn »

If I'm learning java purely out of interest is something like BlueJ (under Linux not that it matters) going to help or have an adverse effect? Is BlueJ actually the best IDE to learn with?

I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it :P
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

have you tried eclipse?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Weirdan wrote:have you tried eclipse?
Nope but I shall download it :)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I find sun java studio to be a nice ide too (in contrast with eclipse it has much more support for ejb3, annotations, uml reverse engineering, ... by default included).
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

arrays don't resize automatically as with php.. And you have to initialize them first...

Code: Select all

public Zoo(String name) {
  this.name = name;
  // reserve space for 10 animals
  this.animals = new Animal[10];
}
But since your using the array as a colelction that can grow... I'd use a Vector:

Code: Select all

private Vector animals;

public Zoo(String name) {
this.name = name;
this.animals = new Vector();
}
Or if you're writing java5 use a type-safe collection:

Code: Select all

private List<Animal> animals;

public Zoo(String name) {
this.name = name;
this.animals = new List<Animal>();
}
And in both situations:

Code: Select all

public void Add(Animal animal) {
  this.animals.add(animal);
}
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

netBeans isn't bad, either. Though I prefer Eclipse as I use it for php too. (eclipse utterly rocks now I'm using Linux.. it was slow on Windows for me.)

Real time updating for code hints, realtime use of Javadoc/phpDoc' comments.. it's just so beautiful it brings a tear to my eye*..












*may not be true
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Java IDE

Post by jayshields »

d11wtq wrote:If I'm learning java purely out of interest is something like BlueJ (under Linux not that it matters) going to help or have an adverse effect? Is BlueJ actually the best IDE to learn with?

I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it :P
I just started with Java for university and we're made to use BlueJ. Seems OK to me but I haven't tried anything else.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thanks ~timvw. Makes perfect sense. I started using ArrayList before I read your reply and it seems to work a peach :)

I'm basically writing a comical app as practise for some design patterns in Java.

It's a Zoo and it contains animals. The animals require the correct temperature range to live and they also eat other animals or plants. They need food to live. The idea is that the user can add animals to the Zoo, change the temperature ect and things will start to either die or eat each other based upon what order things happen in. It's quite fun :P
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

I smell and observer in there (amongst the usual suspects) :P

That sounds fun.. may have a go myself :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Jenk wrote:I smell and observer in there (amongst the usual suspects) :P

That sounds fun.. may have a go myself :)
Indeed. Kinda lends itself well to OO.
alvinphp
Forum Contributor
Posts: 380
Joined: Wed Sep 21, 2005 11:47 am

Post by alvinphp »

I prefer eclipse, as another person said you can code in other languages like php. Though Eclipse is geared mostly towards Java development.
Post Reply