Adding external jar problem

20 views
Skip to first unread message

Azi

unread,
Feb 19, 2015, 10:30:29 AM2/19/15
to lif...@googlegroups.com
Hi all,

I just began to use Scala Lift framework and I would like to know how to add an external jar using Scala IDE for Eclipse.

Here is the way I'm trying to do this:
- Coded some functions in java and exported them as a jar.
- Launched "sbt.bat" from "lift_blank" (default lift projects) and typed "eclipse" so I can import this project in the IDE
- Import the project in the IDE
- Add my external jar to this project in project properties -> Java Build Path -> Librairies
- Created a scala class that call my java coded function located in this jar, everything seems to work as it finds the functions
- When I type "container:start" in my "sbt.bat" terminal it says there is an error : Object "tes" not found

My jar class is "test.az.MyClass".

Here is a screenshot of that output:



I dont get error in the IDE but in the "sbt.bat", why ?

Azi

unread,
Feb 19, 2015, 10:36:49 AM2/19/15
to lif...@googlegroups.com
Screenshot
ScalaError.jpg

Tyler Weir

unread,
Feb 19, 2015, 10:45:30 AM2/19/15
to lif...@googlegroups.com
You need to update your build.sbt and tell it about your jar.

The IDE config and the sbt config are not necessarily connected.

Azi

unread,
Feb 20, 2015, 4:06:32 AM2/20/15
to lif...@googlegroups.com
Hi,

As you pointed, this was the problem. Thank you for your help.

Solved.


Le jeudi 19 février 2015 16:45:30 UTC+1, Tyler Weir a écrit :
You need to update your build.sbt and tell it about your jar.

The IDE config and the sbt config are not necessarily connected.

On Thursday, February 19, 2015 at 10:30:29 AM UTC-5, Azi wrote:
Hi all,


I just began to use Scala Lift framework and I would like to know how to add an external jar using Scala IDE for Eclipse.

Here is the way I'm trying to do this:
- Coded some functions in java and exported them as a jar.
- Launched "sbt.bat" from "lift_blank" (default lift projects) and typed "eclipse" so I can import this project in the IDE
- Import the project in the IDE
- Add my external jar to this project in project properties -> Java Build Path -> Librairies
- Created a scala class that call my java coded function located in this jar, everything seems to work as it finds the functions
- When I type "container:start" in my "sbt.bat" terminal it says there is an error : Object "tes" not found

My jar class is "test.az.MyClass".

Here is a screenshot of that output:



Tyler Weir

unread,
Feb 20, 2015, 9:40:04 AM2/20/15
to lif...@googlegroups.com
Great.
Reply all
Reply to author
Forward
0 new messages