Archived

This topic is now archived and is closed to further replies.

[java] Agh. Please tell me there's an easier way.

This topic is 6389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Visual J++ has been driving me nuts, because it unceremoniously and without warning just stops trying to run my code if, say, a directory path is wrong, without giving me a "stopped at line ###" or whatever. Is there somewhere I can get this information other than random dispersal of breakpoints to see which ones get hit? -fel

Share this post


Link to post
Share on other sites
Um, no.
It puts a nice grey box on the screen where the applet should be. The only way I can figure out where it stopped is throw in a whole bunch of breakpoints and hope to be lucky.
I was just wondering if there were an error window or something that would indicate where it lost it and why, like there is for Visual C++.
I'm a Java newbie. Humor me. And tell me if this works.

-fel


Edited by - felisandria on June 16, 2000 10:47:31 AM

Share this post


Link to post
Share on other sites
quote:
Original post by felisandria
I''m a Java newbie. Humor me. And tell me if this works.



Heya fel. I checked the web page and it seems to work fine for my setup. Running Win2k and IE5. Looks like a good start on the next Baldur''s Gate.


---- --- -- -
Blue programmer needs food badly. Blue programmer is about to die!

Share this post


Link to post
Share on other sites
Sorry, i just have this thing about J++. The applet works fine, with one slight problem, if the button is held down, then updating doesn't occur until the button is released (a directional button). I don't know why that would be, maybe you should use one thread to paint the double buffered image and one to update the position of the sprites.

Oh, the easier way to figure out where errors are would be to get sun's jdk and run "java < prog name >". It will tell you when and where exceptions are thrown.


Edited by - Jim_Ross on June 16, 2000 11:22:17 AM

Share this post


Link to post
Share on other sites
That''s just the very first try, an extreme pre-alpha I put up to see if anyone could even see the thing. I plan to put in keyboard buffering to fix the hold-it-down problem, once I get collision detection done. One thing I need to figure out is tile preloading because it''s apparently not loading the walls or main character sprite up front. I think there''s something wrong with how I''m doing the double buffering too. I''m pretty happy with how far I''ve gotten with it so far tho, considering that it took me maybe 10 hours to get that much working and it''s the first actual Java program I''ve ever written. I''m also very happy to have an awesome artist because I can''t draw to save my life.

-fel

Share this post


Link to post
Share on other sites
One way to tell if where an applet has broken down during runtime is if you are viewing the applet with netscape click on communicator->Tools->Java Console
If there was an exception thrown or an error has occurred it will spit out semi helpful info on what kinda exception has occured in the java console. Another thing to do is setup Check points that call a System.Out.println(string), the just prints out which checkpoint was hit. You can view these from the Java Console in Netscape also... I'm not really sure if that's what you were looking for or not.

BTW I checked your applet.. I works sorta with IE5 but when I viewed it in Netscape 4.7 nothing showed up... got some vcafe error=2 or something... The system I'm on is an NT server.

War doesn't determine who is right, war determines who is left.

Edited by - Wrathnut on June 16, 2000 2:00:38 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

I didn''t see any exceptions in IE5 or Netscape 4.7 under NT4.0.

Constructive Suggestions (honest)
The double-buffering needs some work (shouldn''t be *any* flicker if your using a back buffer, sump''n''zup). I''d also paint the sprite before a key is pressed so that it''s visible right away. (All I saw was the background until I hit a key. I could have missed that cool little guy if I wasn''t dedicated enough to punch some keys )

Wrathnut gives directions on how to get to the Java Console on Netscape, on IE5.0, go to Tools,Internet Options,Advanced Tab,VM(Bottom of list),Check Console Enabled, restart.
Bringing up the console will let you see anything you write with a System.out.println() and also let you view the exceptions that are thrown. (I''m sure you''ll get *one or two* in the future )

Not bad for your first couple hours!

ManaSink

Share this post


Link to post
Share on other sites