Click Here

This is what I get when I run the code. Please help me fix this.

EDIT: A lot has changed since 2008 so idk how to upload the image so I just made a link for it.

Edited 3 Years Ago by kilermage

trust me, with that image on it's own, we can just see what line the problem is in, but since there's no line in the editors, we don't even know what line that is. you'll have to give some extra information here.

mat1998x: it's also possible there's a dependency issue. no proof that this is a problem related to his eclipse or Java install.

Can also be library or reference problem. Try to run it on another machine maybe?

Well I normally run the program through a .bat and I wanted to see how it'll run on the Eclipse, but that's what appears when I run it through there.

EDIT: Also the line thats highlighted in the pic is the line that calls out the error.

Edited 3 Years Ago by kilermage

Go to the "Problems" tab in the window at the bottom (currently showing "Console") to get a complete list of all the compilation errors that the red underlines are flagging. That will give you complete error descriptions that you or we can use to fix this.

All those "cannot be resolved" messages are telling you the compiler has encountered a name that has no definition, eg client, Item, ItemHandler ...
Some probable causes include:

  • Mis-typed name (eg capitalisation)
  • Trying to use name outside the scope in which it's defined (eg using a method's local variables outside the method)
  • Trying to access private members from outside the class
  • A syntax error that confuses the compiler about the context where this name is being used.
  • Incorrect package structure
  • Missing package or import statement(s)
  • Missing jar / jar not in class path
  • (etc etc etc)

You can click on each message to see the exact line of source code.

Edited 3 Years Ago by JamesCherrill

Thanks a lot, what its doing is calling the line like ex: parseincomingpackets(); but its not in the file, its in the so I get it up to be called like

public void example(client c) {

and in the file its written like ex:

public void example2() {

and the imports are this ex:

import src.*;
import java.util.StringTokenizer;
import java.util.Calendar;
import java.util.GregorianCalendar;
import src.client;

I uploaded a pic to better explain what im trying to say. EDIT: Btw what you see in the pic is line 19, the first error that is in the problems tab and pretty much all the errors are exactly the same.

Edited 3 Years Ago by kilermage

Attachments errorline1.jpg 190.44 KB

Its hard just seeing fragments like this, but it looks to me like there are missing import statements for client etc in, etc

might also be that the import statements are there, but the packages are not in the scope/path of that project, so can't be found.

^ yes, but the errors he has posted so far don't include any relating to the inports - if the import was there but the file couldn't be found then you would expect that to be the first error in the list.

Ok here I uploaded the imports of and from along w. the setup of folders and files.

Attachments setup.jpg 155.65 KB imports1.jpg 112.38 KB imports2.jpg 106.8 KB
This question has already been answered. Start a new discussion instead.