eclipse - Generate .jar from scala -
i'm developing application on eclipse scala , create .jar. have found tuto that, use package scala.tools.nsc , don't know can found thing.
have tried too, generate .class , command jar cmf ....
generate .jar
when launch .jar
error occur. (noclassfound)
sbt have tried too, when compile project work eclipse lot of error appear.
somebody can me explain how can create .jar eclipse or tools.
eclipse has build-in option generate runnable jars, hidden. not recognize scala's main() signatures, have create java class main() method.
create java class main() method forwards call scala code.
then right click on newly created java class , select: run -> java application. create runnable configuration later used part of runnable jar.
now ready dig out runnable jar option eclipse's menu: file -> export -> java -> runnable jar file
in presented dialog select launch configuration have created earlier (in step2), name jar (myapp.jar), select dependency export options , click finish.
the jar created in eclipse's workspace default.
run jar using line: scala myapp.jar
your question missing images: eclipse requires manual refresh when files added or removed. right click on project , select refresh.
this concludes tutorial on highly intuitive eclipse interface.
note: instructions eclipse version 3.6.2.
Comments
Post a Comment