Can you find out what packages a class has imported?

Hi all, I start my final year at uni in september and at the moment i'm just experimenting with stuff while i try and decide what to do for my final year project.
Without going into too much detail what i want to be able to do is for the client to "submit" a class file that is then dynamically loaded and run on the server. Obviously this has security implications so what i was wondering was if it is possible to determine what packages a class has imported from the actual classfile.
I've looked through the vm spec but haven't been able to find anything theyre that looks like it'll help. Any suggestions or ideas (or solutions!) would be much appreciated.
Thanks. Matt.

You could use the Class.getDeclaredClasses() to see the class types that exist as members, but that won't do you any good since the class will have already undergone static initialization within your VM, and the security breach would have already been made. You could inspect the constant pool in the class data to check what other classes are referenced but then that brings up several questions:
1 - How do you know which classes are bad? Even if you define a set, copies can be created in new packages (or simply aliased) so that the list is invalid.
2 - How do you know the class you are loading is not malicious? A client class may not reference any external class but may be malicious itself.
3 - The offending class might use reflection exclusively to reference classes without leaving a trace in the class file. This would be absolutely impossible to detect.
Your only choices are (a) to use signed classes, and make it the responsibility of someone to review the classes and sign them, or (b) install your own Security Manager to catch all prohibited activity, or (c) check as classes are referenced in the classloader. Option (a) is the best method, but (b) or (c) might work in a very restricted environment.

