i have to do a program in BDK.my BDK and JDK are in the same folder java.
i have set the path for jdk/bin in control panel.i have created the jar file,
jar cfm [jar file name] [manifest file name] [java class name].
i didn't get any error there.

but in jdk when i try to load the jar file,it is giving me error saying that
"jar file doesn't have any beans.Each jar file needs to contain a manifest file describing
which entries are beans.you should provide a suitable manifest file"

my manifest file is first.mnf and the content is
Name: first.class
Java-Bean: True

my java file is first.java and the coding is as follows

import java.awt.*;
import java.io.Serializable;
  import java.beans.*;       
public class first extends Canvas implements Serializable{
 private Color color = Color.green;
 
 
  public Color getColor(){
     return color;
  }
 
    public void setColor(Color newColor){
     color = newColor;
     repaint();
  }
 
  public void paint(Graphics g) {
   g.setColor(color);
  g.fillRect(20, 5, 20, 30);
  }
 
 
  public first(){
   setSize(60,40);
   setBackground(Color.red);
  }

}

CAN ANYONE PLEASE HELP ME?

Open in the jar file in WinZip or WinRAR to check if it actually contains any class file.

According to me the command for you case is :

jar cfm [jar file name] [manifest file name] [java class name].class.

And BTW please use code tags while including code in your posts

i did check the jar file using
jar xvf [jar file name]

it contains both manifest file and class file

you don't place the jar file in jdk\bin dir!.....
Place thz in bdk\jars dir!..........

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.