If you get IntelliJ or Eclipse I can help you. Couldn’t help you with JBuilder though. I just don’t know the IDE. If you provide a screen shot of what JBuilder is asking you for I’m sure we can figure out what its asking for. I’m sure its just trying to figure out what you’re trying to run.
its seems u have never used JBuilder before now. Look in the help. it lists everything on how to get JBuilder running from a new user point of view… you will run into more and more things you will feel u cant do… read the ‘JBuilder Fundamentals’ its under the Help menu item…
this is all basic stuff… but that aside:
- [Ctrl] N
- General TAB
- Class
- If u wish to use a package path, Package: ant.coolstuff
- Class Name: Main (whatever)
- Base Class: just leave as is for now.
- [x] public, [x] Genarate main methord, No need to tick the rest for this little demo. they all do what they say on the tin. if u dont no there is a [help] button.
- OK
- Class opens in main window:
public class Main {
public static void main(String[] args) {
}
}
- Just add some output data:
public class Main {
public static void main(String[] args) {
System.out.println(“hello jbuilder”);
}
}
- Make Project
- Run Project
- Project Propertys window opens under the Run tab
- NEW…
- Name: MyApp Runtime Configuration
- Build Target: Make
- Run tab
- Type: Application
- Main Class: […]
- New window will open named: ‘Select Main Class for Project’
- Browse TAB
- ant.coolstuff.Main
- OK
- OK
- OK
- Run Project
You should get a System.out.println in the bottom output console saying ‘hello jbuilder’. From here the world is yours… there are loads of cool xtra stuff jbuilder duss as well. u can have more then one runtime type all under your Run Project popup. this can be handy if u want your code to be an Application pointing to a main(String[] args) or and Applet, WebStart, whatever.
hope this gets u on track to making cool stuff… jbuilders debuger is the best i have ever seen, anywhere!
thanks alot aNt but i understand all that. i have run several of my java programs as well as tutorials but im trying to run the jogl triangle program and i am not sure how to configure the run tab:
package jogls;
/**
-
Title: simple triangle
-
Description: java opengl triangle tutorial
-
Copyright: Copyright (c) 2003
-
Company: jujuencryption
- @author not attributable
-
@version 1.0
*/
import net.java.games.jogl.GLEventListener;
import net.java.games.jogl.GL;
import net.java.games.jogl.GLDrawable;
import net.java.games.jogl.DebugGL;
public class TestRenderer implements GLEventListener
{
private GL gl;
private GLDrawable glDrawable;
public void init(GLDrawable drawable)
{
this.gl = drawable.getGL();
this.glDrawable = drawable;
drawable.setGL( new DebugGL(drawable.getGL() ));
System.out.println("Init GL is " + gl.getClass().getName());
}
public void display(GLDrawable drawable)
{
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT );
gl.glLoadIdentity();
gl.glColor3f(1.0f, 0.0f, 0.0f );
gl.glBegin( GL.GL_TRIANGLES );
gl.glVertex3f( 0.0f, 0.0f, 0.0f );
gl.glVertex3f( 1.0f, 0.0f, 0.0f );
gl.glVertex3f( 1.0f, 1.0f, 0.0f );
gl.glEnd();
}
public void reshape(GLDrawable drawable, int x, int y, int width, int height)
{
}
public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
{
}
}
any idea?
well u need a ‘public static void main(String[] args)’ see if there is another java file that may go with it or add this:
package …
imports …
public class Main {
public static void main(String[] args) {
Frame frame = new Frame(“Gear Demo”);
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
// Use debug pipeline
// canvas.setGL(new DebugGL(canvas.getGL()));
System.err.println("CANVAS GL IS: " + canvas.getGL().getClass().getName());
System.err.println("CANVAS GLU IS: " + canvas.getGLU().getClass().getName());
canvas.addGLEventListener(new TestRenderer ());
frame.add(canvas);
frame.setSize(300, 300);
final Animator animator = new Animator(canvas);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
animator.stop();
System.exit(0);
}
});
frame.show();
animator.start();
}
}
then point JBuilder to this class.
have you ever found your self doing something as dumb as trying to run an application without a “main” thanks aNT man, it runs just fine now. (i was losing it there for a while)
thats ok dude… happens to me all the time ;D