Zoklet.net

Go Back   Zoklet.net > Technology > Technophiles and Technophiliacs > Codes of all kinds

Reply
 
Thread Tools
  #1  
Old 03-15-2012, 04:15 PM
CaptainCheeseTits CaptainCheeseTits is offline
Serf
 
Join Date: Aug 2011
Thanks: 16
Thanked 8 Times in 6 Posts
Default Why can't I compile Java applets?

I started learning java and since I have lots of web building experience, I want to start by learning how to make applets. I found some hello world applets here:
http://muq.org/~cynbe/java/classes/hello/hello.html
to play with. They run fine when I view them on that website but when I compile them myself and run them on my local apache server, heres what happens:

heres the details:

I'm using the official version of JDK 7 that I downloaded from the Oracle website:
http://www.oracle.com/technetwork/ja...d-1501626.html
any idea what I could be doing wrong?

BTW heres the code:
Code:
import java.applet.*;
import java.awt.*;

public class HelloWorld extends Applet {
    public void paint( Graphics g ) {
        g.drawString("Hello World",50,25);
}   }
thats about as simple as an applet can get, how could it be going wrong?

Last edited by CaptainCheeseTits; 03-15-2012 at 04:28 PM.
Reply With Quote
  #2  
Old 03-16-2012, 02:00 AM
a334jv2df's Avatar
a334jv2df a334jv2df is offline
Duke
 
Join Date: Jan 2009
Thanks: 657
Thanked 737 Times in 513 Posts
Send a message via ICQ to a334jv2df Send a message via AIM to a334jv2df Send a message via Yahoo to a334jv2df
Default Re: Why can't I compile Java applets?

Update your JRE.
Reply With Quote
The following users say "It is so good to hear it!":
CaptainCheeseTits (03-16-2012)
  #3  
Old 03-16-2012, 05:19 PM
CaptainCheeseTits CaptainCheeseTits is offline
Serf
 
Join Date: Aug 2011
Thanks: 16
Thanked 8 Times in 6 Posts
Default Re: Why can't I compile Java applets?

Will do but how come it could run it on the external website, but not my own internal webpage. I thought that when you visit a site with an applet, your browser downloads the .class file and executes it locally.
Reply With Quote
  #4  
Old 03-16-2012, 11:47 PM
CaptainCheeseTits CaptainCheeseTits is offline
Serf
 
Join Date: Aug 2011
Thanks: 16
Thanked 8 Times in 6 Posts
Default Re: Why can't I compile Java applets?

I updated JRE and now it works. Thanks.
Reply With Quote
  #5  
Old 03-17-2012, 02:31 PM
Hi-Guy Hi-Guy is offline
Wealthy Merchant
 
Join Date: Mar 2009
Location: United States
Thanks: 45
Thanked 92 Times in 74 Posts
Grin Re: Hai

The external site's applets were converted into bytecode with an older version of java that conveniently worked with your old JRE.

A horrible troubleshooting coincidence.
__________________
Bai
Reply With Quote
The following users say "It is so good to hear it!":
CaptainCheeseTits (03-18-2012)
Reply

Bookmarks

Tags
applets, compile, java

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cracking java applets CaptainCheeseTits Codes of all kinds 4 03-13-2012 04:33 PM
Lets compile a list of shit that pisses people off. Rainycity Pissin' Each Other Off 22 03-08-2011 03:47 PM
Is this java? TwinkleTits Codes of all kinds 3 02-28-2010 03:53 PM
Trying to compile a list of pharms to buy over seas.. Nerd Fangs Better Living Through Chemistry 29 12-04-2009 07:30 AM


All times are GMT. The time now is 09:35 PM.


Hot Topics
On IRC
Users: 4
Messages/minute: 0
Topic: "http://www.zoklet.net/..."
Users: 22
Messages/minute: 0
Topic: "buttpee"
Users: 10
Messages/minute: 0
Topic: "11:37 < mib_i8mfin> so wie ich die website hier sehe las..."
Advertisements
Your ad could go right HERE! Contact us!

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.