[java] Java Graphical Potential

Started by
5 comments, last by Horizon 18 years, 7 months ago
I am having to learn Java via Linux Box so as of now I am limited to console works. I am curious if there is any way I can open up a window and begin working out graphics. Is there per-say a "DirectX" for Java for Linux? Or a common Graphical Library which can be used to get at least 2D graphics going in a "Fullscreen" environment? Any tutorials would be nice. Thanks -Halsafar
Advertisement
Have a look at Java2D.
If your looking for a good tutorial, here is the one that I learned off of. Java-Invaders

It takes you from making a window to making a full-fledged space invaders clone.

Enjoy!
BRING BACK THE BLACK (or at least something darker)
If you have to work in a linux console environment there probably isn't any way you could use graphics. On linux you generally need to be running X-windows for that. It might be that there are some ways to run java graphically through a vesafb driver but I really doubt it.
Quote:Original post by Horizon
If you have to work in a linux console environment there probably isn't any way you could use graphics. On linux you generally need to be running X-windows for that. It might be that there are some ways to run java graphically through a vesafb driver but I really doubt it.


I doubt it, AWT/Swing specifically cries about the lack of an X server if you try to run GUI apps from a terminal without an X server. I doubt they ever considered such an option at Sun (because I've certainly ran into too many bugs in the API to have any confidence in their developers).

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

Quote:Original post by Horizon
If you have to work in a linux console environment there probably isn't any way you could use graphics. On linux you generally need to be running X-windows for that. It might be that there are some ways to run java graphically through a vesafb driver but I really doubt it.

You may be able to use the SDL binding for Java together with the svgalib version of SDL.
I haven't tried though and that SDL binding may rely on other libraries too if you're unlucky..

edit: At least the original version claims to work on console-only systems..
Note, that for the above to work you will need direct console access. If you are also using something like a terminal (telnet, ssh, etc) this will not work.

This topic is closed to new replies.

Advertisement