For reference here is the relevant `sbt` documentation that states
Daoyuan¹s solution as well as a few other options to try.

http://www.scala-sbt.org/0.13/tutorial/Library-Dependencies.html


On 12/2/14, 11:29 PM, "Wang, Daoyuan" <daoyuan.w...@intel.com> wrote:

>I think you can place the jar in lib/ in SPARK_HOME, and then compile
>without any change to your class path. This could be a temporary way to
>include your jar. You can also put them in your pom.xml.
>
>Thanks,
>Daoyuan
>
>-----Original Message-----
>From: flyson [mailto:m_...@msn.com]
>Sent: Wednesday, December 03, 2014 11:23 AM
>To: d...@spark.incubator.apache.org
>Subject: object xxx is not a member of package com
>
>Hello everyone,
>
>Could anybody tell me how to import and call the 3rd party java classes
>from inside spark?
>Here's my case:
>I have a jar file (the directory layout is com.xxx.yyy.zzz) which
>contains some java classes, and I need to call some of them in spark code.
>I used the statement "import com.xxx.yyy.zzz._" on top of the impacted
>spark file and set the location of the jar file in the CLASSPATH
>environment, and use ".sbt/sbt assembly" to build the project. As a
>result, I got an error saying "object xxx is not a member of package com".
>
>I thought that could be related to the library dependencies, but couldn't
>figure it out. Any suggestion/solution from you would be appreciated!
>
>By the way in the scala console, if the :cp is used to point to the jar
>file, I can import the classes from the jar file.
>
>Thanks! 
>
>
>
>--
>View this message in context:
>http://apache-spark-developers-list.1001551.n3.nabble.com/object-xxx-is-no
>t-a-member-of-package-com-tp9619.html
>Sent from the Apache Spark Developers List mailing list archive at
>Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org For additional
>commands, e-mail: dev-h...@spark.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org
>For additional commands, e-mail: dev-h...@spark.apache.org
>

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to 
Capital One and/or its affiliates. The information transmitted herewith is 
intended only for use by the individual or entity to which it is addressed.  If 
the reader of this message is not the intended recipient, you are hereby 
notified that any review, retransmission, dissemination, distribution, copying 
or other use of, or taking of any action in reliance upon this information is 
strictly prohibited. If you have received this communication in error, please 
contact the sender and delete the material from your computer.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org
For additional commands, e-mail: dev-h...@spark.apache.org

Reply via email to