SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And now the last output didn't appear until I clicked into xterm... strange.
Edit:
When I tried running the second example without "HelloWorld.main(args)" and without compiling, I received an error message. It seems, that you have to add this line only when running without compiling it first.
Sorry, I know C, C++, Ruby, Python and very little Java... never worked with scala
By the way, if you’re on some flavor of Unix, you can run a Scala script
as a shell script by prepending a “pound bang” directive at the top of the file.
For example, type the following into a file named helloarg:
#!/bin/sh
exec scala "$0" "$@"
!#
// Say hello to the first argument
println("Hello, " + args(0) + "!")
The initial #!/bin/sh must be the very first line in the file. Once you set its
execute permission:
$ chmod +x helloarg
You can run the Scala script as a shell script by simply saying:
The ^C is me having to interrupt it - clicking doesn't cause the output to appear, in any terminal.
I'll try reinstalling and looking more closely at the slackbuild.
pino_otto - yes, it's handy to run scala like an interpreted language - hence my desire to get it working! I tried the bash script approach but it also gives no output
Last edited by mcnalu; 10-31-2011 at 09:30 AM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.