which compiler (/IDE)?

so Fermixx, you said before that you had downloaded NetBeans. Are you still trying it out? How do you think it compares to JBuilder?

Agreed.

I’ve been programming for well over 5 years. If you call that inexperienced I’d call you an idiot.

I love how everyone bandwaggons to jerk each other off about how harsh I am on someone who asked a stupid question. Please, don’t let me stop your sweaty session of love, keep going.

Okay, I will. I’m not on your “bandwagon” or anybody else’s.

LoL Oxymoron.

[quote=“CyanPrime,post:23,topic:34061”]
When you call people’s question stupid, they tend to ask less questions. Less communication is bad for team work.

I was surprised how similar they were. In fact, one looks like a ripoff of the other (dunno which was first). Both check for errors on the fly, have a “structure” panel with all your variables and functions, have a “project” panel with all your projects with packages and resourses and a long etcetera. I was supresed by the fact that they even use the same colours to highlight things !!

Oh and both take a loooooooooooot to load up (c2d 2.0ghz, 2gb ram)

Something i dont like in neatbeans is that the colours look uglier (like less bit depth) but thats a minor thing. i still need to get used to the interface and how it structures my project folder (it put various subfolders in it automatically) and need to find the console!

Believe it or not, i couldnt find a panel showing the console output. If you believe the console is not necessary since you are using a window, let me tell ya that i use it a lot for debugging (i.e. how the variables come in and how do they go out)

One final test i need to do is to see if the ide is making some kind of optimization. I need to export to jar my game in both ides and check the fps, but im a bit lazy with this (i’ve been playing Medieval 2 Total War a lot instead of coding :P)

I’ve been programming just short of thirty years but that doesn’t make me think that asking about tool preferences marks someone as stupid at all.

Why so aggressive dude?

Ctrl+4 or Window->Output->Output :wink:

[quote=“fermixx,post:27,topic:34061”]
Eclipse uses it’s own java compiler which I believe makes only some minor optimisations to your code. NetBeans uses javac which performs no optimizations. Jikes is the only real optimizing java compiler out there, and it’s no longer active. tbh I’d be really surprised if Eclipse produces noticeably faster code then Sun’s javac compiler.

The idea is that the JVM makes all optimizations when it runs in order to best optimize for the target machine. If you also start your game with -server you’ll find it should run faster, but it’ll take far longer to start up and I don’t know if it’s supported in the standard Java run times.

I’ve been programming for over 12 years, and I’m plenty inexperienced. Once you’re working with brilliant veteran programmers, you’ll be surprised how inexperienced you feel.

I heard something about HotSpot which makes intense optimization along with the JIT compiler (or something like that) which makes java to run at competitive speeds (compared to c++ for example)

So all that happens when the user plays my game but not when i compile it on my computer?

I think it should take some time to load then, coz it has to check some times the entire code before starting the app

so am i tellin pure bullshit or its something like that?

the application usually starts interpreted, while it is executing the vm collects information and starts earlier or later compiling hot sections of your application in a background thread. This is called mixed mode execution.

[quote=“fermixx,post:32,topic:34061”]
Yes. When you compile your code is only compiled to an intermediate bytecode, Java bytecode, which represents your program. When you run it the bytecode is first verified to ensure the app is correct and stable. For example that there are no branches that jump outside of a method. This ensures that if your app does crash, then it does so in a safe and managed way. It will interpret the bytecode when it is first run, but when the same code is run multiple times it is compiled behind the scenes to native code. Often when you do ‘run this code 1 million times’ types of benchmarks you’ll find the first run is far worse then all others, I guess this is one reason why.

I’ve heard stories of HotSpot gathering information at run-time and using this to recompile sections later. For example to remove sections of the code that are never run. The fact that it is natively compiled with this extra information gives the theory that Java can outperform C, and does in certain benchmarks. Although in practice I don’t find this to be true.

Java has always been known as having very slow start up time, but this has improved substantially over the last few years. However still the vast majority of interpreters and the apps built by various compilers start up in far less time. However I believe the main reason is because the Java API is compressed (and so the parts you use needs to be decompressed on each run), not because of the stuff above.

[quote=“fermixx,post:32,topic:34061”]
Run a Java applet or a Java game on your desktop. Do you think the start up time is slow? Bear in mind that once you start adding sound effects, music, images, models and data files to your game it’s own internal start up time will typically always be far slower then Java’s.

Not that slow, but i was thinking what would happen with a way heavier app, like call of juarez 2 for example.

Or to avoid loading miscellaneous resources, think about math lab doing tons and tons of things in the cpu rathen in the hard drive. My main question was why to compile on the fly (while the app is running) instead of before it starts stressing the cpu. is this because of the famous “write once, run anywhere” policy?

[quote=“fermixx,post:35,topic:34061”]
Essentially. Plus even if you allowed it pre-compile, pre-compile for what? If you pre-compile on my machine then it might not take full advantage of yours or may not work at all.

The biggest problem is disk seek time, JVM has to load many classes stored at different positions on disk, and disks are really slow when it comes to seek time. The classes are uncompressed (rt.jar).

As soon as SSD’s are mainstream (soon now) those startup times are history. NET supposedly has a cache for verified classes, but i’m not sure how it works.

I like where you tell me not to insult anyone than insult me a few lines down.

Fair enough, I edited my text. I didn’t mean to be insulting, but I understand my wording was not particularly nice. Apologies. What I meant by that was that comparing yourself to class mates (in high school or college) is typically a futile exercise, because most of them (in my experience) are not very driven and not very good at programming. Compared to my peers I was a know-it-all, but once I actually entered the work force I was immediately humbled by the massive amount my coworkers knew.