Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2017-07-21 10:30:21 +0000
committerSravan Kumar Lakkimsetti2017-07-21 12:50:04 +0000
commit90ba831066426b52000e8510b4a59b3a7d07d7a1 (patch)
tree809f67ea3e7ab2ad2be85f9e29d39898f7f7e367 /bundles/org.eclipse.test.performance/src/org/eclipse/test
parentfa9faa7d1a3dc6abba29be9d57850651202aebfc (diff)
downloadeclipse.platform.releng-90ba831066426b52000e8510b4a59b3a7d07d7a1.tar.gz
eclipse.platform.releng-90ba831066426b52000e8510b4a59b3a7d07d7a1.tar.xz
eclipse.platform.releng-90ba831066426b52000e8510b4a59b3a7d07d7a1.zip
Bug 520012: Screenshots.takeScreenshot fails due to classpath errorI20170725-2000I20170724-2000I20170723-2000I20170722-2000I20170722-0045I20170721-2000
Append bin/ to the classpath, so that the correct classpath is passed to the ProcessBuilder Change-Id: Ib423a4fb4ce9b50b669da138742935ecb5d9694a Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.test.performance/src/org/eclipse/test')
-rw-r--r--bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/AwtScreenshot.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/AwtScreenshot.java b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/AwtScreenshot.java
index e8011dc9..1ee8556e 100644
--- a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/AwtScreenshot.java
+++ b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/AwtScreenshot.java
@@ -79,6 +79,9 @@ public class AwtScreenshot {
try {
URL location = AwtScreenshot.class.getProtectionDomain().getCodeSource().getLocation();
String cp = location.toURI().getPath();
+ if (new File(cp).isDirectory() && !cp.endsWith(File.separatorChar + "bin" + File.separatorChar)) {
+ cp += "bin" + File.separatorChar;
+ }
String javaHome = System.getProperty("java.home");
String javaExe = javaHome + File.separatorChar + "bin" + File.separatorChar + "java";
if (File.separatorChar == '\\') {

Back to the top