Is there any method which reflects the names of classes of java?

is there any method with which dynamically we can get all the packages's name along with their classes of java(specially core classes of java)?if not how can we do that?

The resource from which the Java VM loads the classes is considered to be implementation dependent. It may be class files or jar files contained in a file system hierarchy, or some kind of remote database. The now defunct Microsoft VM used a database repository that was able to reside on a remote class server within a network domain.
Unfortunately, Sun did not design a class resource service interface with a "list resources" function, only a "get resource" function. You can get the class resource for any named class, but you cannot list packages or classes within a package or at the root level.
This is further complicated by the fact that there is no such thing as an "installed package" as Java does not define any package installation system. The packages available to any runtime instance of the JVM is defined by the classpath properties passed from the OS. Different JVM instances can have completely different sets of available packages because they were passed different classpath values by the OS.
If you know the class resource of the runtime environment, then you could create a subclass of the sun.misc.URLClassPath class and add to it methods that will list packages and classes found within a package using the interface of that known class resource.
Most runtime environments use a standard hierarchical file system to hold jar and class files. A subclass of sun.misc.URLClassPath could use the java.io.File class to traverse the file system classpath paths in search of package directories and class files (Watch out for recursive directory links).
The root packages can be obtained from the three levels of classpath paths in the System properties used by the JVM:     "sun.boot.class.path"
     "java.ext.dirs"
     "java.class.path"The collection of file system paths obtained from these properties would be searched for the names of the root level package directory names. Just remember that this will only work in a runtime environment that only uses this kind of class resource. If you run this where some other resource is also used, you will not see all of the packages available to that JVM.
One note of caution: A single directory can hold package directories, jar files, and class files that belong to a specific package, but the package may include other package directories, jar files, and class files that are contained in other directories. Pieces of a single package may be strewn throughout the file system. The only way to find them all is to scan all of the classpath paths for that same package name. The directory does not define the package, it only provides more content for that package.
I hope you find this of some use.

