Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

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/ (This one has the applet)
VisualizingExam/src/visualizingexam/ (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? 
this llama doesn't want your drama, he just wants this tiny ad for his mama
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic