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: Hi from Kalifornia! and a question

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Hi from Kalifornia! and a question

    Hi from the "left coast" of the US. I've been doing OO programming from the early days of Smalltalk and then on to Java when it came available in several different roles - application design, OODBMS sales support and personal projects: a flight training application and several for personal and friends use. I might be packaging some of the latter up and make them available.

    Glad to find this group!

    The question - I'm developing an standalone application and applet based application (hoping to go live with V1) shortly. In the course of building the jars and "user interaction", there are is one area to support other formats of information which is natural for extension either by me or someone else.

    The architecture is clean between the model, view and controller. Currently 2 of the 3 types MVCs could easily and "should" be moved into the following scenario:

    1. The application controller looks in "known" location(s)
    2. If a "package" or "packages" meeting the MVC interface exists, the application loads them and make them available to the user.

    The application controller is a standalone application or applet.

    Packaging these MVCs in a jar makes sense and having a "known" location is straight forward but what I don't understand is how I get them loaded into the JVM.

    From my reading of the java/jar-extension ability it doesn't appear that the build in extension would work for several reasons: my controller will not have prior knowledge of the jar's name, I can't expect the end user to modify their CLASSPATH, they don't belong in the lib/ext.

    Any suggestions on a design/implementation approach?

    Thanks in advance,
    Roy


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Hi from Kalifornia! and a question

    Ok, I might not understand (I'm probably just tired or something). So are you saying that you have 3 jars for your project and they all need to interact with each other? Or that you are trying to access files from within ones own jar? Or that you are trying to get the executing jar to be able to import the external libraries?

    Can you give me an explicit example of the situation so I have a better understanding of what you are trying to accomplish.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Junior Member
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Hi from Kalifornia! and a question

    Quote Originally Posted by aussiemcgr View Post
    Can you give me an explicit example of the situation so I have a better understanding of what you are trying to accomplish.
    Sorry about being to vague....

    The "core" application can extract information from different sources, do its analysis and save the results. At the moment, I have built into the application 3 ("packages" )different user interactions between the "core" and how to extract the information from their respective source and translate into a format the "core" can work with: "core" format <====< package <====< source.

    I would like to allow the user (assuming they have some one Java knowledge, or me under contract) to develop a "package", put it in a known location and have the "core" application load it at runtime without developer/system admin to modify the JRE contents or classpath. For example put in "user.home", "user.dir" or some path a jar who's name contains "some string", the "core" loads the jar, validates specific interfaces are met, and exposed the UI to the end user.


    My flight training product could have used the same mechanism to "license" functionality. As currently implemented all capabilities are shipped with the product along with a key which unlocks the ones the customer purchased. If they want more functionality, I ship a new key. If I want to release new functionality, I have to release a complete product. Use a similar mechanism, ship them the additional functionality then put it in the "known" location and off they go. Or if I release new functionality, they install it and off they go.

    Hope that helps.

    Roy