Similar Messages

  • Is there any  way to Mask the Name when  a select statement is issued?

    Dear all,
    Is there any way to mask the name .. i mean if User issue a select statement in a customer table the real name should come like ' ABCXXXDEFXXCFXX'... Which is not the actual name?
    e.g if Name: CHIEV SONG MEE
    If user issue a statment select * from customers;
    The Result Should come something Like this:
    Name
    CHXXV SXNG MXX
    Thank You

    user3029023 wrote:
    but it seems there is no option in oracle it self which can be used as there they are saying to get a data masking software which we can't due to some internal issues....I would not say that. How one implements masking depends entirely on the requirements that need to be met.
    For example, schema A owns all the tables. Schema B can be created as a "trusted" schema - in other words, schema A trusts schema B and allows it full access (with grants) to its tables. Schema B implements data masking as views. For each table in A, a view exists in B that implements the required masking. B can now grant select access on these views to user C. User C will see the same data object names in B as it would have if it used A - only, by using the B data objects it uses masked data objects and not the original source data objects.
    Another example - schema Dev is to have all the data objects of schema Prod, but masked where needed. One can use CTAS (Create Table As Select) to create the required tables in Dev with masked values where relevant. This Dev schema can be "refreshed" on weekends by dropping all tables and getting a new fresh copy of production data and masking it - ready for the next week's development cycle.
    If the application use is for example APEX, then instead of coding SQL directly as reporting regions to display, a function is used instead. APEX supports reporting regions where it calls a function and this function provides the APEX run-time with the SQL to execute and contents to render. It is easy to use this approach to implement logic in functions that masked column data depending on who the APEX user is, the security/role attributes of the user, and so on.
    No there is not a single "+mask this column!+" feature in Oracle.. but that does not mean that such a feature is not supported and cannot be implemented. Oracle has a very comprehensive and rich set of tools - more so than most (if not all) other RDBMS products.
    It is up to the architect/designer/developer to use this toolkit in creating a system that meets the specific requirements at hand.

  • Is there any method to remember the running subtitle and audio stream when navigating through menus?

    I have a language Menu named 'Setup' with 4 buttons 1.English  2.Spanish  3.Spanglish  4.Subtitle Off.
    To reach this page you have to hit Setup button on Main Menu. The setup button takes to a sub-menu of Setup where I have a symbol of 'tick' at Subtitle Off indicating the state of the current subtitle stream. I have 3 more sub-menus with similar buttons but with 'tick' at different languages indicating the state of the current running/selected language, 2nd page has English with tick, 3rd page has Spanish with tick and 4th has Spanglish with tick. My client wants me to jump on the respective language ticked page when you hit the setup button on Main Menu. As far as I understand we cannot assign a code in Encore to a single button to read what subtitle stream is running.
    Is there any method to remember the running stream when navigating through menus?
    I have done this in Sonic Scenarist.
    Regards,
    A Gandhi

    I think this was added in a "newer" version of Encore (meaning anywhere from CS4 up). In any event, it is available in Encore CS6.
    There is a menu (not button) property that allows yoi9u to make the active subtitle track button the default (i.e. selected/highlight shows) just as you want.

  • Is there any method to export the data from oracle 10g in any format !!!!!

    is there any methods to export the data from oracle 10g in the format of excel or csc or txt or anyother. i already downloaded the sql developer tool but it only exports the data of upto one lakh rows ,but i have two tables of more than 3 lakh and 10 lakh rows respectively.for this i used 'where' command to break the file through sql developer but that didnt work
    plz help me out if any thing possible
    i need to again import this data into microsoft sql if there is any direct method plz let me know
    its urgent
    Message was edited by:
    user628031
    Message was edited by:
    user628031

    Take a look at DUMP_CSV function by Tom Kyte.

  • ***Is there any listener which trigger the method when KEYUP?

    Hi,
    Is there any listener which can trigger the backingBean method when KEYUP!!!!
    Basically, I got 2 input box in the UI where the 2nd box getting enabled when user enters some value in the first box and tab out. I am doing this via valueChangeListener which has attached with first inputBox. But now I want to enable the 2nd input box as soon as the user start enter the value in the first box, how to do this plz..
    thanks
    kln

    Hi klogube,
    If you want to call method in backingbean from javaScript you should use both clientListener And serverListener as:
    1- Add clientListener inside your inputText as :
    <af:clientListener type="KeyUp" method="keyUp"/>2- write javaScript function as :
    <af:resource type="javascript">
        function keyUp(event) {
           var source = event.getSource();
           AdfCustomEvent.queue(source,"callServerListener", {}, false);
    </af:resource>3-Add serverListener inside your inputText as :
    <af:serverListener type="callServerListener" method="#{backingBeanScope.txnBean4.keyUpMethod}"/>Your InputText will be like:
    <af:inputText label="Label 1" id="it1">
          <af:clientListener type="KeyUp" method="keyUp"/>             
          <af:serverListener type="callServerListener" method="#{backingBeanScope.txnBean4.keyUpMethod}"/>
    </af:inputText>4- The java method:
    public void keyUpMethod(ClientEvent event){
    // do whatever u want
    }Sameh Nassar

  • Is there any function to get the name of the days?

    Hi,
    I'm using oracle 10.2.0.1.0
    Is there any function to get the days of the week?
    like i need to get sunday,monday,tuesday.....saturday.
    I know i can use union and select the name from dual one by one.
    But just want to know whether there is any other way.
    I need to show the 7 days in a poplist in my form, thats the requirement
    Thanks

    David_Aldridge wrote:
    BluShadow wrote:
    Note: you may want to include "fm" in the format mask, otherwise the name of the day is padded with spaces:
    SQL> ed
    Wrote file afiedt.buf
    1  select replace(to_char(dt,'Day'),' ','*') as fmt1
    2        ,length(to_char(dt,'Day')) as length_fmt1
    3        ,replace(to_char(dt,'fmDay'),' ','*') as fmt2
    4        ,length(to_char(dt,'fmDay')) as length_fmt2
    5  from (select TRUNC(SYSDATE ,'DAY')+Level-1 dt
    6        from   dual
    7        connect by Level<8
    8*      )
    SQL> /
    FMT1      LENGTH_FMT1 FMT2      LENGTH_FMT2
    Monday***           9 Monday              6
    Tuesday**           9 Tuesday             7
    Wednesday           9 Wednesday           9
    Thursday*           9 Thursday            8
    Friday***           9 Friday              6
    Saturday*           9 Saturday            8
    Sunday***           9 Sunday              6
    7 rows selected.
    SQL>
    I think you should use a pl/sql function for this.
    Nah ... just joking.
    I'd be tempted to just use a union all statement to return the seven literals. People will look at it and know exactly what it does.Yeah, agreed, I was just demonstrating that the format mask of a to_char(..., 'Day') pads with spaces, which seems to have been missed in the above answers. ;)

  • Is there any Method to remove the request from STMS OR SE10 OR SE09

    HELLO ALL ABAP GURUS,
    Is there any Method to remove or delete the request from STMS OR SE10 OR SE09 ?
    Thanks,
    Sumit.

    Hi,
    Before deleting a transport request you need to unlock all the objects in a transport request. Please follow these steps.
    1. Go to SE03. Under Requests/Tasks folder in the left pane you can see Unlock Objects, double click on that.
    2. Enter your request number (sub task) there and click on execute button.
    3. SAP will prompt you with a message, click on Unlock button.
    4. Now go to SE09/SE10 and click on your request number (sub task) and click on delete button on the application toolbar.
    5. Now click on main task and click on delete button to completely remove the request number.
    Hope this will help you.
    Regards,
    Venkat

  • Is there any method to deactivate the execute button?

    Hi Experts,
      I have created a ztransaction for a report program. When i execute the transaction the 'execute' button comes automatically in the application toolbar. Is there any method to disable it??

    Get the function code for that execute button(PLace the cursor on that button using the TAB key and press F1 to know the Fcode for that button).
    then use the following statement in the set pf-status
    set pf-status 'STATUS' excluding '<Fcode for exec button>'.
    Regards,
    ravi

  • Is there any way to change the name of my home folder?

    It's called 'kristixhill' - I was recently married and want it renamed. Any suggestions?

    Congratulations on getting married!
    There's a method described [here|http://support.apple.com/kb/HT1428]. Bascially it involves logging in as the "root" user and making a new home folder with the name you want and then creating a new user with the name of that new folder.
    Make sure you backup your data before doing this.
    /p

  • Is there any table which records the no. of Jobs run in day in BIP ?

    Hi All,
    I want to create a metadata report on what all jobs ran in my BIP production in a day. Is there any repository where this is recorded?
    Please let me know.
    I am in 10.1.3.4 and using oracle database
    Thanks,
    Ronny

    Hi Ronny
    All the reports the are scheduled the history will be stored in the backend table XMLP_SCHED_JOB.It will create a unique job_id.
    Based on this table u can create a report in BIP using the RTF template.....

  • Is there any method of telling the software to look at a network location for the mozilla.cfg

    I run in a locked down environment, and I would like to know if there is a way to have a central mozilla.cfg file stored on a network location. This is for ease of management. I know you can obviously push out a mozilla.cfg to the normal location via log in script but I have a need to have the file redirected to a network location. TIA.

    hey there.
    both methodes dont work :/
    i want to store the mozilla.cfg file on a network server..
    lockPref("autoadmin.global_config_url", "file:///F:/firefox/mozilla.cfg");
    and
    lockPref("autoadmin.global_config_url", "http://example.com/mozilla.cfg");
    didnt work.. i dont lockdown the proxy settings on the clients..
    please help me i search since 1 week :/
    greetz Marsich

  • Is there any method to get page name in managed bean? jsf2.0

    Please help. Want to get page name in managed bean (application scoped). Page invoke bean through actionListener method.
    Thanks in advance.

    So, two solutions:
    FacesContext.getCurrentInstance().getViewRoot().getViewId() - actual page
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap().get("referer") - url in browser

  • Is there any way to get the canvases names on the form

    i have a form in Orcle 6i
    i want when the form load i get the names of the Canvases on the Form automatically
    to change their visual attribute
    is there any way to get the name of the canvases on the form automatically
    Thanks in advance

    The amount of time to evaluate each item in a Form is a lot less than you think. You are dealing with milliseconds. Worse case scenario, you might add 1 second to your form load time.
    I think Francois's suggestion is the best solution, but if this is still too much time, you might concider creating strategic When-New-Item-Instance triggers on an item in each of your canvases that would perform what you want to do.
    This will most likely cause problems of its own, but it is an alternative.
    Food to get the thought process flowing... :-)
    Craig...

  • Is there any way to see the iPhone home screen in an lcd tv?

    Just bought the HDMI adapter for mi iPhone4 and it plays videos very well, but is there any method to see the home screen and the apps in real time from the phone to my TV?

    if u have a tv screen near by then can use a hdmi cable that comes for iphone 5 to mirror it
    but i dont think there is an app for mirror without wifi

  • Any method to Import the data from Ingres Database to Oracle Database

    Hi,
    Is there any method to import the datas from Ingres Database to Oracle Database,
    Thanks in Advance.

    Check out this link.
    HTH...

Maybe you are looking for

  • How to deal with "criminals" in the appstore?

    I have discovered a developer, Brian Hall, the creator of games such as Elven Knight, Pegasus Flight, Temple Run and many more games, that i beIieve can be marked as a criminal. His games are totally worthless, they are all exactly the same except fo

  • Print of Component List from Production Order

    Hi Everyone, How do we print the list of components which will be used in Production Orders? The scenario is that we have the components in WM bins. As soon as the production Orders are confirmed, we need to print a list of all the components which a

  • Problem inserting DVD

    I can't insert disc in my iMac. It seems like a disc is already inserted, but it's not

  • My purchased in the app store is not working

    my purchased in the app store is not working

  • Purchased ringtone, but can't move to "ringtones" on iTunes

    I've downloaded a ringtone for my iPhone 4 from "100 most popular ringtones" on iTunes. Oddly, it doesn't appear to be an actual ringtone. When imported into my "Music" section of iTunes, it will not allow me to drag-and-drop it into "ringtones." I'v