Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2007-11-29 03:17:35
Size: 267
Editor: JoshJuneau
Comment:
Revision 3 as of 2008-11-15 09:15:59
Size: 2870
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
This quick tip will get you up and running Jython on Java 1.6 in your OSX environment. **This quick tip will get you up and running Jython on Java 1.6 in your OSX environment.

For those of you who follow Apple's OSX operating system, you most certainly have heard that Java 1.6 did not make it into the recent OSX 10.5 Leopard release...at least not yet. However, there have been some busy individuals working on porting OpenJDK over to OSX for Tiger and Leopard. Landon Fuller has been successful in porting OpenJDK to OSX, and has compiled the source into a binary known as [[http://landonf.bikemonkey.org/code/macosx/MacOS_BSD_Java_Developer_Preview_2.20071122.html|Soylatte]].

If you are interested in running JDK 1.6 on your Mac, then you can simply download Soylatte and extract to a directory on your hard drive. For the best results, you should place Soylatte contents in the location /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home because doing so will allow Soylatte to be used from within Java IDE's as such as Netbeans. Once you've downloaded, extracted, and moved your Soylatte binaries into the correct location, you can use them to run Jython!

Open terminal and change directories to your Jython directory. Then type the following to use the interactive editor:

{{{
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -jar jython.jar
}}}

You should see the following output:
{{{
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/jsse.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/jce.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/charsets.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/dnsns.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/localedata.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/sunpkcs11.jar'
Jython 2.2.1 on java1.6.0_03-p3
Type "copyright", "credits" or "license" for more information.
>>>
}}}

You are now successfully using running Jython on Java 1.6 in your OSX environment!

Jython on Mac Tip: Develop Jython Using Java 1.6

Submitted by: Josh Juneau

**This quick tip will get you up and running Jython on Java 1.6 in your OSX environment.

For those of you who follow Apple's OSX operating system, you most certainly have heard that Java 1.6 did not make it into the recent OSX 10.5 Leopard release...at least not yet. However, there have been some busy individuals working on porting OpenJDK over to OSX for Tiger and Leopard. Landon Fuller has been successful in porting OpenJDK to OSX, and has compiled the source into a binary known as Soylatte.

If you are interested in running JDK 1.6 on your Mac, then you can simply download Soylatte and extract to a directory on your hard drive. For the best results, you should place Soylatte contents in the location /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home because doing so will allow Soylatte to be used from within Java IDE's as such as Netbeans. Once you've downloaded, extracted, and moved your Soylatte binaries into the correct location, you can use them to run Jython!

Open terminal and change directories to your Jython directory. Then type the following to use the interactive editor:

/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -jar jython.jar

You should see the following output:

*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/jsse.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/jce.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/charsets.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/dnsns.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/localedata.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar, '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/jre/lib/ext/sunpkcs11.jar'
Jython 2.2.1 on java1.6.0_03-p3
Type "copyright", "credits" or "license" for more information.
>>> 

You are now successfully using running Jython on Java 1.6 in your OSX environment!

Josh Juneau

juneau001@gmail.com

http://jj-blogger.blogspot.com

JythonMonthly/Articles/December2007/1 (last edited 2008-11-15 09:15:59 by localhost)