The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java News Brief (JNB): SWIG

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
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Java News Brief (JNB): SWIG Posted: Jan 2, 2006 8:39 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Java News Brief (JNB): SWIG
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

Mark Volkmann: Using SWIG reduces the amount of manual coding required to invoke C/C++ functions from other programming languages. In the case Java, JNI can be used directly, but this requires a large amount of tedious coding. Another benefit of using SWIG is that it is less error prone than manual coding. Correct use of JNI is complicated, especially for passing non-primitive types.

I think SWIG is something that is underreported and underutilized in the Java community. And it is a very useful thing. It promotes reuse and cuts down on the number of wheels that you have to reinvent.

Aside from a couple of minor problems caused by smart dashes and location differences between i386 and x86_64, the sample run fine, both the Java and the Ruby version, on my newly built Fedora Core 4 AMD64 box:

[weiqi@gao] $ ./running-swig-for-java
[weiqi@gao] $ ./running-the-java-application
Mark Volkmann is 44 years old.
Amanda Volkmann is 20 years old.
Mark Volkmann is older than Amanda Volkmann? true

And I haven't even installed the Sun JDK yet. ( Fedora Core 4 users are advised not to use the Java RPM provided by Sun.) I'm running with the Free Java (a mix of gcj, GNU Classpath, and Eclipse) that comes on the Fedora Core 4 CDs.

Read: Java News Brief (JNB): SWIG

Topic: How Did They Do That? Previous Topic   Next Topic Topic: Eclipse Web Tools Platform 1.0

Sponsored Links



Google
  Web Artima.com   

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