Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cannot execute hello world script
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Pérez  
View profile  
 More options Nov 19 2012, 5:37 am
From: David Pérez <san...@gmail.com>
Date: Mon, 19 Nov 2012 02:37:50 -0800 (PST)
Local: Mon, Nov 19 2012 5:37 am
Subject: Cannot execute hello world script

Dear Scala gurus,

I have written some scripts in Scala.

But now, I cannot even run a hello world script like this:

#!/bin/sh
    exec scala "$0" "$@"
!#
Console.println("Hello, world!")

under Centos 6.2.

I have installed the official rpm for Scala 2.9.2.

Of course, execute permissions are set.

I'm confused because I can run Scala scripts normally in other CentOS 6.2
computer.

The symptomps are that when running from the console, it freezes for ever.

Any idea please?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pérez  
View profile  
 More options Nov 19 2012, 6:31 am
From: David Pérez <san...@gmail.com>
Date: Mon, 19 Nov 2012 03:31:01 -0800 (PST)
Local: Mon, Nov 19 2012 6:31 am
Subject: Re: Cannot execute hello world script

More information:

java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.6)
(rhel-1.43.1.10.6.el6_2-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

I have saved the hello world script to a file called "hello".

It freezes with:

$ ./hello
$ scala hello

El lunes, 19 de noviembre de 2012 11:37:50 UTC+1, David Pérez escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Sobral  
View profile  
 More options Nov 19 2012, 6:57 am
From: Daniel Sobral <dcsob...@gmail.com>
Date: Mon, 19 Nov 2012 09:56:35 -0200
Local: Mon, Nov 19 2012 6:56 am
Subject: Re: [scala-user] Re: Cannot execute hello world script

There are two things you may want to look at. First, `hostname`  must
resolve to your host's IP address -- even if it's 127.0.0.1. Second, there
may be an fsc daemon running causing the trouble. Try running fsc -shutdown.

--
Daniel C. Sobral

I travel to the future all the time.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pérez  
View profile  
 More options Nov 19 2012, 7:24 am
From: David Pérez <san...@gmail.com>
Date: Mon, 19 Nov 2012 13:24:06 +0100
Local: Mon, Nov 19 2012 7:24 am
Subject: Re: [scala-user] Re: Cannot execute hello world script

Thanks Daniel for your hints,

hostname works ok and no fsc daemon was running.

Any more ideas?
Am I the only one having such a basic problem?

---------------------
Saber es poder
        David

2012/11/19 Daniel Sobral <dcsob...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pérez  
View profile  
 More options Nov 19 2012, 11:33 am
From: David Pérez <san...@gmail.com>
Date: Mon, 19 Nov 2012 17:32:44 +0100
Local: Mon, Nov 19 2012 11:32 am
Subject: Re: [scala-user] Re: Cannot execute hello world script

Thanks Paul!!!!
It has solved my problem.
I wonder why I do need this parameter in one equipment and don't in other
ones.
I think -nc means no compile daemon.  Does it?
Is this a Scala bug or a misconfiguration?.

---------------------
        David

2012/11/19 Paul Phillips <pa...@improving.org>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Zaugg  
View profile  
 More options Nov 19 2012, 11:37 am
From: Jason Zaugg <jza...@gmail.com>
Date: Mon, 19 Nov 2012 17:36:44 +0100
Local: Mon, Nov 19 2012 11:36 am
Subject: Re: [scala-user] Re: Cannot execute hello world script

On Mon, Nov 19, 2012 at 5:32 PM, David Pérez <san...@gmail.com> wrote:
> Thanks Paul!!!!
> It has solved my problem.
> I wonder why I do need this parameter in one equipment and don't in other
> ones.
> I think -nc means no compile daemon.  Does it?
> Is this a Scala bug or a misconfiguration?.

The compile daemon is an optimization to make startup of the script faster.
But has some known issues on certain systems related to TCP/IP
configuration (here's an in-flight attempt to fix one of them [1])

-jason

[1] https://github.com/scala/scala/pull/1646


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pérez  
View profile  
 More options Nov 19 2012, 11:39 am
From: David Pérez <san...@gmail.com>
Date: Mon, 19 Nov 2012 17:39:22 +0100
Local: Mon, Nov 19 2012 11:39 am
Subject: Re: [scala-user] Re: Cannot execute hello world script

Found also this problems related to scripts:
http://article.gmane.org/gmane.comp.lang.scala.user/55287

---------------------
Saber es poder
        David

2012/11/19 Jason Zaugg <jza...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »