Static import in Java

I was just browsing around the web and came upon the topic of static imports in Java:


What it allows you to do is basically import a class and access it’s static methods and fields as if they were in your class. I think this would make the math code in jME alot clearer, for example:


That's SO last year.  :P  You should mention something cool like system tray support in 1.6. :slight_smile:

I agree this could be beneficial, but the refactoring of jME to 1.5 compliance was a relatively recent decision and there's still quite a bit of jME that is not making good utilization of all the great features yet.  It will eventually though. :slight_smile:

darkfrog said:

You should mention something cool like system tray support in 1.6. :)

That's SO last year.  :P SWT has system tray support since, like, forever. :)

SWT?  That's ghetto dude!  Swing is where it's at!  JDIC has had support for system tray support for a while, but integration in the JRE is just awesome. :slight_smile:

system tray support? has anyone ever found the system tray cool since windows 3.1?

how about the scripting api and compiler api in 1.6! yay!

System tray icon support is actually quite nice if you write utility applications that should be left running all the time or services.

As for scripting support, it is indeed cool, but I haven't come up with any game ideas that can make good use of it yet. :-p  Besides, why would I want to script when I can Java? :wink:

I think scripting would be pretty sweet!!

I've definetly been thinking of designing a weapons system for a game where the users are able to create programmable missle payload, either through a simple editor, or even through Groovy scripts in java.

Scriptability allows alot of customizable things to be defined outside of game logic, but still provides the programmability without the overhead of compiling the whole application to make a change. I think its probably more useful in an environment where you have game developers developing a core system and then many other designers, artists, or not so savvy programmers who are given access to a scriptable simpler interface to the game engine.

Didn't say it wasn't beneficial…I definitely see advantages with it, but I just haven't come up with any game ideas that make use of it.  :stuck_out_tongue: