Hi Ted and Adrian,

I think the message re the Java version is noise from Ant.

The message comes from the ant build file, see

https://fisheye6.atlassian.com/browse/ofbiz/trunk/macros.xml?hb=true#to31

Try changing line 31 of macros.xml in the OFBiz root to 

<fail unless="javaatleast16" message="Ant detected java version
${ant.java.version}. Please upgrade java to at least 1.6"/>

and you'll get a report on the version of Java detected by Ant.

According to

http://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version

Ant uses the executable path and not Java-related environment variables to
determine the version of Java, and that could be flawed.

It's possible OpenJDK has a different format for the version, which might
need a tweak to the regex in macros.xml.

Let us know how you go.

Cheers

Paul Foxworthy


Ted Byers wrote
> There is no older version of Java on the virtual machines in question.  In
> each case, it is a free install of OpenSuse 12.1 or 12.3 (I tried both).
> And after installing the OS, I installed OpenJDK.  I actually tried three
> cases, following identical steps, save the Linux installed: One was
> OpenSuse 12.1, the second was OpenSuse 12.3, and the third was Ubuntu
> 12.04.  On the latter two, OpenJDK 7 was installed, and on the first it
> was
> OpenJDK 6.  Only he build on Ubuntu worked.  In all three cases, there is
> only one version of the JDK installed.  I did not examine the value of
> JAVA_HOME.  As I am still learning Linux, I am not sure how to do so. 
> That
> said, I do not see it getting the wrong value as there is only one version
> of the JDK on each of these systems.
> 
> What makes this especially odd is that I had installed OFBiz trunk on a
> OpenSuse 12.1 virtual machine without problems (and fllowing precisely the
> same steps that I describe above), so I'd infer that something changed in
> the OFBiz source since then that has caused this problem.
> 
> Cheers
> 
> Ted
> 
> 
> On Wed, Apr 24, 2013 at 9:33 AM, Christian Geisert <

> christian.geisert@

>> wrote:
> 
>> I can only confirm that it works with OpenJDK 7 on Ubuntu 12.10
>> [OpenJDK Runtime Environment (IcedTea 2.3.9)
>> (7u21-2.3.9-0ubuntu0.12.10.1)]
>>
>> It sounds like your Java environment is broken. Does $JAVA_HOME point to
>> an old Java version?
>>
>> You might check the output of './ant -diagnostics' to see which Java
>> version gets used.
>>
>> Christian
>>
>>
>> Am 24.04.2013 14:50, schrieb Ted Byers:
>>
>>  I do not know why, but it seems to build fine using OpenJDK 7 on Ubuntu
>> (I
>>> did that), but it fails, with the errors I reported in this thread, on
>>> Suse, with both OpenJDK 6 and OpenJDK 7.  Whatever the problem is, as
>>> far
>>> as I can see, it is related to the Linux distribution in use.
>>>
>>> Cheers,
>>>
>>> Ted
>>>
>>>
>>> On Wed, Apr 24, 2013 at 7:58 AM, Paul Foxworthy &lt;

> [email protected]

> &gt;
>>> wrote:
>>>
>>>  Hi Adrian,
>>>>
>>>> I personally haven't tested it out, but according to OFBIZ-4638
>>>> (https://issues.apache.org/**jira/browse/OFBIZ-4638&lt;https://issues.apache.org/jira/browse/OFBIZ-4638&gt;)
>>>> OFBiz does build with
>>>> OpenJDK 7.
>>>>
>>>> If there is a problem, can some one say what it is?
>>>>
>>>> Cheers
>>>>
>>>> Paul Foxworthy
>>>>
>>>>
>>>> Adrian Crum-3 wrote
>>>>
>>>>> I agree it can be frustrating trying to get a project to build for the
>>>>> first time.
>>>>>
>>>>> OFBiz does not currently support Java 1.7, so if you are willing to
>>>>> investigate further on your local copy, we would welcome any patches
>>>>> that enable the project to support Java 1.7.
>>>>>
>>>>> -Adrian
>>>>>
>>>>> On 4/21/2013 9:31 PM, Ted Byers wrote:
>>>>>
>>>>>> This is regardless of whether I try to build trunk or release 12.04.
>>>>>>
>>>>>> If I run 'ant run-install, I get the error "/opt/ofbuz/build.xml:23
>>>>>>
>>>>> can't
>>>>
>>>>> declare any more prefixes in this context".  It seems OFBiz has it's
>>>>> own
>>>>>> version of ant, and God only knows how that will interact with my
>>>>>> system
>>>>>> as
>>>>>> my system has the latest versions of my usual development tools.
>>>>>>  Worse,
>>>>>> I
>>>>>> have seen no mention of OFBiz using non-standard tools anywhere in
>>>>>> the
>>>>>> documentatin I have read.  I am not amused.
>>>>>>
>>>>>> If I run "./ant run-install", I get the error
>>>>>> "/opt/ofibiz/build.xml:25:
>>>>>> The following error occurred while executing this line:
>>>>>> /opt/ofbiz/macros.xml:31: Please upgrade java to at least 1.6"
>>>>>>
>>>>>> Of course this is really stupid, as this is on OpenSuse 12.3, and I
>>>>>> have
>>>>>> the full JDK installed, version 1.7.0_17!  How is it your build
>>>>>> scripts
>>>>>> can't properly detect the JDK version that is installed on this
>>>>>> system
>>>>>>
>>>>>> Now, then, what is the magic incantation I need to resort to to get
>>>>>> this
>>>>>> thing to build properly?  Nothing I have tried so far has worked.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Ted
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----
>>>> --
>>>> Coherent Software Australia Pty Ltd
>>>> http://www.coherentsoftware.**com.au/&lt;http://www.coherentsoftware.com.au/&gt;
>>>>
>>>> Bonsai ERP, the all-inclusive ERP system
>>>> http://www.bonsaierp.com.au/
>>>>
>>>> --
>>>> View this message in context:
>>>> http://ofbiz.135035.n4.nabble.**com/OFBiz-build-seriously-**
>>>> broken-or-so-it-seems-**tp4640774p4640872.html&lt;http://ofbiz.135035.n4.nabble.com/OFBiz-build-seriously-broken-or-so-it-seems-tp4640774p4640872.html&gt;
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>
> 
> 
> -- 
> R.E.(Ted) Byers, Ph.D.,Ed.D.

> TED@

> CTO
> Merchant Services Corp.
> 17665 Leslie st., unit 30
> Newmarket , Ontario
> L3Y 3E3





-----
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/OFBiz-build-seriously-broken-or-so-it-seems-tp4640774p4640930.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to