Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Simple Java Bean Devt Steps

 
Ranch Hand
Posts: 2373
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi friends,
I did the following steps to create a simple Java Bean (not EJB) and it went well until i tried to get my Bean in the BDK1.1 IDE. After successful compilation, i hoped according to the book that it will be there....but it was not....
Am i making some mistake? I m giving here the steps i followed with descriptions and the code....lemme know if i have forgotten something....
/** My first Bean thru coding. The steps invloved are.....
1. Create a directory for the new bean.
I saved it in my c:\bdk\demo\sunw\demo\colors
2. Create the Java source file(s).
I saved it as "Colors.java".
3. Compile the source file(s).
I compiled with "javac Colors.java" .
4. Create a manifest file.
I saved two gif files also named "blob.gif" and "apv.gif" in the "colors" directory.
I created the following manifest file naming "colors.mft" and the code was ---
Name: sunw/demo/colors/apv.gif
Name: sunw/demo/colors/blob.gif
Name: sunw/demo/colors/Colors.class
Java-Bean: True
The "Java-Bean: True" statement must immediately follow the class file that is a bean and no space between 'Name' and ':' , 'Java-Bean' and ':' is allowed.
I saved it in "c:\bdk\demo" because manifest files in bdk are saved here always.
5. Generate a JAR file.
Then to create the jar file i gave the command in DOS--
jar cfm c:\bdk\jars\colors.jar c:\bdk\demo\colors.mft c:\bdk\demo\sunw\demo\colors\*.class c:\bdk\demo\sunw\demo\colors\*.gif
A jar file is generated in "c:\bdk\jars" names "colors.jar" .
6. Start the BDK.
Go to "c:\bdk\beanbox" and type 'run' in command prompt.
7. Test the newly created Java Bean.
*/


------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
I myself found the solution! Hurrah!! But no audience...
Well, last night i tried to modify the manifest file and found it working with the previous settings ..... there was no change but it worked....
So u can follow the above steps to make ur own simple beans....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
Good for you! Thank you for sharing your success.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is about regular JavaBeans and not EJB's so,
Check out the Sun tutorial on JavaBeans
This question should be ask in Other Java API's so, I'll move it there.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
hey ashik uzzaman...i know its really an old thread...but i was hoping just in case some one replies i can get my answer...

i am getting the same error actually...so i really want to know how was the error resolved??
 
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not re-open old threads, and do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!