Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > What is the compiler complaining about?

Reply
Thread Tools

What is the compiler complaining about?

 
 
ssecorp
Guest
Posts: n/a
 
      07-07-2008
I odnt get the exact complaint here. and why am i filling in "w" in
the end again?
http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html


import java.awt.image.PixelGrabber;

public class Main {

public static void main(String[] args) {
int w = 50;
int h = 50;
int[] pixels = new int[w * h];
PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
images/giffer.gif", 1, 1, w, h, pixels, 0, w);
}

}


init:
deps-jar:
Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
\JAItest\build\classes
C:\Users\saftarn\Documents\NetBeansProjects\JAItes t\src\jaitest
\Main.java:11: cannot find symbol
symbol : constructor
PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
location: class java.awt.image.PixelGrabber
PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
images/giffer.gif", 1, 1, w, h, pixels, 0, w);
1 error
BUILD FAILED (total time: 0 seconds)
 
Reply With Quote
 
 
 
 
Daniele Futtorovic
Guest
Posts: n/a
 
      07-07-2008
On 2008-07-07 22:02 +0100, ssecorp allegedly wrote:
> import java.awt.image.PixelGrabber;
>
> public class Main {
>
> public static void main(String[] args) {
> int w = 50;
> int h = 50;
> int[] pixels = new int[w * h];
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> }
>
> }
>
> init:
> deps-jar:
> Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
> \JAItest\build\classes
> C:\Users\saftarn\Documents\NetBeansProjects\JAItes t\src\jaitest
> \Main.java:11: cannot find symbol
> symbol : constructor
> PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
> location: class java.awt.image.PixelGrabber
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> 1 error
> BUILD FAILED (total time: 0 seconds)


> I don't get the exact complaint here.


It's complaining that a java.lang.String is not a java.awt.Image. Read
the ****ing Javadoc.

> and why am i filling in "w" in
> the end again?


If you wrote the code, you ought to know best why.

> http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html


Unless you are really working with 1.4.2, use up-to-date documentation:
<http://java.sun.com/javase/6/docs/api/>

--
DF.
to reply privately, change the top-level domain
in the FROM address from "invalid" to "net"
 
Reply With Quote
 
 
 
 
Knute Johnson
Guest
Posts: n/a
 
      07-07-2008
ssecorp wrote:
> I odnt get the exact complaint here. and why am i filling in "w" in
> the end again?
> http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html
>
>
> import java.awt.image.PixelGrabber;
>
> public class Main {
>
> public static void main(String[] args) {
> int w = 50;
> int h = 50;
> int[] pixels = new int[w * h];
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> }
>
> }
>
>
> init:
> deps-jar:
> Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
> \JAItest\build\classes
> C:\Users\saftarn\Documents\NetBeansProjects\JAItes t\src\jaitest
> \Main.java:11: cannot find symbol
> symbol : constructor
> PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
> location: class java.awt.image.PixelGrabber
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> 1 error
> BUILD FAILED (total time: 0 seconds)


Lose the PixelGrabber it is only going to give you grief. Use the
ImageIO class to read in your images and access the pixel data from the
BufferedImage.

--

Knute Johnson
email s/nospam/knute2008/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-08-2008
On Jul 8, 6:32*am, Daniele Futtorovic <(E-Mail Removed)>
wrote:

> >http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html

>
> Unless you are really working with 1.4.2, use up-to-date documentation:
> <http://java.sun.com/javase/6/docs/api/>


I sometimes have trouble producing direct links
to the SE 6 JavaDocs when searching 'ClassName+javadoc'
in a major search engine. It tends to throw up
hits for 1.4.2.

Perhaps that is where this '1.4' link originated from.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Tom Anderson
Guest
Posts: n/a
 
      07-08-2008
On Tue, 8 Jul 2008, Andrew Thompson wrote:

> On Jul 8, 6:32*am, Daniele Futtorovic <(E-Mail Removed)>
> wrote:
>
>>> http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html

>>
>> Unless you are really working with 1.4.2, use up-to-date documentation:
>> <http://java.sun.com/javase/6/docs/api/>

