Page 1 of 1

Java IDE

Posted: Tue Oct 17, 2006 5:33 pm
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

Posted: Tue Oct 17, 2006 5:52 pm
by Weirdan
have you tried eclipse?

Posted: Tue Oct 17, 2006 6:37 pm
by Chris Corbyn
Weirdan wrote:have you tried eclipse?
Nope but I shall download it :)

Posted: Wed Oct 18, 2006 12:51 am
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).

Posted: Wed Oct 18, 2006 4:41 am
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);
}

Posted: Wed Oct 18, 2006 5:27 am
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

Re: Java IDE

Posted: Wed Oct 18, 2006 8:01 am
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.

Posted: Wed Oct 18, 2006 8:32 am
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

Posted: Wed Oct 18, 2006 9:52 am
by Jenk
I smell and observer in there (amongst the usual suspects) :P

That sounds fun.. may have a go myself :)

Posted: Wed Oct 18, 2006 11:43 am
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.

Posted: Fri Oct 20, 2006 2:34 am
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.