< prev index next >

test/jdk/tools/jpackage/helpers/JPackagePath.java

Print this page




 135         }
 136     }
 137 
 138     // Returns path to app working directory without --name (where test application generates its output)
 139     public static String getAppWorkingDirNoName() {
 140          if (JPackageHelper.isWindows()) {
 141             return "output" + File.separator + "Hello" + File.separator + "app";
 142         } else if (JPackageHelper.isOSX()) {
 143             return "output" + File.separator + "Hello.app" + File.separator + "Contents"
 144                     + File.separator + "Java";
 145         } else if (JPackageHelper.isLinux()) {
 146             return "output" + File.separator + "Hello" + File.separator + "app";
 147         } else {
 148             throw new AssertionError("Cannot detect platform");
 149         }
 150     }
 151 
 152     // Returns path including executable to java in image runtime folder
 153     public static String getRuntimeJava() {
 154         if (JPackageHelper.isWindows()) {
 155             return "output" + File.separator + "test" + File.separator + "runtime" + File.separator

 156                     + "bin" + File.separator + "java.exe";
 157         } else if (JPackageHelper.isOSX()) {
 158             return "output" + File.separator + "test.app" + File.separator
 159                     + "Contents" + File.separator + "PlugIns" + File.separator
 160                     + "Java.runtime" + File.separator + "Contents" + File.separator
 161                     + "Home" + File.separator + "bin" + File.separator + "java";
 162         } else if (JPackageHelper.isLinux()) {
 163             return "output" + File.separator + "test" + File.separator + "runtime" + File.separator

 164                     + "bin" + File.separator + "java";
 165         } else {
 166             throw new AssertionError("Cannot detect platform");
 167         }
 168     }
 169 
 170     // Returns output file name generate by test application
 171     public static String getAppOutputFile() {
 172         return "appOutput.txt";
 173     }
 174 
 175     // Returns path to bin folder in image runtime
 176     public static String getRuntimeBin() {
 177         if (JPackageHelper.isWindows()) {
 178             return "output" + File.separator + "test" + File.separator + "runtime"
 179                     + File.separator + "bin";
 180         } else if (JPackageHelper.isOSX()) {
 181             return "output" + File.separator + "test.app" + File.separator + "Contents"
 182                     + File.separator + "PlugIns" + File.separator + "Java.runtime"
 183                     + File.separator + "Contents" + File.separator + "Home" + File.separator
 184                     + "bin";

 185         } else if (JPackageHelper.isLinux()) {
 186             return "output" + File.separator + "test" + File.separator + "runtime"
 187                     + File.separator + "bin";
 188         } else {
 189             throw new AssertionError("Cannot detect platform");
 190         }
 191     }
 192 
 193     public static String getWinProgramFiles() {
 194         return WIN_PROGRAM_FILES;
 195     }
 196 
 197     public static String getWinUserLocal() {
 198         return System.getProperty("user.home") + File.separator + "AppData"
 199                  + File.separator + "Local";
 200     }
 201 
 202     public static String getWinStartMenu() {
 203         return WIN_START_MENU;
 204     }
 205 
 206     public static String getWinPublicDesktop() {
 207         return WIN_PUBLIC_DESKTOP;




 135         }
 136     }
 137 
 138     // Returns path to app working directory without --name (where test application generates its output)
 139     public static String getAppWorkingDirNoName() {
 140          if (JPackageHelper.isWindows()) {
 141             return "output" + File.separator + "Hello" + File.separator + "app";
 142         } else if (JPackageHelper.isOSX()) {
 143             return "output" + File.separator + "Hello.app" + File.separator + "Contents"
 144                     + File.separator + "Java";
 145         } else if (JPackageHelper.isLinux()) {
 146             return "output" + File.separator + "Hello" + File.separator + "app";
 147         } else {
 148             throw new AssertionError("Cannot detect platform");
 149         }
 150     }
 151 
 152     // Returns path including executable to java in image runtime folder
 153     public static String getRuntimeJava() {
 154         if (JPackageHelper.isWindows()) {
 155             return "output" + File.separator + "test"
 156                     + File.separator + "runtime" + File.separator
 157                     + "bin" + File.separator + "java.exe";
 158         } else if (JPackageHelper.isOSX()) {
 159             return "output" + File.separator + "test.app" + File.separator
 160                     + "Contents" + File.separator
 161                     + "runtime" + File.separator + "Contents" + File.separator
 162                     + "Home" + File.separator + "bin" + File.separator + "java";
 163         } else if (JPackageHelper.isLinux()) {
 164             return "output" + File.separator + "test"
 165                     + File.separator + "runtime" + File.separator
 166                     + "bin" + File.separator + "java";
 167         } else {
 168             throw new AssertionError("Cannot detect platform");
 169         }
 170     }
 171 
 172     // Returns output file name generate by test application
 173     public static String getAppOutputFile() {
 174         return "appOutput.txt";
 175     }
 176 
 177     // Returns path to bin folder in image runtime
 178     public static String getRuntimeBin() {
 179         if (JPackageHelper.isWindows()) {
 180             return "output" + File.separator + "test"
 181                     + File.separator + "runtime" + File.separator + "bin";
 182         } else if (JPackageHelper.isOSX()) {
 183             return "output" + File.separator + "test.app"
 184                     + File.separator + "Contents"
 185                     + File.separator + "runtime"
 186                     + File.separator + "Contents"
 187                     + File.separator + "Home" + File.separator + "bin";
 188         } else if (JPackageHelper.isLinux()) {
 189             return "output" + File.separator + "test"
 190                     + File.separator + "runtime" + File.separator + "bin";
 191         } else {
 192             throw new AssertionError("Cannot detect platform");
 193         }
 194     }
 195 
 196     public static String getWinProgramFiles() {
 197         return WIN_PROGRAM_FILES;
 198     }
 199 
 200     public static String getWinUserLocal() {
 201         return System.getProperty("user.home") + File.separator + "AppData"
 202                  + File.separator + "Local";
 203     }
 204 
 205     public static String getWinStartMenu() {
 206         return WIN_START_MENU;
 207     }
 208 
 209     public static String getWinPublicDesktop() {
 210         return WIN_PUBLIC_DESKTOP;


< prev index next >