Similar Messages

  • How do I find out what Package a class is in

    I am trying to find out what Package the classes XMLNode and XMLInterface are located in. Is there a way to search for a class to find out what package it is held in ?
    Quite often I see example code but spend wore time working out what package the class is in than actually writing code. Am I being really stupid ? (Don't answer that !!)
    Many thanks for any tips
    Dan

    you can find the class path by searching the $JAVA_TOP directory.
    Login to apps server.
    cd $JAVA_TOP
    find . -name "Classname.class"
    --Prasanna                                                                                                                                                                                                                                                                                                                   

  • How can you find out what generation your iPod touch is?

    How can you find out what generation your iPod touch is?

    Hi,
    Here is help for the operating system:
    If you are locked to iOS 3 then you have an iPod Touch 1st Gen.
    If you are locked to iOS 4 then you have an iPod Touch 2nd Gen.
    If you are locked to iOS 5 then you have an iPod Touch 3rd Gen.
    If you are locked to iOS 6 then you have an iPod Touch 4th Gen.
    If you can get iOS 7 and have an iPhone 5 sized screen [bigger] you have the current iPod Touch 5th Gen.
    I assume since it says you have iOS 5.1.1 you have an iPod Touch 3rd Gen.
    Also, you may want to sync it so iTunes can tell you or you can look at the model number on the back.
    Hope this helped.

  • HT4211 how can you find out what kb are being used by what apps

    how can you find out what kb are being used by what apps there is always alot of kb being used even when I don't use my phone

    Go into settings , general, usage and it tells you what the apps use. If your refering to the memory storage of the apps.

  • How can you find out what time you were on a website on on your iPod?

    How can you find out what time and day you were on a certain website on your iPod?

    You can find the day in Safari's History, but not the time.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • How can you find out what launches / runs something else?

    In poking around with my system trying to get it to run things for all users, at some point in the past I did something which causes a script to run when ever I log in.
    This script is located in the application directory, and if I put any script called Login.sh there, it runs. It runs for any user too.
    I have no idea what I did to cause this and I can't figure out a way to find out who is launching it.
    I looked in the loginwindow.plist files, the com.apple.loginwindow.plist files, the ttys file in /etc and in the RC files too.
    Is there an easy way to find out (maybe by putting something in that login.sh script) what is running it? I know it is the 'root' user.
    I thought maybe if I could search all files on my HD for the word "Login.sh" I could find the culprit. I do not know how to do that though.
    Any ideas?

    You look up the process in the same output and find out what the parent process is. (after crossing your fingers and hoping it's not something generic like launchd)

  • W can you find out what is in your icloud

    I can I find out just what is stored in icloud.  Having trouble with photo stream for pictures loaded on iphone taken prior to buying the ipad.

    Having trouble with photo stream for pictures loaded on iphone taken prior to buying the ipad.
    Nancy...
    Try here >  iCloud: Photo Stream Troubleshooting

  • How can you find out what number comment you are on within the comments list?

    Hi everyone,
    I have looked around but I cannot seem to find an answer to what seems a very simple request.
    I have a PDF with over a hundred comments on it and I am making (slow) progress through the comments list. I would like to estimate how long this job will take me to complete by looking at the time I have spent on the job and a which comment number I am at (e.g. I am currently at comment 60 of 120 - half way through).
    I cannot seem to find a way to do this without manually counting the number of comments I have been through already - which seems a watse of my time.
    Is there an easy way to do this? I am sure I am missing something simple here.
    Thanks in advance,
    twordz

    Sorry, I guess I mis-spoke. I thought that it will be numbered sequentially
    for the entire document, but I guess it's per page.
    The problem with numbering comments is that their internal order does not
    necessarily correspond to their physical location in the file. The internal
    order is based on the order in which they were created. Having said that,
    it is possible to generate a summary of the comments with sequential
    numbers for the entire file (not just page by page), but it would require a
    custom-made script.

  • How can i find out what cursor the user has selected on an xy graph?

    I have an XY graph in which while the program runs it will be creating cursors in certain locations on the plot. I want to give information about this cursor when selected upon, I THOUGT that active cursor does this.. but appreently not.. it seems to jsut keep spitting out 0, any ideas?

    > I have an XY graph in which while the program runs it will be creating
    > cursors in certain locations on the plot. I want to give information
    > about this cursor when selected upon, I THOUGT that active cursor does
    > this.. but appreently not.. it seems to jsut keep spitting out 0, any
    > ideas?
    You might look at the Selected Cursors property. It indicates which
    cursors will be acted upon by the movement palette. It should be
    equivalent to the small LED buttons on the cursor palette.
    Greg McKaskle

  • How can you found out what computers you are home sharing so you can delete some, How can you found out what computers you are home sharing so you can delete some

    How can you find out what computers you are sharing with so you can delete some

    Oh, have you brought up so many good points. Not to take us off-topic, but I could rant all day about Eloqua consulting firms who let low-level employees (Eloqua skill-wise) loose on clients projects. Just not fair for either the employee or client. There was one company that did this to me a few years ago, and since then dozens of people have asked me about them for a reference.  Needless to say, they never get a good one from me, and have likely lost hundreds of thousands of dollars in projects because of this. Not worth it in the long-run to cut corners.
    Back to the topic at hand....
    You really hit the nail on the head in so many ways. It really all does come down to one thing: hard work. There are no shortcuts. Always keep learning. Embrace every Eloqua challenge you can, and never say never.  Never be fearful of being wrong by asking something 'silly', or 'looking stupid'. I remember several times that I've submitted Eloqua support tickets, or tickets to other related vendors about things that I was convinced were bugs/major issues. Turned out to be my mistake. But that's ok. You brush off, stand back up, and learn from them.
    And finally, be modest.  You will never know everything about Eloqua. Be willing to learn from others, and know that there actually may be a better way to do something than you may have spent days or weeks working on.

  • HT1353 By the serial number can I find out what generation iPod touch

    By the serial number can you find out what generation your iPod touch is??

    Hi stedman, getting back the generation number when inputting the serial number is a new offering on the warranty checking page, isn't it?
    Very useful though. That should put a stop to the "8GB 3rd gen" merchants!
    Double !

  • Where can I find out what the rules are for extracting Purchase Orders?

    Hi all,
    Relating to BI 7.0, ECC 4.6
    From a business perspective we are looking to be able to identify ALL the rules/criteria for Purchase Orders when they are extracted in ECC to BI.
    The datasource is 2LIS_02_ITM
    For example deleted PO items are not extracted to BI, nor where LOEKZ (Memory flag =X).
    In brief there is criteria that identifies which PO items are extracted.
    Where can I find out what ALL of these conditions for extraction are?
    I have looked in the extractor program MCEX_BW_LO_API and there is a class for filling the a table but I cant see any criteria here to how it decides WHAT to extract i.e where in the code the criteria is set.
    Also this of course could be set in customizing somewhere?
    Anybody know where?
    Thanks in advance.
    Steve Jones

    you can also check the start routines in BI for 2LIS ITM, there are a few exclusions and PO deletions there.
    you can find more information in SAP Notes.
    reagrds
    Ramesh

  • I have two iPhones on my iTunes account. How can I find out what apps go to which phone?

    I have two iPhones on my iTunes account. How can I find out what apps go to which phone?

    I don't believe that there is a way to do that.  I would sugest using automatic downloads to keep your apps synced across both phones.  You might also want to note that just about any app you have ever download will be available for free download via icloud.
    Wish I could be more help.

  • I am trying to add my sons email address to our family apple id but it says that it already associated with another apple id. How can i find out what the apple id is and take his email address off that one?

    I am trying to add my sons email address to our family apple id but it says that it already associated with another apple id. How can i find out what the apple id is and take his email address off that one?

    You may be able to find your Apple ID at Look up your old and forgotten Apple ID

  • How can I find out what calendars are in my .mac account?

    A simple question, but I am struggling with the answer.
    I have used ical since it first came out and have found it brilliant and very easy to use and access both from the office and also from home. However because I have used it for so long I have had various changes in staff. I am keen to find out if there are any 'other' calendars created by anyone who has/had access to ical via my .mac account.
    The calendars must be stored somewhere online? How can I find out what calendars I am hosting?

    Hello, chunnyb. 
    Thank you for visiting Apple Support Communities. 
    Here are the steps on how to view your purchase history in iTunes. 
    iTunes Store: See your purchase history and web order numbers
    http://support.apple.com/kb/ht2727
    If you need to report and issue with a purchase, see the article below. 
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    http://support.apple.com/kb/ht1933
    Cheers,
    Jason H. 

Maybe you are looking for