Any easy way to debug an applet in an IDE (JCreator)?

Started by danth, January 15, 2009, 05:17:32

Previous topic - Next topic

danth

Hey guys! Newbie to LWJGL here.

I have my own applet working with the applet loader! I also have regular apps working in Jcreator. But, I want to be able to debug an LWJGL applet in Jcreator. But to use the applet loader, you have to put your applet in a jar and then sign it. So, I see 3 options:

1)Somehow set the Java runtime up so your applet can find all the lwjgl jars and natives and do it without the applet loader or a jar(not sure if this will work anyway).

2)Run your applet as an application in some sort of frame...i have this kind of working, except it doesn't display right.

3)Tell Jcreator to put your applet in a signed jar as part of the build...not sure if this is possible.

Does anyone have any ideas? Otherwise I have to compile the project, then open up a command line to manually jar the applet, then sign the jar, and then move it to another folder with the applet loader files. I can do this but it sucks. Is there a better way?

EDIT: Okay, I actually found a way to do option 2. It turns out the everything was displaying right, but my edit to the code messed up how things looked. So, I can test my applet as a app by having an instance of the applet in a frame. Google "running an applet as an application" and you'll find many pages on it, it's really easy.

I also found out that JCreator has a Jar builder tool built in, and also has a Dos Command tool, so you can call any Dos Command (like jarsigner). However, this means to test my applet as an applet in Jcreator, after I build, I have to use the Jar tool and the Dos Command tool, and then run the project. It's workable but not ideal. Also, even if I do run my Applet in JCreator (with AppletViewer.exe), it doesn't ask me permission and I get the "Permissions for Applet refused" error. I can run the exact same files in Firefox and it works. Also, if I right click on the htm file in Jcreator and select "View in Browser", it works! Only when I run the project in JCreator (with appletviewer.exe) does it automatically not give permission to run the applet. I just realized I can change the run applet command to something other than appletviewer, so i'll try to change it to firefox.