Java Bug?

Hello

I have a problem when i make applets.

When i make an applet called lets say: Game

And i make some change in the source code in Game.java and compile again to update the change nothing happens.

But if i make a new file called Something else lets say Game2.java and copy the source code from Game.java but change the class name to Game2 it works. I dont know why.

Should it be like this that everytime i want to change something in my code i need to change the class name and make a new file?

Please Reply

[553 byte] By [javaguy387a] at [2007-11-27 11:43:15]
# 1

This is not a Java bug. This well known behaviour is caused by browser cacheing.

You can get around this in two ways.

1) Restart your browser

2) Use appletviewer

Please next time, when you think you have found a bug in Java stop for moment, realize that you have found no such thing and use Google to search for people who have had the same issues as you.

cotton.ma at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 2

Thank you very much :)

javaguy387a at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 3

If I had a dollar for every newbie bug..... sigh...

petes1234a at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 4

It's amazing how many people with 2 days worth of experience can find a bug in a language that was developed by people who have 20 or 30+ years of experience.

floundera at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 5

> It's amazing how many people with 2 days worth of experience

> can find a bug in a language that was developed

> by people who have 20 or 30+ years of experience.

People with 20 or 30+ years of experience make actually more bugs than people with 2 days worth of experience ;-)

They make more things anyway incuding some bugs sometimes.

BIJ001a at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 6

True but the point I was trying to make was those bugs will have been found and fixed. I highly doubt a person with 2 days experience will be able to find a bug that a person with 30 years experience couldn't.

floundera at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 7

> This is not a Java bug. This well known behaviour is

> caused by browser cacheing.

>

Indeed, here's a real Java bug: http://www.heathwood.org/SIMPSON/quicklinks/ls/animalsoftherainforest/javaleaf.htm

jwentinga at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 8

> True but the point I was trying to make was those

> bugs will have been found and fixed. I highly doubt a

> person with 2 days experience will be able to find a

> bug that a person with 30 years experience couldn't.

they could accidentally stumble onto them of course, especially in areas of code that are rarely executed by experienced people because they're so obscure that noone uses them except in homework assignments.

jwentinga at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 9

> Indeed, here's a real Java bug:

> http://www.heathwood.org/SIMPSON/quicklinks/ls/animals

> oftherainforest/javaleaf.htm

"There is a bug in the ant farm."

"Which ant farm? I do not see any!"

"Well, that is the bug."

BIJ001a at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...
# 10

> You can get around this in two ways.

>

> 1) Restart your browser

>

> 2) Use appletviewer

In three ways, as the OP already found:

3) everytime you want to change something in your code change the class name and make a new file

Because in this case there's no cache to load. ;-)

java_knighta at 2007-7-29 17:48:56 > top of Java-index,Java Essentials,New To Java...