Results 1 to 2 of 2
  1. #1
    LongTTH is offline Member
    Join Date
    Mar 2011
    Rep Power

    Question what is runtime classpath and what is designtime classpath?

    When I was reading this tutorial about Hibernate I see this:
    Save that file with the name hibernate.cfg.xml, and put it on both your runtime and designtime classpath. People always shove it on their design-time classpath, and then it never gets picked up at runtime, and they get errors stating that the environment can't find the hiberante.cfg.xml file. For me, I'm just creating a simple folder named _mycode off the root of C:\ and I'm placing the file right in there. I will reference this location at both runtime and design time.
    The author has provided a solution but I do want to know WHAT IS the runtime classpath and WHAT IS the designtime classpath in Java?

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    This sounds more like a convention of the development tool environment. Java on its own usually has a classpath, which is set from command line parameters or environment variables when the Java virtual machine is started up.

    In this case, the eclipse IDE has a run configuration to specify the things that should get used on the normal run of the application, and the option to have different things for design mode.

    Where in design mode, we might want to have different or additional things, such as debuggers, or in the case of a database, instead of developing the application against a real database, to use an embedded or a mock database that simulates the effect of a real database just for testing the pieces of the application. All of this support and testing kind of things that might be handy for developing the application, but would not be used to run the application in its real environment when it is later deployed.

Similar Threads

  1. checking runtime classpath in Eclipse
    By debu37 in forum Eclipse
    Replies: 3
    Last Post: 11-23-2012, 01:29 AM
  2. Classpath at runtime
    By 67726e in forum Advanced Java
    Replies: 0
    Last Post: 10-01-2010, 02:38 AM
  3. Replies: 8
    Last Post: 09-23-2010, 03:27 PM
  4. Classpath
    By JavaJunkie in forum New To Java
    Replies: 1
    Last Post: 04-07-2009, 07:17 AM
  5. Adding JARs to the classpath at runtime?
    By johann_p in forum Advanced Java
    Replies: 1
    Last Post: 06-26-2007, 10:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts