Only language I can't even get HelloWorld to work
so what I'm looking to eventually do is make a 3d plugin and adapt a T3d file format reader that I wrote in C years ago and make a little virtual world where I can try out some game ideas, but I can't even get the hello world to work.
I first tried a google search for 3d java apps but all the info I found was really offbase. So I went to sun and started with the applet tutorials. they started giving code for a hello world but made no mention of how to actually use it. so I looked at the source code and saw something like
<applet code="HelloWorld.class" width="200" height="200">
</applet>
so i tried that and made HelloWorld.class with their sourcecode in it and all I got in firefox was a box with a red x in it.
So then I tried to view their source that was actually in HelloWorld.class but it was filled with jibberish, nulls, strange symbols and all sorts of weirdness with the only thing in english was path variables.
I got the same thing here http://javaboutique.internet.com/tutorials/Step/
so I'm at a loss. How do I actually create a helloworld program?
I haven't done regular java programming (non applet) in years and never really understood it. I could never get OO down at all. Every book I read said that it was closer to the way we really think then procedural but it's too alien to me.
The most I've ever been able to do was some simple database programs.
Only language I can't even get HelloWorld to work
I hate to ask the obvious, but you keep saying that your class file contains
Code:
import javax.swing.JApplet;
import java.awt.Graphics;
public class HelloWorld extends JApplet
{
public void paint(Graphics g)
{
g.drawRect(0, 0,
getSize().width - 1,
getSize().height - 1);
g.drawString("Hello world!", 5, 15);
}
}
Have you actually compiled this java code into a class file?
alan