Re: Compile BeanShell using JJDK 1.2
Patrick Niemeyer <[email protected]> Wed, 05 Jan 2005 14:19:32 -0600
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
Patrick Niemeyer wrote: > > On Jan 3, 2005, at 3:15 AM, Steven Y.C. CHAN wrote: > >> I'd like to use the BeanShell as a Java Interpreter under a Java VM >> embeded in a DB server (Sybase ASE v12.5.x). As it only support JDK >> 1.2, and 'fully compile the bsh distribution requires JDK1.3+' >> (mentioned in the developer's corner of the BeanShell homepage). Is >> it possible to modify the package so that it can be compiled under JDK >> 1.2 (at least with basic bsh functionality)? > > The only issue with running the current build under older VMs would be > any binary class format incompatibilities. The code itself should > gracefully detect what features are present and load only the modules it > can run. To correct any class format issues it is easy to build the > source for an earlier VM... The Ant build file that comes with the > source has options in it for building under older VMs (1.2 and 1.1). > > The 2.0 beta may have a few bugs with respect to older VM compatibility > but they should be easily fixed or you could go with the 1.3 source branch. > > In either case, the point is that the worst you should have to do is to > recompile the current source under an older VM... you shouldn't have to > go back to much older BeanShell source branches. I went ahead and did a quick build of the 1.3 branch under Java 1.2. The jar is here: http://beanshell.org/bsh-1.3.0_jdk1_2build.jar I didn't test it much, but it should be fine. Just remember that running under Java 1.2 has limitations... no dynamic interfaces or class generation, so you are pretty much limited to the built-in interfaces in AWT and things like Runnable, etc. For some reason I wasn't able to get Ant to compile the code with my JAVA_HOME set to 1.2... it kept somehow finding the newer compiler version. So I used javac to manually build the source. Aside from that I didn't do anything special. Pat ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt