I have written an applet that connects mysql. Since i connect mysql it uses additional library.(JDBC Driver for MySQL (Connector/J)) When i finished writing and try to run on Netbeans there is no problem but i did not figure how to put that class into a html file. Do i have to put whole netbeans project up or what should i do?
A:
Read this tutorial from Sun/Oracle
- Package as jar
- Create jnlp
- Create HTML
willcodejavaforfood
2010-07-22 08:03:06
A:
Make the main class extends JApplet
Build the project
Find the jar
Then add this code to your HTML
<applet code = '<appletClassName>'
archive = '<jarFilePath.jar>',
width = xxx,
height = yyy />
Louis Rhys
2010-07-22 09:41:51
But it uses another java library called JDBC Driver for MySQL (Connector/J)), so, how can i add to the applet when i try to use that into a html file?
2010-07-23 00:37:45
put the library .jar in the same folder as the applet .jar
Louis Rhys
2010-07-23 02:00:14
A:
If you have the JDBC driver set up in the Netbeans project properties, all you have to do is build the project and then go into your NetbeansProjects folder (wherever your Project folder is) and open up the build folder. It should have a sample HTML document along with the necessary files to run the applet.
ChrisKS
2010-08-17 15:40:32