answersLogoWhite

0

Simple Java Mail Relaying Denied

User Avatar

Developers2008

Lvl 1
14y ago
Updated: 8/17/2019

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.

  • /

code: package sunw.demo.colors;

import java.awt.*; import java.awt.event.*; import java.util.Random;

public class Colors extends Canvas {

transient private Color color; private boolean rectangular; private static Random random = new Random();

public Colors() { addMouseListener(new MouseAdapter() { public void MousePressed(MouseEvent me) { change(); } });

rectangular = false; setSize(200,100); change(); }

public boolean getRectangular() { return rectangular; }

public void setRectangular(boolean flag) { this.rectangular = flag; repaint(); }

public void change() { color = randomColor(); repaint(); }

private Color randomColor() { int r = random.nextInt(256); int g = random.nextInt(256); int b = random.nextInt(256); return new Color(r,g,b); }

public void paint(Graphics g) { Dimension d = getSize(); int h = d.height; int w = d.width; g.setColor(color); if(rectangular) { g.fillRect(0,0,w-1,h-1); } else { g.fillOval(0,0,w-1,h-1); } } }

-- I also post it at: http://java.joycoding.com/java/688/318688-simple-java-bean-devt-steps.html

Post here or post at java.joycoding.com, don't email. If you feel you have to mail, revert my....

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

In what file do you setup relaying for sendmail?

poprelayd Answer is: /etc/mail/access


Can you teach me java?

Yes I can teach you Java.... give your mail Id ...I will send you my details


What is the full form of 'SMTP'?

The full form of SMTP is Simple Mail Transfer Protocol (SMTP). The Simple Mail Transfer Protocol refers to the internet standard for the electronic mail transmission.


What is the simple subject in the sentence Sort the first-class mail this afternoon?

The simple subject in the sentence is "mail." It is the noun that the sentence is about.


Why java has been given that name?

Java was basically a random name yelled out during a marketing meeting. See the related link for an e-mail about this from James Gosling.


Can you install java software in micro max X330?

NO HOW TO INSTALL JAVA SOFTWARE TO MICROMAX X330 PLZ SEND ME THA DATA TO MY MAIL ID kjr.1988@rediffmail.com


Full form of SMTP?

SMTP stands on simple mail transfer protocol


Why was email given its name?

In case this isn't the same question I answered earlier: it means electronic mail. It's short for Electronic MAIL. Simple question, simple answer.


How long does it take a simple mail letter from the US to new York?

How long does it take for a simple mail letter from united states to new York


What do you do if you are trying to join WikiAnswers and your username or password is denied every time?

E-mail wikianswershelp -at- wikianswers.com for assistance.


What does a '550 mailbox unavailable' or 'access denied' error mean and how do you fix it?

ONE E-mail I send is being returned: 550 mail box not found. How I can I correct this situation?


What protocol is used between E-Mail servers?

SMTP -(Simple Mail Transfer Protocol) is what is used with the basic email. There is also and extended one (ESMTP)- (Extended Mail Transfer Protocol). Hope this helped.