>
> I sometimes have trouble producing direct links to the SE 6 JavaDocs
> when searching 'ClassName+javadoc' in a major search engine. It tends
> to throw up hits for 1.4.2.
>
> Perhaps that is where this '1.4' link originated from.


I think this is a very likely explanation. I assume that there are a lot
of links out there on the web which point to the 1.4.2 docs, and thus
these have more googlejuice than the newer ones.

A tip someone here suggested a while ago, which i've found very useful, is
to add 'SE-6' to your search, which means you'll always get the 1.6
versions.

tom

--
A military-industrial illusion of democracy
 
Reply With Quote
 
ssecorp
Guest
Posts: n/a
 
      07-08-2008
import java.awt.image.BufferedImage;
/**import java.awt.event.*;*/
import java.awt.image.PixelGrabber;
import java.io.File;


public class Main {

public static void main(String[] args) {
int w = 50;
int h = 50;
int[] pixels = new int[w * h];
/**BufferedImage image = BMPDecoder.read(new File("C:/users/
saftarn/desktop/images/giffer.gif"));*/
File pic = new File("C:/users/saftarn/desktop/images/
giffer.gif");
PixelGrabber pix = new PixelGrabber(pic, 1, 1, w, h, pixels,
0, w);

}

}



init:
deps-jar:
Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
\JAItest\build\classes
C:\Users\saftarn\Documents\NetBeansProjects\JAItes t\src\jaitest
\Main.java:15: cannot find symbol
symbol : constructor
PixelGrabber(java.io.File,int,int,int,int,int[],int,int)
location: class java.awt.image.PixelGrabber
PixelGrabber pix = new PixelGrabber(pic, 1, 1, w, h, pixels,
0, w);
1 error
BUILD FAILED (total time: 0 seconds)
 
Reply With Quote
 
Hendrik Maryns
Guest
Posts: n/a
 
      07-08-2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Anderson schreef:
|> I sometimes have trouble producing direct links to the SE 6 JavaDocs
|> when searching 'ClassName+javadoc' in a major search engine. It tends
|> to throw up hits for 1.4.2.
|>
|> Perhaps that is where this '1.4' link originated from.
|
| I think this is a very likely explanation. I assume that there are a lot
| of links out there on the web which point to the 1.4.2 docs, and thus
| these have more googlejuice than the newer ones.
|
| A tip someone here suggested a while ago, which i've found very useful,
| is to add 'SE-6' to your search, which means you'll always get the 1.6
| versions.

Just ‘6’ suffices. But it’s still annoying.

H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkhzaZQACgkQe+7xMGD3itRAAACfUcyyYsDzao VM7VaiLW+p0qfH
WQoAn2ODbvZJf8POE6A9EmwPVyYgvL+k
=WSdW
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      07-08-2008
Winifred Mansfield wrote:
> On Jul 8, 6:32 am, Daniele Futtorovic <(E-Mail Removed)>
> wrote:
>
>>> http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html

>> Unless you are really working with 1.4.2, use up-to-date documentation:
>> <http://java.sun.com/javase/6/docs/api/>

>
> I sometimes have trouble producing direct links
> to the SE 6 JavaDocs when searching 'ClassName+javadoc'
> in a major search engine. It tends to throw up
> hits for 1.4.2.
>
> Perhaps that is where this '1.4' link originated from.


Well, that and a functional resource to read what one is writing and think about
whether the first search hit is the correct search hit.

--
Lew


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[NWO, Skull and Bones, propaganda, brainwash, mind control,
fanatic, puppet, President, war, terror, dictator, totalitarian,
fascis, extremis]

"The Bush family fortune came from the Third Reich."

--- John Loftus, former US Justice Dept.
Nazi War Crimes investigator and
President of the Florida Holocaust Museum.
Sarasota Herald-Tribune 11/11/2000:

"George W's grandfather Prescott Bush was among the chief
American fundraisers for the Nazi Party in the 1930s and '40s.
In return he was handsomely rewarded with plenty of financial
opportunities from the Nazis helping to create the fortune
and legacy that his son George inherited."

 
Reply With Quote
 
Daniele Futtorovic
Guest
Posts: n/a
 
