I am trying to scan my PHP project with Phantm.
I downloaded the release.jar and am running :
java -jar /path/to/my/phantm-1.0.6.jar
I get the following exception :
Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at phantm.Main.main(Main.scala)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 13 more
I have read online it could be because scala wasn’t installed.
I downloaded and unzipped scala and added its path to .bash_profile
scala -version
Scala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
I must be missing something else… I am running OS X Lion.
Try the following:
Works for me with Scala 2.9.2. The Phantm documentation must not have been updated with the move (?) to Scala, because the Scala classes definitely aren’t in that jar.
Alternatively you could specify the path to the Scala runtime explicitly (you may need to change the paths to the jars, of course):
If you already have Scala installed, though, I don’t see any reason to prefer this approach.