Results 1 to 1 of 1
- 02-19-2011, 01:24 AM #1Member
- Join Date
- Feb 2011
- Rep Power
Java Applet in Netbeans -- Deployment
Dear Java Masters,
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?
- By aaroncarpet in forum Java AppletsReplies: 0Last Post: 12-18-2010, 11:05 PM
- By dbashby in forum New To JavaReplies: 7Last Post: 04-18-2009, 03:49 AM
- By RaefWolfe in forum NetBeansReplies: 1Last Post: 03-27-2009, 05:47 PM
- By ruchira mathur in forum NetBeansReplies: 1Last Post: 01-06-2009, 08:08 AM
- By paulious in forum New To JavaReplies: 3Last Post: 10-23-2008, 11:25 AM