Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-2010, 08:04 PM
New Member
 
Posts: 4
Default Zimbra Build can't see JDK 1.5

Hello,

I am trying to build Zimbra from the main branch on Slackware-current, source downloaded today with perforce, as per Building Zimbra using Perforce - Zimbra :: Wiki

I have downloaded jdk 1.5, put it in /usr/local, and symlinked it to java, as requested by the by the build script, but it still can't see jdk 1.5. Here is my /usr/local dir:

Code:
drwxr-xr-x  2 root   root  4.0K 2010-04-26 13:55 bin
drwxr-xr-x  2 root   root  4.0K 2010-03-07 17:27 etc
drwxr-xr-x  2 root   root  4.0K 1993-11-24 12:32 games
drwxr-xr-x  4 root   root  4.0K 2010-04-08 00:26 include
drwxr-xr-x  2 root   root  4.0K 1993-11-24 12:32 info
lrwxrwxrwx  1 root   root    12 2010-05-13 20:38 java -> jdk1.5.0_22/
drwxr-xr-x  9 root   root  4.0K 2009-10-09 06:40 jdk1.5.0_22
drwxr-xr-x  5 root   root  4.0K 2010-04-26 13:55 lib
drwxr-xr-x  3 root   root  4.0K 2010-03-07 17:26 libexec
drwxr-xr-x 22 root   root  4.0K 2010-04-08 00:26 man
drwxr-xr-x 22 root   root  4.0K 2010-03-03 16:55 netbeans-6.8
drwxr-xr-x  2 root   root  4.0K 2010-03-07 17:27 sbin
drwxr-xr-x  8 root   root  4.0K 2010-02-02 17:27 sges-v3
drwxr-xr-x  9 root   root  4.0K 2010-04-26 13:55 share
drwxr-xr-x  7 mtkoan users  12K 2010-05-13 21:22 src
and the error from buildZCS.sh:
Code:
Checking for prerequisite binaries
  Checking ant
./buildZCS.sh: line 79: [: too many arguments
  Checking java
Error: java not found
Please obtain JDK 1.5 from:
http://java.sun.com/javase/downloads/index_jdk5.jsp
And install it in /usr/local
Then symlink it to /usr/local/java
Can anyone help?
Reply With Quote
  #2 (permalink)  
Old 05-13-2010, 09:34 PM
Trained Alumni
 
Posts: 104
Default

Despite what it's telling you, it actually needs to have java in your PATH. You probably need to add /usr/local/java/bin to your PATH before telling it to compile.
Reply With Quote
  #3 (permalink)  
Old 05-17-2010, 03:23 AM
Starter Member
 
Posts: 2
Default

I've got the very same error message because java ran out of memory (needs >256MB, final .jar build fails with 512MB).

If you're on a shared hoster, try getting more memory.
Reply With Quote
  #4 (permalink)  
Old 05-19-2010, 04:34 PM
Zimbra Employee
 
Posts: 580
Default

You need to figure out why the check for ant is failing as well.
__________________
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration
Reply With Quote
  #5 (permalink)  
Old 05-19-2010, 05:17 PM
New Member
 
Posts: 4
Default

I'm sure ant is failing? It IS installed, and gave an error that it wasn't prior my installing it. The line (in the script) which is now bad syntax, (not sure why) is:

Code:
if [ $MAJOR -eq 1 -a $MINOR -lt 6  -a $PATCH -lt 5 ]; then
Reply With Quote
  #6 (permalink)  
Old 05-20-2010, 02:32 AM
Starter Member
 
Posts: 2
Default

Quote:
Originally Posted by mtkoan View Post
The line (in the script) which is now bad syntax, (not sure why) is:

Code:
if [ $MAJOR -eq 1 -a $MINOR -lt 6  -a $PATCH -lt 5 ]; then
$MAJOR and $MINOR are extracted from java's/ant's output.
Unfortunatelly, zimbra scripts don't check if that output makes any sense. Furthermore, $MAJOR etc. are not quoted in the test.

So if the java output is "Could not start the virtual machine", that will be pasted as $MAJOR, resulting in
Code:
 if [ Could not start the virtual machine -eq 1 ... ]
Too many arguments for `test`.
Reply With Quote
  #7 (permalink)  
Old 05-20-2010, 02:52 PM
New Member
 
Posts: 4
Default

Quite right, I checked this yesterday after you posted. Ant is looking for tools.jar in the wrong, place: /usr/lib/java/lib/tools.jar

while its actually in /usr/lib/java/jdk1.6.0_18/lib

or, for jdk 1.5
/usr/local/java/lib
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.