Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2007, 10:55 PM
Member
 
Join Date: Jul 2007
Posts: 26
romina is on a distinguished road
My application Will Not Execute
I then used 'javac' to convert that into a file named 'MyProgram.class'.
MyProgram.java

Code:
public class MyProgram { public static void main(String[] args) { System.out.println( "Eureka, I can put Java on my resume."); } }
I have an html that looks like this:

Code:
<html> <head> <title></title> </head> <body> <applet width="300" height="300" src="MyProgram.class"></applet> </body> </html>
Now I am quite new to java and i'm not sure but I think my software is ok so if i can get an explanation to why this only displays a little white piece of paper with a red 'X'.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 06:16 AM
Member
 
Join Date: Jul 2007
Posts: 40
trill is on a distinguished road
Have a look at Java's own Applet tutorial, Lesson: Applets (The Java™ Tutorials > Deployment)

Code snippets you'll want to look at:
Code:
<applet code=HelloWorld.class width="200" height="200"></applet>
Code:
import javax.swing.JApplet; import java.awt.Graphics; public class HelloWorld extends JApplet { public void paint(Graphics g) { g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); g.drawString("Hello world!", 5, 15); } }
Also Java's API is invaluable. Familiarize yourself with it and it will help you solve many problems very quickly. Java 2 Platform SE v1.3.1

Java tutorial site: The Java™ Tutorials

Usually when I need to find something Java related I head to Google, search: Java api 'whatever' and will find a related document in the api files.
Example: for this thread a googled: Java api Applet and that tutorial was the first link.

Greetings.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot execute EJB application. JavaEmpires Enterprise JavaBeans 0 03-08-2008 09:58 AM
Execute Jar file barney New To Java 1 08-07-2007 08:13 AM
problems when I try to execute a jsp page christina JavaServer Pages (JSP) and JSTL 2 08-01-2007 01:23 PM
why does not execute this? aleplgr New To Java 6 08-01-2007 12:37 PM
Execute a new program in java mathias Advanced Java 1 07-31-2007 06:42 AM


All times are GMT +3. The time now is 10:24 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org