java - Scala REPL only runs as root user, gives error when run as non-root -


i'm running 64-bit opensuse 12.1, today downloaded latest scala 2.9.2 official website, after unpacking tgz , go scala-2.9.2/bin directory, executed "scala" , got error message:

[init] error: error while loading <root>, error in opening zip file failed initialize compiler: object scala not found. ** note of 2.8 scala not assume use of java classpath. ** old behavior pass -usejavacp scala, or if using settings ** object programatically, settings.usejavacp.value = true. 

i attempted run scala -usejavacp doesn't help. i've been using scala lot in many other distros , have never got error before.

my opensuse installation has openjdk 6 installed.

please suggest opinions, thank you!

i have made following attempts solve problem:

  1. install oracle jdk 1.7 , run scala, confirmed scala repl reports running in hotspot jvm 1.7, same error occurs.
  2. installed sbt , run "console" sbt, same error occurs.
  3. strace , diff output between sudo scala , scala normal user, there no difference except error message above.
  4. scala -ylog-classpath su , normal user, diff output, same above.
  5. disabled apparmor , tried again, same error message.
  6. download other scala versions (all of 2.9x, , 2.10 milestone 4), of repl give same error message.
  7. made sure fsc not running before scala repl runs
  8. made sure hostname resolvable

well interesting problem, i'll post solution if can luckily find it.

thanks lot help!

last edit: here , on reddit (http://www.reddit.com/r/scala/comments/w5s0m/please_help_scala_only_runs_as_root_user_gives/) offered valuable suggestions me figure out strange issue. see answer below solution.

do not put sbt-launch.jar in $scala_home/lib directory, project's lib directory, or anywhere put on classpath.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -