[Mac OS X TeX] xfig under OSX?

Troy Goodson Troy.D.Goodson at jpl.nasa.gov
Wed Sep 26 13:56:37 EDT 2001



<x-flowed>At 12:16 AM +0100 9/26/01, Enrico Franconi wrote:
>On September 25, Joachim Kock writes:
>>  anybody knows how to compile and run xfig under MacOSX (with
>>  XWindows)?
>
>It is available either as an "unstable" package in fink, or as a
>precompiled port in gnu-darwin. Personally I use the open source java
>clone jfig <http://tech-www.informatik.uni-hamburg.de/applets/jfig/>,
I really hadn't explored java in OS X -- this is pretty neat.  It 
just seems a little slow (OS X 10.0.4).

For those of you who haven't tried it, there are simply two steps:

1. download 
<http://tech-www.informatik.uni-hamburg.de/applets/jfig/archive/jfig.jar>

2. type "java -jar jfig.jar" at your command line

>which can be easily compiled and packaged as a MacOSX application.

I found <http://developer.apple.com/qa/java/java29.html> but it seems 
a little terse. I ran MRJAppBuilder and it wasn't much help either. 
Then I found <http://www.oreillynet.com/cs/weblog/view/wlg/251> -- 
thank you O'Reilly!

Unfortunately, MRJAppBuilder needs to know the main class name.  I 
had to go to the man page for java to figure that out.  Then, I 
recalled that .jar files can be expanded with stuffit expander and 
maybe, just maybe, the main class file will be apparent...  So here's 
how I did it.

 From the terminal...

1. cp jfig.tar jfig.zip
2. open -a 'stuffit expander' jfig.zip
3. cd jfig\ Folder/META-INF/
4. more MANIFEST.MF  % aha! the main class is jfig.gui.Editor

 From the Finder, find and run "MRJAppBuilder" it should be in your 
Developer/Applications directory.

In MRJAppBuilder (mine started up with the "Application" pane selected)

1. under "Main classname", type "jfig.gui.Editor"
2. click the "Set..." button for choosing the "Output file" and 
decide which directory and what name you want for your application. 
I chose /Volumes/Heracles/Applications/jFig.app
3. click on the "Merge Files" pane
4. click the "Add.." button; find and choose the "jfig.jar" file you downloaded
5. click the "Application" pane
6. Note that "Classpath" now includes 
"Contents/Resources/Java/jfig.jar:" (at least, that's what mine says)
7. click "Build Application"

And, it works!  (I guess that was easy)

(and now you can delete jfig.jar, jfig.zip, and "jFig Folder")

Interesting note: this makes a "package" not an application, and, 
although it's call jFig.app, you can't add it to the applications 
side of the OS X 10.0.4 dock, it has to go on the everything-else 
side.

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>




More information about the MacOSX-TeX mailing list