top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How do I make an executable program?

+1 vote
314 views
How do I make an executable program?
posted Jun 28, 2016 by Roshan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

There are two general strategies:
1.you can write a script file and use the interpreter
2. you can compile an object that has a main method.
To make a script file, simply put Scala code into a file and make the file executable. and to use a main method, you must include in your Scala code an object with a main method. The main method should have the same type signature as in Java, namely:

def main(args: Array[String]): Unit

Once you have such an object, you can already run it using the scala program. To make your program more convenient, you can write a shell script file that invokes scala the correct way, thus making your program appear like any other program on the platform.

answer Jun 28, 2016 by Shivam Kumar Pandey
Similar Questions
+2 votes

I am using IntelliJ IDEA 13.1.4 and also tried the latest release 14.
Running SBT I get the following error:
Error:Cannot determine Java VM executable in selected JDK
I have JDK 1.7 installed on my machine and on PATH.

+2 votes

How do I make a checkbox required on an ASP.NET form?

...