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.


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.


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.


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.


What is simple mail transfer protocol?

Simple Mail Transfer Protocol (SMTP) is the de facto standard for e-mail transmissions across the Internet. Formally SMTP is defined in RFC 821 (STD 10) as amended by RFC 1123 (STD 3) chapter 5. The protocol used today is also known as ESMTP.SMTP is a relatively simple, text-based protocol, in which one or more recipients of a message are specified (and in most cases verified to exist) along with the message text and possibly other encoded objects. The message is then transferred to a remote server using a procedure of queries and responses between the client and server. Either an end-user's email client, a.k.a. MUA (Mail User Agent), or a relaying server's MTA (Mail Transport Agents) can act as an SMTP client. An email client knows the outgoing mail SMTP server from its configuration. A relaying server typically determines which SMTP server to connect to by looking up the MX (Mail eXchange) DNS record for each recipient's domain name (the part of the email address to the right of the at(@) sign). Conformant MTAs (not all) fall back to a simple A record in the case of no MX. Some current mail transfer agents will also use SRV records, a more general form of MX, though these are not widely adopted. (Relaying servers can also be configured to use a smart host.) The SMTP client initiates a TCP connection to server's port 25 (unless overridden by configuration). It is quite easy to test an SMTP server using the telnet program (see below). SMTP is a "push" protocol that does not allow one to "pull" messages from a remote server on demand. To do this a mail client must use POP3 or IMAP. Another SMTP server can trigger a delivery in SMTP using ETRN.


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?


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