The Artima Developer Community
Sponsored Link

Java Buzz Forum
Rewriting the classpath at runtime

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Norman Richards

Posts: 396
Nickname: orb
Registered: Jun, 2003

Norman Richards is co-author of XDoclet in Action
Rewriting the classpath at runtime Posted: Dec 1, 2003 11:59 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Norman Richards.
Original Post: Rewriting the classpath at runtime
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
Latest Java Buzz Posts
Latest Java Buzz Posts by Norman Richards
Latest Posts From Orb [norman richards]

Advertisement

I ran across an interesting hack to allow you to rewrite the system classpath at runtime. This is the kind of dumb pointless hack I normally would do, but I've never run into a case where I've needed to hack the system classpath like this. If you can call setAccessible() then you aren't running with any sort of security restrictions and can surely create a class loader to load the class. Class loading in Java is so simple that I can't see any reason not to do things the right way. But still, as a hack for the sake of hacking, I like it.

Judging by the comments on the posting above, some people are undoubtedly going to try to put this hack in their own code. If you are one of those people, please put your keyboard down now and report to the Ministry of Reeducation immediately. We've got some manual labor for you. (Seriously, though - don't do it)

Read: Rewriting the classpath at runtime

Topic: Approaching Menus in Cocoa Previous Topic   Next Topic Topic: Infamy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use