• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Applet Deployment / Netbeans / Commandline

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">
<title>Visualizing Exam</title>
<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? 
No, tomorrow we rule the world! With this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic