[java] New to Java: How do I recompile code? (no, seriously!)

Started by
15 comments, last by EGD Eric 18 years, 4 months ago
There was some way to do this without closing the browser, alas I forget. Perhaps a force refresh will do the trick? (ctrl + refresh)
Advertisement
Yeah, instead of using a browser you can use the Applet Viewer program that comes with the JDK.

I agree with Capn., and many of the other above posters; avoid applets if you can, and if you are using them as a tool to learn Java you are looking in the wrong place. Learn Java using the available trails, and when you want to move on to mobile games there are some good sites out there to help you get started; most should be linked to Gamedev somewhere... I also think that evelyn is a mobile games developer, you might want to ask her nicely for tips.

Jon

Quote:In firefox... Tools > Options > Privacy There ya go! A way to clear your cache...

Tried it. Didn't work. Internet explorer though, all you have to do is exit the browser and come back in. Pinacolada said that being able to see your results instantly is good for workflow, and I agree! Faster the better.

Good replies all around, very helpfull. I have some follow-up questions:

1. What's J2ME?
2. What's J2SE?
3.
Quote: I don't see much reasons to code applet games nowadays, with web start and all...
. Aha... I see, so Webstart makes it much easier to program games using Java?

4. Ok, so, let me see if I understand this right: If I want to do cell-phone games, I should start out with the gamedev tutorial just to learn Java language basics, then head and use J2ME and/or the phone vendor API.

5. Evelyn is a phone programmer eh? I guess she's a forum member? Alright, perhaps I'll PM her sometime.

Quote:There was some way to do this without closing the browser, alas I forget. Perhaps a force refresh will do the trick? (ctrl + refresh)

Nah, that didn't work either (with Firefox anyway)

Thanks for the replies everyone! If you've got more advice, bring it on!
1. Java 2 Micro Edition - the Java language distribution for portable devices such as mobile phones, palm tops, etc... It is a set of classes, a SDK just like the J2SE (see below), but customized for micro devices and their KVMs;

2. Java 2 Standard Edition - the Java language basic distribution for common computational systems, such as desktop PCs. Almost all libraries, APIs and etc are written upon this standard SDK - the J2EE is an example - except for the J2ME, since it has specific needs (altough some level of communications between them is possible).

3. Web startable games are games written in the standard J2SE SDK, deployed through the web via the web start technology. More details here.

4. Right - that's what I would do if I were you ;)

5. Unfortunately, I don't know the girl ^_^

Son Of Cain

PS: Ctrl + F5 works for me on Internet Explorer
a.k.a javabeats at yahoo.ca
Ok if ctrl+F5 isn't working try this: open up the Java console (right click on the icon that should be in your system tray when you start the applet if you haven't changed any settings) and simply type an 'x'. This should clear the cache and your applet will reload when you refresh the page. A pain I know, but better than closing the browser
I tried typing all the following commands, and none of them work, with the result I get in <> brackets.

appletviewer HelloWorld.java <nothing happens>

appletviewer HelloWorld <-I/O exception while reading: C:\jdk5.0\Java apps\HelloWorld\HelloWorld (The system cannot find the file specified)>

appletViewer HelloWorld.class <nothing happens>

I do have an appletviewer.exe file in the bin folder of the jdk5.0. I don't know what's going on there.
Ok I'm dumb. All I had to do was type appletviewer, then the name of the html file itself. bah!

This topic is closed to new replies.

Advertisement