Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Java, Java 7 Edition
This is the forum to discuss the Wrox book Ivor Horton's Beginning Java, Java 7 Edition by Ivor Horton ; ISBN: 978-0-470-40414-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Java, Java 7 Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2012, 11:10 AM
Registered User
 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1 - Executing an Applet

I am brand new to Java and am having trouble with the very basics of applets. I am using NetBeans IDE for editing and when I create a new application to write the html example I get an error on the first line. Here is the code:

<html>
<head>
<title> A Simple Program </title>
</head>
<body>
<hr>
<applet code = "MyFirstApplet.class" width = 350 height = 200 >
</applet>
<hr/>
</body>
</html>

which gets saved as MyFirstApplet.java.

NetBeans debugger gives me an error saying: Class "MyFirstApplet" does not have a main method.

I am quite certain that I am overlooking something very fundamental, but I just don't know what it is!
 
Old May 2nd, 2012, 12:34 PM
Registered User
 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Persistence pays off...and I figured it out
 
Old May 2nd, 2012, 02:38 PM
Registered User
 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For completeness, the above code is the .html code, not the .java code
 
Old May 6th, 2012, 06:21 AM
Registered User
 
Join Date: May 2012
Posts: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Default

And what was the solution to the problem ? ? ?
You did not create the Applet in the first place ? or you did not save the file as .html ? :)
 
Old September 12th, 2014, 03:39 AM
Registered User
 
Join Date: Sep 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im also a newbie in Java and have this book last night. I tried to execute the code reference MyApplet.html using the command appletviewer but I encounter error in cmd prompt as shown below:
"load: class MyFirstApplet not found"
and also the applet viewer window popup error below:
"start:applet not initialized"
Could someone help me on this...
 
Old September 12th, 2014, 09:53 AM
Registered User
 
Join Date: Sep 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default resolved!!

Its ok now, issue related to my system environment setup.. PATH variables configuration is corrected.

Thanks
 
Old October 14th, 2014, 08:24 AM
Registered User
 
Join Date: Oct 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool SURE Persistence Pays

Applet stuff gave me a hell of trouble, great one indeed. But later figured it out





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 : Clients (Problem executing client code) pchellaboina BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 0 January 11th, 2012 09:07 AM
Error Executing Package Chapter 6 siddhi BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 3 October 14th, 2009 02:45 PM
need help in applet splashsvp Java Basics 1 March 4th, 2007 08:47 AM
Signed Applet example? EhobaX Java GUI 1 January 6th, 2004 06:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.