# HG changeset patch # User Paul Boddie # Date 1106439593 -3600 # Node ID cd2ca8849c5ad724346d3f81af1087f654a2b0a1 # Parent 3bd9ffdaa3e81f93a7983a8391012154b1733e7e Added a note about the Java API implementation. diff -r 3bd9ffdaa3e8 -r cd2ca8849c5a docs/index.html --- a/docs/index.html Sun Jan 23 01:19:42 2005 +0100 +++ b/docs/index.html Sun Jan 23 01:19:53 2005 +0100 @@ -28,7 +28,7 @@

You can run Java classes by finding one with a main method and executing it. Here's a comparison of a freshly prepared Java class being run in Python -and in a Java virtual machine:

+and in a Java virtual machine respectively:

cd tests/

@@ -141,7 +141,7 @@ transforming it, optimising it, and so on. (Instead, there's been more emphasis on lots of runtime baggage for things which could be done by analysis of the code with modified bytecode being produced as a result, - and let's not get started on some of the syntactical enhancements.) + and let's not get started on some of the syntax enhancements!) Consequently, stability might be an issue for some configurations, especially since CPython doesn't fail particularly graciously with badly behaved bytecode. @@ -192,6 +192,22 @@ several places on the PYTHONPATH, and this is something that generally isn't allowed/supported with the classic Python module import mechanisms. +
  • Most Java programs need standard Java library (also known as the Java + API) classes; indeed, with java.lang.String and seemingly + java.lang.StringBuffer required just for the usage of + strings, and with the classic main method having + String[] in its signature, some kind of library + implementation is obviously necessary. Whilst importing everything from + the .jar files bundled with Sun's JRE might be tempting, there may be a + certain amount of native calling going on in secret which would defeat + this approach, and anyone seriously interested in running Java code in + Python should really want to steer clear of such proprietary dependencies + anyway. It could be possible to wrap and make use of GNU Classpath or + some other open source Java API implementation, but the cleanest (but not + necessarily the least time-consuming) approach is surely to implement the + standard API classes in Python, and a package called java is + included which contains some fairly quick and dirty implementations to + get things working.
  • Suggestions for Python Improvements