Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Скрипт для компиляции стратегии на scala в пакете для java
@echo off
if not exist src\main\java\ (
echo Unable to find src\main\java\ > compilation.log
exit 1
if not exist src\main\scala\MyStrategy.scala (
echo Unable to find src\main\scala\MyStrategy.scala > compilation.log
exit 1
rd /Q /S classes
md classes
call "%SCALA_HOME%\bin\scalac" -encoding UTF-8 -d classes src/main/scala/*.scala src/main/java/*.java src/main/java/model/*.java > compilation.log
call javac -encoding UTF-8 -classpath "classes;%SCALA_HOME%/lib/scala-library.jar" -d classes src/main/java/*.java src/main/java/model/*.java > compilation.log
if not exist classes\Runner.class (
echo Unable to find classes\Runner.class >> compilation.log
exit 1
if not exist classes\MyStrategy.class (
echo Unable to find classes\MyStrategy.class >> compilation.log
exit 1
echo Manifest-Version: 1.0>MANIFEST.MF
echo Main-Class: Runner>>MANIFEST.MF
echo Class-Path: scala-library.jar scala-reflect.jar>>MANIFEST.MF
jar -cfm "./java-scala-cgdk.jar" MANIFEST.MF -C "./classes" .
copy /Y /B "%SCALA_HOME%\lib\scala-library.jar" .
copy /Y /B "%SCALA_HOME%\lib\scala-reflect.jar" .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.