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.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > JavaNNS on Mac-Intel

JavaNNS on Mac-Intel
Thread Tools
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 25, 2007, 09:14 AM
 
Hello,
have anyone ever used JavaNNS on a Mac-Intel?

University of Tübingen: JavaNNS

It's is a simulator of neural networks.

There is a Mac version, but I wasn't able to make it work on Mac-Intel.

Could anyone help me?
     
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Mar 25, 2007, 09:22 AM
 
It works for me (G5), not that I know what to do with it. Sorry, I can't help you with the Intel/Rosetta question.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 26, 2007, 02:12 AM
 
Haven't anyone tried it on a mac-intel?
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 26, 2007, 02:12 PM
 
In the JavaNNS' download page (Index of /downloads/JavaNNS) there is the JavaNNS' source zip file. Could anyone explain me how to build it? or build it on a mac-intel and give to the World the JavaNNS-Mac-Intel version?
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Mar 26, 2007, 03:05 PM
 
Looks like you need to compile and install Apache's Ant first, and then run:

ant compile
ant jar
ant run
You may need to run ant settarget too if your CPU isn't detected properly.

I would install Ant by installing Macports, and then running:

sudo port -v install apache-ant

You'll need your GCC compiler installed, which is a part of Apple's XCode install.
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 27, 2007, 02:42 PM
 
I installed Ant with Darwinports. Then I ran:

computer:~/Desktop/JavaNNS guido$ ant compileBuildfile: build.xml

init:
[mkdir] Created dir: /Users/guido/Desktop/JavaNNS/dist

compile:
[javac] Compiling 98 source files to /Users/guido/Desktop/JavaNNS
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

BUILD SUCCESSFUL
Total time: 3 seconds
computer:~/Desktop/JavaNNS guido$ ant jarBuildfile: build.xml

init:

compile:

loaddefplatform:

selectplatform:
[input] No platform setting could be found.
[input] Please select the desired target platform:
[input] 1) Windows
[input] 2) Solaris
[input] 3) Linux
[input] 4) Mac
[input] c) Cancel build process (1, 2, 3, 4, c)
4

kernelinterface:
[echo]
[echo] Compiling for target platform Mac
[echo] Using KernelInterface /Users/guido/Desktop/JavaNNS/KernelInterface/precompiled/Mac/libSNNS_jkr.jnilib
[echo]

jar:
[jar] Building jar: /Users/guido/Desktop/JavaNNS/dist/JavaNNS.jar

BUILD SUCCESSFUL
Total time: 3 seconds
computer:~/Desktop/JavaNNS guido$ ant runBuildfile: build.xml

init:

compile:

run:
[java] Exception in thread "main" java.lang.UnsatisfiedLinkError: Couldn?t find the JavaNNS.jar file
[java] at javanns.Network.extractLibraryFromJar(Network.java :137)
[java] at javanns.Network.loadKernel(Network.java:115)
[java] at javanns.Network.<init>(Network.java:72)
[java] at javanns.Snns.<init>(Snns.java:175)
[java] at javanns.Snns.appletMain(Snns.java:302)
[java] at javanns.Snns.main(Snns.java:282)

I think the problem is the kernel interface that it doesn't support mac-intel.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Mar 27, 2007, 02:49 PM
 
This error message indicates that it cannot find JavaNNS.jar, not a platform related issue.

I'll look at this again as soon as I can.
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 28, 2007, 02:43 PM
 
I tried another time, with JavaNNS.jar in the right folder:

computer:~/Desktop/JavaNNS guido$ ant run
Buildfile: build.xml

init:

compile:

run:
[java] java.lang.Exception: The system couldn?t find the library SNNS_jkr
[java] JavaNNS couldn?t start.
[java] at javanns.Network.<init>(Network.java:72)
[java] at javanns.Snns.<init>(Snns.java:175)
[java] at javanns.Snns.appletMain(Snns.java:302)
[java] at javanns.Snns.main(Snns.java:282)

BUILD SUCCESSFUL
Total time: 10 seconds

It's the same error that the binary mac distribution give me.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Mar 28, 2007, 03:12 PM
 
You probably shouldn't have to move files around, I'd contact the developers or subscribe to the project mailing list for help with installation.

Usually the Mac is an afterthought with many Unix based projects, you honestly might fare better running Linux or FreeBSD or something... I see that FreeBSD has a port for JavaNNS meaning that if you were running FBSD, you'd have this installed and running by now.

Since you're running an Intel Mac, why not try running Linux or FreeBSD in a virtualized environment?
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 29, 2007, 08:15 AM
 
I use JavaNNS on an other pc with linux (ubuntu), but I like to use it on my Mac. I tried to contact developers, but nobody answered me.
Which virtualized environment do you refer to?
     
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 13, 2007, 09:41 PM
 
Has anyone found a way to run JavaNNS on an Intel Mac?
     
Fresh-Faced Recruit
Join Date: Feb 2008
Status: Offline
Reply With Quote
Feb 26, 2008, 07:40 AM
 
I compiled an Intel Mac version.

A jarfile containing the jni kernel:
GigaSize.com: Host and Share your Files

How to do it yourself:
1) Build SNNS on your Mac. Fix the MAXINT problems, this occurs only in a few files and can be fixed by a #define in the top of the source.
2) Compile the jni library:
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers javanns_KernelInterface.c
cc -dynamiclib -o ~/Desktop/JavaNNS/KernelInterface/precompiled/Mac/libSNNS_jkr.jnilib -lkernel -lfunc -lfl -L. -framework JavaVM javanns_KernelInterface.o
3) Create the jar:
ant clean
ant jar

And voila, it's there.
     
GaMac  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Feb 27, 2008, 04:31 AM
 
Thank you very much
     
Fresh-Faced Recruit
Join Date: Mar 2008
Status: Offline
Reply With Quote
Mar 17, 2008, 01:53 AM
 
Originally Posted by Tader View Post
I compiled an Intel Mac version.

A jarfile containing the jni kernel:
GigaSize.com: Host and Share your Files

How to do it yourself:
1) Build SNNS on your Mac. Fix the MAXINT problems, this occurs only in a few files and can be fixed by a #define in the top of the source.
2) Compile the jni library:
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers javanns_KernelInterface.c
cc -dynamiclib -o ~/Desktop/JavaNNS/KernelInterface/precompiled/Mac/libSNNS_jkr.jnilib -lkernel -lfunc -lfl -L. -framework JavaVM javanns_KernelInterface.o
3) Create the jar:
ant clean
ant jar

And voila, it's there.
The link doesn't work anymore.

Can you open another one?

Thank you very much.
     
Fresh-Faced Recruit
Join Date: May 2008
Status: Offline
Reply With Quote
May 26, 2008, 08:42 AM
 
i want it, too please.
     
Fresh-Faced Recruit
Join Date: Oct 2008
Status: Offline
Reply With Quote
Oct 1, 2008, 06:49 AM
 
I did the process pointed out by xeutrex. There's more to it, though...
Anyway, the JavaNNS.jar version for Intel Mac is available in here.
This is the detailed do-it-yourself process I used.
Enjoy
     
Fresh-Faced Recruit
Join Date: May 2008
Status: Offline
Reply With Quote
Oct 1, 2008, 06:57 AM
 
great, thanks!
     
Fresh-Faced Recruit
Join Date: Oct 2008
Status: Offline
Reply With Quote
Oct 1, 2008, 08:47 AM
 
Credits to the previous process sketch are due to Tader instead.
Sorry about that.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 04:06 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2