klipstein/dojango — Issue #50: 50 - Java missing message from "manage.py dojobuild dojango" 
Author: klipstein
Created: 2011-11-06 13:00:07+00:00
State: open

What steps will reproduce the problem?

$ python manage.py dojobuild dojango
/srv/trunk/dojango/management/commands/dojobuild.py:69: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
stdin, stdout, stderr = os.popen3(settings.DOJO_BUILD_JAVA_EXEC)
Error: Please install java. You need it for building dojo.

What is the expected output? What do you see instead?

Java is installed on my Ubuntu box, build shouldn't issue.

$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu2)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
ed@lestaro:~$ java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
...

What version of the product are you using? On what operating system?
Dojango trunk rev257, Ubuntu Lucid.

Please provide any additional information below.

ed@lestaro:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2010-05-07 18:08 /usr/bin/java -> /etc/alternatives/java
ed@lestaro:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 40 2010-05-07 18:08 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java
ed@lestaro:~$ dpkg -S /usr/lib/jvm/java-6-openjdk/jre/bin/java
openjdk-6-jre-headless: /usr/lib/jvm/java-6-openjdk/jre/bin/java
ed@lestaro:~$ python --version
Python 2.6.5

It's happening because in:
=================
stdin, stdout, stderr = os.popen3(settings.DOJO_BUILD_JAVA_EXEC)
if stderr.read():
raise CommandError('Please install java. You need it for building dojo.')
=================
stderr.read() returns:
Usage: java [-options] class [args...] ...

Original link: http://code.google.com/p/dojango/issues/detail?id=50