Jump to content
  • Advertisement

Archived

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

fadilthrejk

[java] HTML host documents

This topic is 5732 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

I have two classes, and you probably have seen me asking about them. So now, how would I have my host document read? and where in relation to my files should it be? Same directory? here is what I have, but it doesn''t work:
  
<html>
<applet code = "DuelMonsters.class" width = 1024 height = 768>
</applet>
</html>
  
Spread the rusty bleen ointment on the blue-red fromato with your thimble carver

Share this post


Link to post
Share on other sites
Advertisement
Start with the simplest setup:

don''t use packages for two classes in you first applet adventure

Put both classes (remember to put them into the default package i.e. comment/remove the "package whatever;" line) and the html into one directory and you''re done.

have a nice day ...

Share this post


Link to post
Share on other sites
ok, now in english.
Actually, I think I got that. I will check as soon as I recover the files. The bag that my disks were in was stolen during lunch at school.

Spread the rusty bleen ointment on the blue-red fromato with your thimble carver

Share this post


Link to post
Share on other sites
Petr Stedry has it right. You should try to avaid using packages until you have more experience with Java. However, to fix your problem you need:


  
//if your package is game.main then

<html>
<applet code = "game.main.DuelMonsters.class" width = 1024 height = 768>
</applet>
</html>




First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!