From: Kenworthy, E. <Edw...@ma...> - 2002-08-16 10:27:02
|
Hi Dave I agree, re direction of Java. I am using Java embedded but in a standard app (using the scripting as a way to extend handling of XML data - one script per XML element, you see where I'm going). Still don't understand why it works in my IDE (JBuilder 5) - obviously the app itself isn't jar-ed at that point but the Java classes that my Jython script is sub-classing is. I guess the issue must be as Oti suggested - Jython doesn't like manifest file class paths. I'll have to have a rummage when I can get the enthusiasm :-) Edward -----Original Message----- From: da...@cr... [mailto:da...@cr...] Sent: 16 August 2002 10:27 To: Edw...@ma...; jyt...@li... Subject: RE: RE: [Jython-users] RE: Classpath problem? Hi Ed, Not so much a bug as a way of doing things? :-) It does seem to me that jython's built on the assumption that it will run on a desktop PC, with access to the hard drive etc. I'm interested in deploying jython within mobile code that won't necessarily have those privileges. There are several situations where this could occur: - an app that is downloaded via JNLP and embeds a jython interpreter - a piece of code invoked from a remote process, such as an attribute of a jini service - an app that runs from inside a jar file, and ought to be completely portable as a single jar file (allowing 'java -jar' invocation, or double-clicking on the icon in Win Explorer, etc.) IMHO, this is where java is heading - on to mobile devices, running across networks, etc. It would be a great shame if jython remained stuck on the desktop, as it offers better capabilities than any of the other java scripting engines I've come across. I guess this question is aimed at the folk who develop jython, or know its internals well. Am I right in what I've said above? If so, is it a major job to modify the internals, or just a matter of replacing a few FileInputStreams with URLs that can then be configured to point to web resources, jar contents, etc.? Does anyone else on the list see the merit of what I'm saying? I've tentatively raised this issue a couple of times before, and received little response. I owe the jython community a lot, and I'm very grateful for what you've created. I've spent a fair bit of time recently working on a resource loader system (for config files and yes, jython scripts) for a Open Source project that I run, and would be happy to see this code in use in jython, if it allows the language to have greater portability. I don't have a great deal of time to contribute (yeah, I know, none of us do...), but if anyone would like to show me around the jython source and point me to the right places, I'm willing to have a first look and see if it's feasible. Anyone else care to join me? Of course, if I'm mistaken in my first set of assumptions, then please ignore the rest (but enlighten me anyway!) Regards, Dave >Darn, a Jython bug and an important one I would have thought. > >-----Original Message----- >From: da...@cr... [mailto:da...@cr...] >Sent: 29 July 2002 11:23 >To: jyt...@li... >Subject: [Jython-users] RE: Classpath problem? > >Hi Edward, > >From your description, I presume that you're launching a java class from the >jar file that includes an embedded interpreter rather than starting up from >a jython script in the jar file? > >I've come across similar problems. The classloader used to load from a jar >is much more restricted than the standard command-line startup one (I can't >do an 'import java' when running from a jar, for example). > >I wish I had a simple answer to this - posted a query about this on the list >a few weeks ago, noone came up with a workaround. If you do, please let me >know. > >Dave > |