From f8f57fa3285c4fecfa64e58160d25d6e5c01adcc Mon Sep 17 00:00:00 2001 From: peteflorence Date: Wed, 19 Aug 2015 10:33:13 -0400 Subject: [PATCH] Issues warning and links to bug report --- drake/addpath_drake.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drake/addpath_drake.m b/drake/addpath_drake.m index d0fe75c5cace..80aa3acf1533 100644 --- a/drake/addpath_drake.m +++ b/drake/addpath_drake.m @@ -59,16 +59,15 @@ javaaddpath(fullfile(pods_get_base_path,'share','java','drake.jar')); -% OSX platform-specific: revert to IPv4 +% OSX platform-specific: check if reverted to IPv4 if (computer('arch') == 'maci64') javaoptspath = fileread([matlabroot '/bin/' computer('arch') '/java.opts']); k = strfind(javaoptspath, '-Djava.net.preferIPv4Stack=true'); if isempty(k) - setenv('DRAKE_IPV4_SET_MATLABROOT', matlabroot) - setenv('DRAKE_IPV4_SET_ARCH', computer('arch')) - display('Since you are on Mac, we will need to set your JVM to prefer IPV4 instead of IPV6 for MATLAB') - display('Please enter your sudo password below') - ! (echo "" | echo "-Djava.net.preferIPv4Stack=true") | sudo tee -a $DRAKE_IPV4_SET_MATLABROOT/bin/$DRAKE_IPV4_SET_ARCH/java.opts + display('WARNING: Your JVM may crash if you do not set it to prefer IPv4 over IPv6.') + display('This may cause any dependencies that involve the JVM (including LCM) to crash at runtime.') + display('Please see bug report and solution here: https://github.com/RobotLocomotion/drake/issues/558.') + display('(It just involves adding one line to your java.opts file for Matlab.)') end end