Skip to content

Commit

Permalink
Issues warning and links to bug report
Browse files Browse the repository at this point in the history
  • Loading branch information
peteflorence committed Aug 19, 2015
1 parent 6581119 commit f8f57fa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drake/addpath_drake.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f8f57fa

Please sign in to comment.