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.

Recommended Answers

All 17 Replies

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.

Something is wrong with Java or eclipse, as all of your classes have error's in.

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

i think its directory or path porblem.

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.

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.

Thats the problems tab you requested.

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.

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

public void example(client c) {
c.parseincomingpackets();}

and in the client.java file its written like ex:

public void example2() {
src.handling.example(this);
}

and the imports are this ex:

import src.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.security.*;
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.

Its hard just seeing fragments like this, but it looks to me like there are missing import statements for client etc in Skillinterfaces.java, Packets.java 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 client.java and from Commands.java along w. the setup of folders and files.

Exactly as we guessed.... you are missing the import for client in Commands.

ok how would I go along of adding them ?

Thanks for all the help guys, I was able to figure it out.

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.