How to Call Applet from Oracle Java Application?

How to Call Applet from Oracle Java Application?

Post by Lana Nelson x-798 » Wed, 15 Jul 1998 04:00:00



There is a sample java applet that comes with the JDK.... Chart.java
under the directory demo/BarChart.  How can I call this applet from
my java application?  I can display the applet with the example1.html
that is provided in JDK examples.  But I cannot get it to display
from a java application.  Can anyone help?  The error message: Applet
can't start: error: java.lang.ClassFormatError.

I am working on an Oracle Webserver using Oracle class extensions in the
java cartrige to build html.  

Thanks,

Lana Nelson

--------------------------------
My code follows:

import java.io.*;
import java.lang.*;
import java.net.URL;
//
public class call_barchart {

public static void main(String args[])

{
  HtmlHead hd = new HtmlHead("SEO Unix Inventory - Chart");
  HtmlBody bd = new HtmlBody();

 Applet applet = new Applet("Chart.class", 251, 125);
  applet.addParam("c2_color", "green");
  applet.addParam("c2_label", "Q2");
  applet.addParam("c1_style", "striped");
  applet.addParam("c4", "30");
  applet.addParam("c3", "5");
  applet.addParam("c2", "20");
  applet.addParam("c4_color", "yellow");
  applet.addParam("c1", "10");
  applet.addParam("c4_label", "Q4");
  applet.addParam("title", "Performance");
  applet.addParam("c3_style", "striped");
  applet.addParam("columns", "4");
  applet.addParam("c1_color", "blue");
  applet.addParam("c1_label", "Q1");
  applet.addParam("c3_color", "magenta");
  applet.addParam("c3_label", "Q3");
  applet.addParam("c2_style", "solid");
  applet.addParam("orientation", "horizontal");
  applet.addParam("c4_style", "solid");
  applet.addParam("scale", "5");

  bd.addItem(applet);

  // Print header info
  hp.printHeader();
  // Print body
  hp.print();

Quote:}

 
 
 

1. How Call Java Applet from Oracle Java Application

There is a sample java applet that comes with the JDK.... Chart.java
under the directory demo/BarChart.  How can I call this applet from
my java application?  I can display the applet with the example1.html
that is provided in JDK examples.  But I cannot get it to display
from a java application.  Can anyone help?  The error message: Applet
can't start: error: java.lang.ClassFormatError.

I am working on an Oracle Webserver using Oracle class extensions in the
java cartrige to build html.  

Thanks,

Lana Nelson

------------------
My code follows:

import oracle.html.*;
import java.io.*;
import java.lang.*;
import java.net.URL;
//
public class call_barchart {

public static void main(String args[])

{
  HtmlHead hd = new HtmlHead("SEO Unix Inventory - Chart");
  HtmlBody bd = new HtmlBody();

 Applet applet = new Applet("Chart.class", 251, 125);
  applet.addParam("c2_color", "green");
  applet.addParam("c2_label", "Q2");
  applet.addParam("c1_style", "striped");
  applet.addParam("c4", "30");
  applet.addParam("c3", "5");
  applet.addParam("c2", "20");
  applet.addParam("c4_color", "yellow");
  applet.addParam("c1", "10");
  applet.addParam("c4_label", "Q4");
  applet.addParam("title", "Performance");
  applet.addParam("c3_style", "striped");
  applet.addParam("columns", "4");
  applet.addParam("c1_color", "blue");
  applet.addParam("c1_label", "Q1");
  applet.addParam("c3_color", "magenta");
  applet.addParam("c3_label", "Q3");
  applet.addParam("c2_style", "solid");
  applet.addParam("orientation", "horizontal");
  applet.addParam("c4_style", "solid");
  applet.addParam("scale", "5");

  bd.addItem(applet);

  // Print header info
  hp.printHeader();
  // Print body
  hp.print();

2. --- US-MD Sybase Database DBA --- (recruiter)

3. How to Call Applet from Java Application?

4. FileMaker 3 Port number question

5. Java applet CGI calls over secured SSL connection

6. FW: Informix change notification

7. 2 tier (database driven) Java application, not applet

8. Insert with duplicate values in the primary key.

9. Java Applet or Application to Connect to Informix / MsAccess Database

10. Java Applet/Application/database question?

11. jdbc-odbc bridge - convert a java application into an applet

12. Connecting to an Access database from java application (NOT applet)

13. Java Applet/Application to Connect to Access or SQL Server