Here's my program:

import java.awt.Rectangle;


public class RectangleTester
{
public static void main(String[] args)
{
Rectangle r1 = new Rectangle(0, 0, 100, 50);
Rectangle r2 = new Rectangle(0, 0, 100, 50);
r2.grow(10,20);


System.out.println(r1);
System.out.println(r2);
}
}

No error compiling but when I run this is the output

2009-09-14 16:00:29.174 java[414] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0xe903, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2009-09-14 16:00:29.175 java[414] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)
java.awt.Rectangle[x=0,y=0,width=100,height=50]
java.awt.Rectangle[x=-10,y=-20,width=120,height=90]

Any ideas?

Recommended Answers

All 3 Replies

i compiled it fine no error, using the exact code you posted. soooo its not the code

Did it run? If so, what was the output? I got that output on both jgrasp and eclipse.

Tested on Emacs the output is:
java.awt.Rectangle[x=0,y=0,width=100,height=50]
java.awt.Rectangle[x=-10,y=-20,width=120,height=90]

The same output you have.
What are you expecting to get?

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.