-
Bug
-
Resolution: Done
-
Major
-
3.0.11, 4.0.0
-
None
During preparation on workshop about Byteman I found that tools sh scripts do not work when paths contains spaces.
You can get errors from the shell script like Unable to find byteman home or Cannot locate byteman jar.
Similar for JAVA_HOME set with spaces you can get something similar to this
[ochaloup@ochaloup task1 (basics_tasks)]$ $BYTEMAN_HOME/bin/bmsubmit.sh 10495 Failed to process request: java.lang.Exception: Invalid rule file: 10495 -- Args were: [10495] java.lang.Exception: Invalid rule file: 10495 at org.jboss.byteman.agent.submit.Submit.getRulesFromRuleFiles(Submit.java:829) at org.jboss.byteman.agent.submit.Submit.addRulesFromFiles(Submit.java:554) at org.jboss.byteman.agent.submit.Submit.main(Submit.java:1147) [ochaloup@ochaloup task1 (basics_tasks)]$ /home/ochaloup/presentations/byteman-workshop/libs/byteman-download-4.0.0/bin/bminstall.sh 10495 /home/ochaloup/presentations/byteman-workshop/libs/byteman-download-4.0.0/bin/bminstall.sh: line 86: [: too many arguments Cannot locate tools jar Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.AttachNotSupportedException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more [ochaloup@ochaloup task1 (basics_tasks)]$ echo $JAVA_HOME /home/ochaloup/presentations/byteman-workshop/libs/j d k