Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.

My question is this:
How do you run java progams on your mac? It seems that I have to use the program jbindery to launch the program, but I can't seem to get it configured right. It says that the program is not in the class path. I would like to give programs like: http://www.jcraft.com/weirdx/http://www.mindbright.se/mindterm/

a go, but I can't figure out how to use the MRJ ssucessfully. Any help ... or a real newbie faq (emphasis on newbie)?

thanks.

WHoo

Guest

Status:

Jun 1, 2000, 10:57 AM

Apple has a site on how to do this as well as a few individuals. Check out &lt;http://www.pepsan.com/javamac/&gt; which has some info including pointers to Apple's Java pages as well as the Outlaw Cafe.

As you mentioned, and as WHoo mentioned in the previous post, it is indeed generally possible to use Apple's JBindery application (part of the MRJ SDK) to run a Java program that's distributed as a collection of class/jar/zip files.

One potential snag is that neither MRJ 2.2 nor MRJ SDK 2.2 includes the JFC/Swing classes. You can download Swing 1.1.1 separately from Sun's JFC/Swing Download web site. After installation, there should be at least one new file (named 'swingall.jar') in your 'System Folder : Extensions : MRJ Libraries : MRJClasses' subfolder.

After installing Swing, I was able to successfully run JCraft's WeirdX X-Windows Java server program via JBindery, by "translating" the 'java' command line (as shown in the 'misc : weirdx.bat' DOS batch-file, etc.) into the corresponding options in JBindery's settings dialog. When configuring JBindery, be sure to follow the guidelines in the 'Using JBindery' PDF manual. Also, depending on whether you specify a path in the Class name field in the Command panel (e.g.: 'com.jcraft.weirdx.WeirdX' vs. 'WeirdX'), it may be necessary to add the program's root folder in the Classpath panel (it also wouldn't hurt to explicitly add all subfolders that directly contain class/jar/zip files).

For example, I emulated the 'weirdx.bat' DOS batch-file as follows:- In the Command panel, I specified 'com.jcraft.weirdx.WeirdX' as the Class name; then, in the Classpath panel, I dragged the root folder, the 'misc : weirdx.jar' file, the 'com : jcraft : weirdx' subfolder, and the 'com : jcraft : utils' subfolder, in that order. Finally, to work around a problem with the WeirdX distribution itself (that led to a runtime Java I/O error about a missing 'props' file), I copied the 'config' subfolder into the 'com : jcraft : utils' subfolder.

BTW, general FAQs for various 'comp.*' newsgroups are available at the Internet FAQ Consortium web site's comp FAQS page; some of these FAQs are for Java-related newsgroups. The TeamJava web site also maintains a more developer-oriented Java FAQs links page. For more Mac-oriented Java help, in addition to the link provided by WHoo in the previous post, see Jeff Aronoff's Java Launch Pad web site (which has links to Mac Java FAQs, forums, etc.), and the Outlaw Cafe web site (which has an MRJ FAQ page, etc.).