在执行grails / groovy时,linux上没有控制台输出 [英] No console output available on linux when executing grails/groovy

查看:601
本文介绍了在执行grails / groovy时,linux上没有控制台输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当执行groovy脚本或grails应用程序时,没有输出/输入可用 - >只是一个清除控制台屏幕。即使没有启动X-Window-System,输出也不可见。



我也尝试过:




  • grails compile --plain-output



$ b

  • 在IntelliJ中执行grails命令(与grailsCommand正常工作,

    解决方案

    什么版本的grails?

      env | grep JAVA_HOME 
    JAVA_HOME = / usr / lib / jvm / java -6-openjdk-amd64 /

    env | grep GRAILS
    GRAILS_HOME = / home / vahid / ggts-bundle / grails-2.3.7 /


    grails别名为`/home/vahid/ggts-bundle/grails-2.3.7/bin/grails'

    别名| grep grails
    别名grails ='/ home /vahid/ggts-bundle/grails-2.3.7/bin/grails'

    你看到了什么

      grails refresh-dependencies --plain-output 2> ;& 1> /tmp/vh.txt 

    上述将所有输出重定向到/tmp/vh.txt

      cat /tmp/vh.txt 
    |加载Grails 2.3.7
    |配置类路径

    |环境设置为开发
    ....
    |刷新依赖关系。


    When a groovy script or a grails app is executed, there is no output/input available -> just a clear console screen. Even without starting the X-Window-System, the output is not visible.

    I tried also:

    • grails compile --plain-output (does not work too)
    • executing grails commands in IntelliJ (works fine with grailsCommand, but not on CommandLine)

    How can the output made visible?

    Thank you

    解决方案

    What version of grails?

    env|grep JAVA_HOME
    JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/
    
    env|grep GRAILS
    GRAILS_HOME=/home/vahid/ggts-bundle/grails-2.3.7/
    
    which grails
    grails is aliased to `/home/vahid/ggts-bundle/grails-2.3.7/bin/grails'
    
    alias|grep grails
    alias grails='/home/vahid/ggts-bundle/grails-2.3.7/bin/grails'
    

    Do you see anything actually being done, or is it after completion that it does not show up?

    grails refresh-dependencies --plain-output 2>&1 > /tmp/vh.txt
    

    The above redirected all output to /tmp/vh.txt

    cat /tmp/vh.txt 
    |Loading Grails 2.3.7
    |Configuring classpath
    .
    |Environment set to development
    ....
    |Dependencies refreshed.
    

    这篇关于在执行grails / groovy时,linux上没有控制台输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