      07-08-2008
On 2008-07-08 14:42 +0100, Tom Anderson allegedly wrote:
> On Tue, 8 Jul 2008, Andrew Thompson wrote:
>
>> On Jul 8, 6:32 am, Daniele Futtorovic <(E-Mail Removed)>
>> wrote:
>>
>>>> http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html
>>>>
>>>
>>> Unless you are really working with 1.4.2, use up-to-date documentation:
>>> <http://java.sun.com/javase/6/docs/api/>

>>
>> I sometimes have trouble producing direct links to the SE 6 JavaDocs
>> when searching 'ClassName+javadoc' in a major search engine. It tends
>> to throw up hits for 1.4.2.
>>
>> Perhaps that is where this '1.4' link originated from.

>
> I think this is a very likely explanation. I assume that there are a lot
> of links out there on the web which point to the 1.4.2 docs, and thus
> these have more googlejuice than the newer ones.


It may be an explanation. I don't see, however, why an explanation is
called for in this case.

> A tip someone here suggested a while ago, which i've found very useful,
> is to add 'SE-6' to your search, which means you'll always get the 1.6
> versions.


We're talking about 1.4 versus 1.6 here, ergo we're talking about the
Java SE. In that case, I fail to understand why you want to access that
documentation via a search engine. There's a perfectly usable main page
for that:
<http://java.sun.com/javase/6/docs/api/>

Accessing the doc that way doesn't take more time than via a search
engine. Accessing it via a search engine is rather absurd, IMHO, and
more importantly a bad habit -- again: IMHO. Someone noted recently in
this NG, I think, how people tended to disregard URLs and rely on the
search engine input field more and more. I think that's a rather
debilitating attitude. It's certainly an attitude that's encouraged by
the major browsers, and Google is certainly a tremendously useful tool.
Yet I dread the factuality of a Google monopoly of access to the web.
They were able, to this day, to counter-balance such fears, seeing how
they are relatively well-behaved. But beware of the beginnings.

--
DF.
to reply privately, change the top-level domain
in the FROM address from "invalid" to "net"
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-08-2008
On Jul 8, 6:32=A0am, Daniele Futtorovic <(E-Mail Removed)>
wrote:

> >http://java.sun.com/j2se/1.4.2/docs/...elGrabber.html

>
> Unless you are really working with 1.4.2, use up-to-date documentation:
> <http://java.sun.com/javase/6/docs/api/>


I regardless have indirection constructing direct links
to the SE 6 JavaDocs when searching 'ClassName+javadoc'
in a major search aphrodesiac. It tends to throw up
hits for 1.4.2.

Perhaps that is where this '1.4' link subdued from.

--
Winifred MacNab
http://pscode.org/


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Consider that language a moment.
'Purposefully and materially supported hostilities against
the United States' is in the eye of the beholder, and this
administration has proven itself to be astonishingly
impatient with criticism of any kind.

The broad powers given to Bush by this legislation allow him
to capture, indefinitely detain, and refuse a hearing to any
American citizen who speaks out against Iraq or any other
part of the so-called 'War on Terror.'

"If you write a letter to the editor attacking Bush,
you could be deemed as purposefully and materially supporting
hostilities against the United States.

If you organize or join a public demonstration against Iraq,
or against the administration, the same designation could befall
you.

One dark-comedy aspect of the legislation is that senators or
House members who publicly disagree with Bush, criticize him,
or organize investigations into his dealings could be placed
under the same designation.

In effect, Congress just gave Bush the power to lock them
up."

-- William Rivers Pitt

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What could the compiler be possibly complaining about parag_paul@hotmail.com C Programming 4 03-09-2008 08:44 PM
Python complaining about CherryPY? Thomas McLean Python 0 08-19-2006 07:56 PM
convertDateTime keeps complaining about the format KevinLEdwards@gmail.com Java 2 02-19-2006 12:38 AM
Apache SOAP on Tomcat complaining about serializer codehead Java 3 06-13-2005 07:28 AM
To those few complaining about DVDFile... Brian The Demolition Man Little DVD Video 5 11-15-2004 06:57 PM



Advertisments