Package Clojure and Java(springboot) source codes into a JAR file with leiningen - clojure-java-interop

Package Clojure and Java(springboot) source codes into a JAR file with leiningen
i run lein uberjar ,
so it happen
enter image description here

Related

how to run scala .jar with external jar files in terminal

I have my .jar built from scala classes and it has an external dependency with other.jar. Please suggest how should I run my jar files in terminal. The command I tried is
$scala my_scala.jar external.jar
It works same way as running java program. Try this
scala -classpath <your_scala_jar>:<external_jar> <package.MainClass>

Can not download jars when building scala project with sbteclipse?

As shown in the picture, when I build scala project with sbteclipse and import to eclipse, when changing build.sbt , jars are downloaded to my computer but not to scalaProject. I do not know why. Can someone help me?
scala version: 2.11.8
sbt version: 0.13.15
stbeclipse:5.1.0
I assume that you're using the Scala IDE plugin for Eclipse, correct?
The sbteclipse SBT plugin merely provides a command to generate an Eclipse Scala project from the SBT build. Before using Eclipse, you're supposed to issue the following command (from the command line) to SBT:
sbt eclipse
This should generate the project files for your Eclipse project. After executing this command, you can open your project using Eclipse (with the Scala IDE plugin).
Note that, at present, the Scala IDE Eclipse plugin does not support SBT build files. That is, if you change your SBT build file, then Eclipse will be none the wiser, until you re-run the above command.
You might want to consider switching to IntelliJ IDEA (instead of Eclipse) which has a full-featured Scala plugin that fully supports SBT builds, including downloading any dependencies. For my money (both IDEs are free) IntelliJ is light-years ahead of Eclipse for Scala development.

how to create project files in sbt

hi i am new in sbt i am following this tutorial
http://www.scala-sbt.org/0.13/tutorial/Hello.html
i followed the same steps on the shell the program displays "hi"
i am confused i don't have these files in my hello folder
Sources in src/main/scala or src/main/java
Tests in src/test/scala or src/test/java
Data files in src/main/resources or src/test/resources
jars in lib
and also i dont't have the build.sbt file i am following this tutorial as it is i have only hw.scala file and a target folder
mt scala version is 2.11.1 and sbt version is sbt 0.13.5
am i doing something wrong ?
Just create build.sbt and write appropriate lines into it. Same goes for mentioned directories -- stock sbt does not create files and folders for you, but it has to recognize them, once they're there.

sbt eclipse command changed files and packages

I created a new Scala project in eclipse then added a package and Scala object ,
So far so good ...
i want to add external library so i added a project folder with build.properties plugins.sbt files,and another file build.sbt in the root project.
in the terminal i compiled successfully the project with the sbt compile task.
the problem is that after sbt eclipse command the eclipse project changed from Scala project to something else.... all the packages changed to simple folders and the Scala project is ruined
scala IDE :Build id: 3.0.3-20140327-1716-Typesafe
scala version :2.10.4
sbt version:0.13.0
you can see in the image
Where did you get the eclipse command from? I'm guessing you're using sbteclipse.
I created a new Scala project in eclipse then added a package and Scala object , So far so good ...
If I understand correctly, this is exactly the opposite of what the plugin is intended to do. I think you're suppose to create a plain sbt project, and then let the plugin generate the Eclipse project.

Scala REPL unable to import packge

I'm trying to import com.lambdaworks.crypto.SCryptUtil (from crypto) in the Scala REPL. I'm running the REPL from the Java directory containing com/lambdaworks/crypto.
The REPL can't find com.lambdaworks.crypto.SCryptUtil, but it can autocomplete up to com.lambdaworks.crypto but can't find anything after that.
When I used the REPL in the IntelliJ IDEA after including the package in my project, I was able to find the SCryptUtil class.
Am I missing some classpath parameters that are required for import?
The REPL won't compile the Java code for you—it's only autocompleting that far because it's aware of the directory structure, but once it gets to the crypto directory it won't find any class files.
You can see this more dramatically by moving up a directory and opening a new REPL—you'll be able to autocomplete import java.com.lambdaworks.crypto, even though that's obviously not a real package hierarchy.
In this case you can move to the project root, run mvn compile to compile the Java code, and then start the REPL like this (still in the project root):
scala -classpath target/classes
Now you can import com.lambdaworks.crypto.SCryptUtil.
This only works because the project doesn't have any runtime dependencies, though—in other cases you may need either to add other things to the classpath, to build a JAR with the dependencies baked in (e.g. with the Maven Assembly plugin), or to use the mvn scala:console goal of the Maven Scala plugin.