title: Java Embedding Into HTML
body: <p>I'm sure this question has been asked a million times, but no matter how many Google searches I do I cannot get this working. I'm basically trying to get a project with multiple packages in it to be embedded in a webpage. I made a test program which just made some balls bounce around the screen and was able to get that running. I put the main class in one package and the ball class in another just to test it and it seems to be running fine. But the program that I actually need in a web page (just called FinalProject) refuses to do it. </p>
  
  <p>The best thing I can get it to do is give me a blank screen, without giving an error but just white. If I try clicking where it should be nothing happens, I think because the applet is there but is just showing white so I can't see it. I did use the <code>applet</code> tag, which from my understanding is now depreciated but I need to turn this project in on a webpage just so the teacher can see it. We've already tested that other people's projects (which used the <code>applet</code> tag) work, so I was trying to stick with that for now and worry about getting it working on every browser afterwards. Though that could very well be the problem. Maybe it would work on his browser but not mine here. I've tried running my program on Google Chrome, Mozilla Firefox, and Internet Explorer with no luck.</p>
  
  <p>Here is the HTML code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;  
  
  &lt;/head&gt;  
  &lt;body&gt;  
      &lt;applet code = "main.FinalProject.class" width = "700px" height = "500px"&gt;&lt;/applet&gt;  
  &lt;/body&gt;  
  &lt;/html&gt;
  </code></pre>
  
  <p>The HTML file this is written in is in <code>[Eclipse Workspace]/FinalProject/bin/test.htm</code>. The FinalProject.class file referenced in the HTML exists in <code>[Eclipse Workspace]/FinalProject/bin/ main/FinalProject.class</code>. The FinalProject.class file acts as the main class, so I'm pretty sure that's the one I need to run. It's the one with the init(), actionPerformed(), paint() methods and all that good stuff.</p>
  
  <p>Currently I'm trying to run this offline on my computer, so there shouldn't be any net URL's I would think. I used Eclipse to write the Java code, dunno if that makes any difference. Unfortunately, the Java code is rather large, too much to reproduce here, if there's something specific you think is the problem I can look and post that small section. </p>
  
  <p>A few of my friends managed to get theirs working, however they said they had to remove all their .png files (annoying but doable for my project). They also said had to remove all their mouse movement code. My program is kind of dependent on that, I need that for it to work at all. I know there MUST be a way to use all the MouseListener and MouseMoveListener code online, maybe it's a little different though. I dunno if that has something to do with this, but I figured I'd point it out just to be safe.</p>
  
  <p>Any help here would be greatly appreciated.</p>