It's not a secret anymore!*
The moose likes IDEs, Version Control and other tools and the fly likes Methods in java class files are not recognized. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Methods in java class files are not recognized." Watch "Methods in java class files are not recognized." New topic
Author

Methods in java class files are not recognized.

Girish Kodaganti
Greenhorn

Joined: Feb 09, 2007
Posts: 2
Hi,

I am facing very basic issue! Please help me in to resolve this.

Problem:
I need to call a service and I have the client code in the jar file. I am not able to access the methods in the client.java(a file in client.jar).

Even the eclipse is not recognizing those methods. The outline tab in eclipse doesn't showing the methods. All the methods are public.
I am not sure why this is coming up, this issue is blocking me
Please help me if any one of you know the solution.
Thanking you in advance.

Thanks and Regards,
GK
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You have to put the JAR file in the classpath, or in Eclipse, add it to the dependency list of the project (right-click the project, choose Properties, Java Build Path, Add JARs or Add External JARs).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Girish Kodaganti
Greenhorn

Joined: Feb 09, 2007
Posts: 2
Yes Young. The jar is already added to the dependencies. I am able to navigate to that file {pressing F3 in eclipse}.

In that class if I am trying to search for that particular method using {CTRL + SHIFT + O} I am not getting the method in that list. I could able to see that method implementation in that class. I am really wondering why this is happening!
First time am facing this weird behavior.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What OS? For me, Ctrl-O works, Ctrl-Shift-O isn't bound to anything by default.

Moving to IDEs.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Except you forgot the move


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Andre Brito
Ranch Hand

Joined: Dec 13, 2007
Posts: 95

Try to remove the jar, clean the project and put it again.

In Windows, it's Ctrl + Shift + O to organize the imports.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Methods in java class files are not recognized.
 
Similar Threads
Exception in thread "main" java.lang.NoClassDefFoundError:
Eclipse indigo
Error message on running the java code from Eclipse
creating a jar for nokia sdk
tomcat formAutheticator problem