Docsity

Setting Up Java Applets on AFS: Manually and with NetBeans, Slides of Java Programming

Partial preview of the text

Download Setting Up Java Applets on AFS: Manually and with NetBeans and more Slides Java Programming in PDF only on Docsity!

Tutorial for Applets

Deployment Options

  • There are at least three ways to put a NetBeans created applet on the NJIT AFS system.
  • The first method is to create and test source code in NetBeans, but then transfer it to AFS, compile it there, and set it up manually.
  • The second method is to create a JAR file in NetBeans, copy it to AFS, and configure it there with Netbeans.
  • The third method is to package a stand-alone JAR package in NetBeans and deploy it to AFS.

Setting Up Java Applets on AFS

Manually

Fang Chu

AFS and Java Applets

  • To create a homepage on AFS for Java Class, see the instructions at

http://web.njit.edu

  • Your web pages will have an address like this

http://web.njit.edu/~gblank

  • Use FTP software or AFS Clients to upload your web pages to your directory

http://csd.njit.edu/software

http://www.coreftp.com/download.html

Running Java Applets on AFS

• Log on to AFS (afs1-afs32)

• Change to your java file directory

• Compile the java file

• Make sure that java file, java class file, text file

and html applet container are in the same

directory

• Link to the html applet container online to

enable the java applet

Log on to AFS

Click on “Start” at bottom right Click on “Run” next to bottom

Change Directory

Current Directory

Change Directory

Change directory to the folder containing “ReadFile.java” Using command “cd”

Run the Java Applet

NetBeans Essentials

for Java Applets

• Create or import Java applet codes.

• Debug, compile and run codes.

• Embed codes into web applications.

Create a new project

Select General>> Application>> Next>>…

Name the new project

After naming the project and selecting its directory Click on “finish”

Compile an applet

Right-click on the applet file and then left-click on “compile”to compile the java applet

Compiling Message

No Error, Can be built and executed