1

I want create a runnable jar for a scala project , to do this, I create a class java that call the main scala :

package reprisesComptesExistants;
public class Main {
       public static void main(String[] args) {
            PhasePreliminaire.main(args);
       }
    }

With sbt tool, I do :

> sbt clean assembly 
[info] Compiling 4 Scala sources and 1 Java source to C:\Users\A661758\datainteg
rationRepriseExistant\target\scala-2.11\classes...
[trace] Stack trace suppressed: run last compile:compileIncremental for the full
 output.
[error] (compile:compileIncremental) java.io.IOException: Cannot run program "ja
vac" (in directory "C:\Users\A661758\dataintegrationRepriseExistant"): CreatePro
cess error=2, Le fichier spÚcifiÚ est introuvable
[error] Total time: 6 s, completed 8 juin 2017 10:15:23
>

Thanks Mounir

mham
  • 145
  • 4
  • 18
  • possible duplicate https://stackoverflow.com/questions/20587840/javac-file-not-found-first-java-usage-javac-options-source-files – Ori Marko Jun 08 '17 at 08:22
  • By the looks of it `PhasePreliminaire` already is a main class, you don't need an extra java class. – Jasper-M Jun 08 '17 at 09:37
  • yes @Jasper Its contains a main ' class object PhasePreliminaire{ def main(args:Array[String]): Unit = { val sc = SparkSessionClass.instanceSparkSession() val path = "C:/Users/A661758/Desktop/worktalendBD/RepriseComptesExistants.csv" RepriseComptesExistantsLDAP.insertComptesExistantsLDAPRedis(path, sc) } }' – mham Jun 08 '17 at 09:39

0 Answers0