You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Daniel Spiewak (JIRA)" <ji...@apache.org> on 2009/06/23 19:50:07 UTC
[jira] Created: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Verify JAVA_HOME for Improved Error Messages
--------------------------------------------
Key: BUILDR-289
URL: https://issues.apache.org/jira/browse/BUILDR-289
Project: Buildr
Issue Type: Bug
Components: Core features
Affects Versions: 1.3.4
Reporter: Daniel Spiewak
Assignee: Daniel Spiewak
Fix For: 1.3.5
Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Posted by "Daniel Spiewak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723230#action_12723230 ]
Daniel Spiewak commented on BUILDR-289:
---------------------------------------
I'm pretty sure that rt.jar is part of the JRE spec, so there's really no way that it *can't* be included. I see the error message when attempting to use Commands::Java.java e.g. for running Specs:
Running tests in gll-combinators
Running java org.apache.buildr.SpecsSingletonRunner
sh: /bin/java: No such file or directory
> Verify JAVA_HOME for Improved Error Messages
> --------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Posted by "Daniel Spiewak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723284#action_12723284 ]
Daniel Spiewak commented on BUILDR-289:
---------------------------------------
That sounds like a good plan. Considering that Java::java is really the only problem spot, performing the check there would make a lot of sense.
> Verify JAVA_HOME for Improved Error Messages
> --------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (BUILDR-289) Improve error message when JAVA_HOME
points to an invalid JRE/JDK installation
Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Boisvert updated BUILDR-289:
---------------------------------
Summary: Improve error message when JAVA_HOME points to an invalid JRE/JDK installation (was: Verify JAVA_HOME for Improved Error Messages)
> Improve error message when JAVA_HOME points to an invalid JRE/JDK installation
> ------------------------------------------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723251#action_12723251 ]
Assaf Arkin commented on BUILDR-289:
------------------------------------
The contents of rj.jar is part of the JRE spec, I'm not sure about the location, or that all JDKs will honor it.
Form looking at the code to path_to_bin, setting JAVA_HOME to empty string will indeed look for /bin/java. I think it will be more reliable for Java::Commands.java to complain if it can't find java than to depend on something else looking for indirect hints like existence of rt.jar.
> Verify JAVA_HOME for Improved Error Messages
> --------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723227#action_12723227 ]
Assaf Arkin commented on BUILDR-289:
------------------------------------
tools_jar used to do that, looking for tools.jar (rt.jar is JRE), but turns out it doesn't exist on all platforms. do we have a guarantee that rj.jar exists on all platforms?
For running executables, those are found with path_to_bin, which complains if JAVA_HOME is not found, otherwise the call to system does swallow the error message and you need --trace to figure out what went wrong.
Where do you see "/bin/java does not exist"?
> Verify JAVA_HOME for Improved Error Messages
> --------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (BUILDR-289) Improve error message when JAVA_HOME
points to an invalid JRE/JDK installation
Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Boisvert resolved BUILDR-289.
----------------------------------
Resolution: Fixed
Fixed.
boisvert@sixtine:~/svn/buildr-trunk$ svn commit -m "BUILDR-289: Improve error message when JAVA_HOME points to an invalid JRE/JDK installation"
Sending CHANGELOG
Sending lib/buildr/java/commands.rb
Sending spec/java/java_spec.rb
Transmitting file data ...
Committed revision 816748.
> Improve error message when JAVA_HOME points to an invalid JRE/JDK installation
> ------------------------------------------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-289) Verify JAVA_HOME for Improved Error
Messages
Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723270#action_12723270 ]
Assaf Arkin commented on BUILDR-289:
------------------------------------
We only ever use path_to_bin for the java command, so maybe we should fold it in and check for existence of the bin, and if not just warn that JAVA_HOME is (probably) set improperly?
> Verify JAVA_HOME for Improved Error Messages
> --------------------------------------------
>
> Key: BUILDR-289
> URL: https://issues.apache.org/jira/browse/BUILDR-289
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.3.4
> Reporter: Daniel Spiewak
> Assignee: Daniel Spiewak
> Fix For: 1.3.5
>
>
> Buildr uses the JAVA_HOME environment variable for a number of core tasks. However, if that variable does not point to a valid JDK, the result will be a failure at some point with a generally confusing error message (usually something on the order of " /bin/java does not exist"). We should actually check to make sure that JAVA_HOME is valid before attempting to use it for the first time. This check could be as simple as looking for rt.jar and a few of the executables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.