Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Methods in java class files are not recognized.

 
Girish Kodaganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Girish Kodaganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What OS? For me, Ctrl-O works, Ctrl-Shift-O isn't bound to anything by default.

Moving to IDEs.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Except you forgot the move
 
Andre Brito
Ranch Hand
Posts: 95
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to remove the jar, clean the project and put it again.

In Windows, it's Ctrl + Shift + O to organize the imports.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic