#857 setup on mac osx

sammyt Tue 8 Dec 2009

Hello,

I dont doubt I'm doing something daft, but I'm having some trouble getting off the ground.

I have followed the unix setup instructions and cant get passed this error when I try and run fan

flat:~ sammy$ fan
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: fanx/tools/Fan
Caused by: java.lang.ClassNotFoundException: fanx.tools.Fan
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)

What should I have set that I have not?

I'm on a mac with snow leopard

Cheers Sam

brian Tue 8 Dec 2009

Don't have any debug flags for the bash scripts but looks like sys.jar isn't getting put into classpath right.

You can put a echo in bin/fanlaunch at line 71 to dump the classpath and see if it is pointing to your correct lib/java/sys.jar

sammyt Tue 8 Dec 2009

Hey, I added the following to the fanlaunch script at line 71

echo "FAN_CP:" $FAN_CP
echo "FAN_JAVA:" $FAN_JAVA
echo "osFlags:" $osFlags
echo "FAN_HOME:" $FAN_HOME
echo "FAN_MAIN:" $FAN_MAIN

Which produced the following output.

FAN_CP: /Users/sammy/fan-1.0/lib/java/sys.jar
FAN_JAVA: /usr/bin/java
osFlags: -XstartOnFirstThread
FAN_HOME: /Users/sammy/fan-1.0
FAN_MAIN: fanx.tools.Fan

The FAN_CP looked wrong to me (as you suggested) as within the java dir there is no sys.jar. So I edited the FAN_CP to reflect what I thought was the correct path, and tried again.

FAN_CP: /Users/sammy/fan-1.0/lib/java/ext/macosx-x86_64/swt.jar
FAN_JAVA: /usr/bin/java
osFlags: -XstartOnFirstThread
FAN_HOME: /Users/sammy/fan-1.0
FAN_MAIN: fanx.tools.Fan
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: fanx/tools/Fan
Caused by: java.lang.ClassNotFoundException: fanx.tools.Fan
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)

Unfortunately I get the same error with the new path.

Hope I havent missed the point too much

Cheers Sam

brian Tue 8 Dec 2009

The FAN_CP looked wrong to me (as you suggested) as within the java dir there is no sys.jar.

What is probably the problem then :-)

Did you pull from hg or are you actually using the distro zip?

If you pulled from hg then you'll have to bootstrap build is sorta a pain to just get started.

If you are using zip from Download link on home page, then it should have installed a lib/java/sys.jar - so something must be wonky

sammyt Wed 9 Dec 2009

Hey Brian,

I was using the hg version, hence a little chicken and egg issue!

I downloaded the zip and it worked first time, win!

Thanks a lot for your help

Sam

Login or Signup to reply.