This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am a C++ programmer just getting used to your glorious and superior language. So far, I have found it very useful and fast. I used Netbeans to create an application. I ran it and tested it and found it running well. I then turned it into an applet (by creating a Java file) with an applet tag and calling the java file containing the main from this one.
This works too! (in netbeans, if I click the applet class and click ‘run’ it works with no problems whatsoever). Now I would like to port this applet to the internet.
Here is the structure of all the files I have.
VisualizingExam/src/visualizingexam/VisualizingExamApplet.java (This one has the applet)
VisualizingExam/src/visualizingexam/VisualizingExamApp.java (This one has the main class)
As far as I can see, that are the important file. Now, VisualizingExam.html says :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<P>Here it is: <APPLET archive="VisualizingExam.jar" code="visualizingexam.VisualizingExamApplet.class" WIDTH="200" HEIGHT="400">
This is where VisualizingExam.class runs.</APPLET></P>
Did I mention I ran netbeans? It created the file ‘VisualizingExam.jar’.
Now, when I run this little html I get the error: Cannot find “LibFile1.jar”. Apparently Netbeans did not tell the jar file to include the supporting lib .jar files.
Im guessing that creating a new jar file from commandline might be the best option here?
If so, which file should I tell Java has the main class? The one that contains the applet or the one that contains the main class?
Any other quick fix solution (or otherwise) for a led-astray C++ programmer?