Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to create my first applet

 
Benjamin Jankowski
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create my first applet for java; I went to http://www.ehow.com/how_2085201_java-applet.html which explains how to do so; I downloaded the latest version of the Java Development Kit, created in NotePad the source code as copied and pasted from the said site, put the file I named MYFIRSTAPPLET.JAVA in my C: drive, and then put in the RUN function "javac C:\MyFirstApplet.java" (without dows quotes); when I do so, get an error message "Windows cannot find 'javac". Make sure you typed the name correctly, and then try again." How am I able to compile the source code into a *.class file so that I can embed it in an HTML page that I'm trying to create? Thank you.
 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to set the PATH environment variable to include the path to javac. See this Q&A section on the Java Tutorial.

Are you sure you want to be writing an Applet now? They are coming under pretty heavy attack - and most browsers, companies, and even Homeland Security are suggesting not to allow Java plugins to run in your browser. Why not learn Java on a desktop app? I don't mean to dissuade you from learning Java, I just want to make sure you think about it before you concentrate too much on Applets only to find out they aren't a good idea.

And Welcome to the Ranch!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic