?
Solved

Searching for classes with incomplete name

Posted on 2003-02-24
5
Medium Priority
?
163 Views
Last Modified: 2010-03-31
Hi !
I'm looking for a method to find a particular class without know it full name..
For example :
The real name is com.mycompany.myapp.mymodule.myclass.class
I have only mymodule and myclass.
I have already done an kind of search engine but using classpath and searching also into jar files recursively...
It is very slow... so I'm looking for a more efficient method, scalable and full java...
An Idea ?
0
Comment
Question by:newbeewan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 8008731
> so I'm looking for a more efficient method, scalable and full java...

  I am afraid there isn't any more efficient method. You would still have to check all files in the classpath since you do not have the top level name availabe but only the last two. So in any case you still have to check every single path till you fidn a folder that matches the "mymodule".
0
 
LVL 35

Accepted Solution

by:
girionis earned 800 total points
ID: 8008745
 .. on second thought you might want to store all classpath into memory (or into a file) and check it every time. Then find the location to the class you want and load it straight away.
0
 

Expert Comment

by:CleanupPing
ID: 9059113
newbeewan:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9671340
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept girionis' comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question