Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: implementing interface from encrypted jar

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default implementing interface from encrypted jar

    Hello,

    I have a jar file that is encrypted and I have a class loader that is able to load the classes. In the jar file there is also interfaces that I would like to implement in my main program. How would I go about doing this. I cant find any way of extracting interfaces from jar files.

    If you require more info on what I mean please let me know.

    Thanks Mark.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: implementing interface from encrypted jar

    Is this an encrypted jar, or just a packaged jar? Big difference in that you need to know the encryption to decrypt prior to accessing. If its just a packaged jar file, you need to specify the classpath when compiling and running. There are several ways to do so depending upon how you are compiling and running, so you can google "java classpath" and pull up all the different methods.

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: implementing interface from encrypted jar

    The jar is encrypted like I said in my original message. The class loader decryptes the classes and I can load the classes by doing the following.

    MyClassloader test = new MyClassloader();
    Class AClass = test.loadClass("com.AClass");

    What I want to do is something like this.

    public class TestImplement implements test.loadClass("com.Impclass")
    {
    }

    I have looked at Proxy classes but I dont think what i am doing is possible.
    Last edited by mark111; February 25th, 2010 at 02:40 PM.

Similar Threads

  1. Interface Implementation
    By Samyx in forum Object Oriented Programming
    Replies: 1
    Last Post: December 2nd, 2009, 03:46 AM
  2. what is the use of transient class and serializable interface?
    By chinni in forum Object Oriented Programming
    Replies: 3
    Last Post: October 28th, 2009, 05:48 PM
  3. SOMEONE PLEASE HELP ME ADD THE ACTIONLISTENER INTERFACE...
    By beginning2Understand in forum AWT / Java Swing
    Replies: 5
    Last Post: June 30th, 2009, 12:42 AM
  4. Getting an error while altering a source code
    By marksquall in forum Collections and Generics
    Replies: 3
    Last Post: June 8th, 2009, 02:49 AM
  5. Problem while implementing a basic user interface menu
    By Rastabot in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: April 3rd, 2009, 04:38 PM