- コミット日時:
- 2008/12/10 11:39:50 (3 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/org.intra_mart.jst.server.generic.resin/src/org/intra_mart/jst/server/generic/resin/ResinServerBehaviour.java
r35 r36 34 34 * (boolean) 35 35 */ 36 public void stop( boolean force) {36 public void stop(final boolean force) { 37 37 terminate(); 38 38 } … … 45 45 * .lang.String) 46 46 */ 47 public void restart( String launchMode) throws CoreException {47 public void restart(final String launchMode) throws CoreException { 48 48 terminate(); 49 49 getServer().start(launchMode, new NullProgressMonitor()); … … 65 65 */ 66 66 @SuppressWarnings("unchecked") 67 protected void setupLaunchClasspath(ILaunchConfigurationWorkingCopy workingCopy, IVMInstall vmInstall, List classPathList) { 67 protected void setupLaunchClasspath(final ILaunchConfigurationWorkingCopy workingCopy, final IVMInstall vmInstall, final List classPathList) { 68 69 Path compilerPath = null; 68 70 69 71 if (System.getProperty("os.name").toLowerCase().startsWith("mac")) { 70 72 // mac. 71 classPathList.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(new File(vmInstall.getInstallLocation().getParent()).getAbsolutePath() + File.separator + "Classes" + File.separator + "classes.jar"))); 73 // vm intall location : /System/Library/Frameworks/JavaVM.framework/Versions/1.x.x/Home 74 // classes.jar location : /System/Library/Frameworks/JavaVM.framework/Versions/1.x.x/Classes/classes.jar 75 compilerPath = new Path(new File(vmInstall.getInstallLocation().getParent()).getAbsolutePath() + File.separator + "Classes" + File.separator + "classes.jar"); 72 76 } else { 73 77 // others. 74 classPathList.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(vmInstall.getInstallLocation().getAbsolutePath() + File.separator + "lib" + File.separator + "tools.jar"))); 78 // tools.jar location : %vmInstallLoaction%/lib/tools.jar 79 compilerPath = new Path(vmInstall.getInstallLocation().getAbsolutePath() + File.separator + "lib" + File.separator + "tools.jar"); 80 } 81 82 if (compilerPath != null && compilerPath.toFile().exists()) { 83 // 存在しなければ追加しない 84 // -> 手動でresin.xmlを<javac compiler="javac" args="-source 1.5"/>に変更してもらう? 85 classPathList.add(JavaRuntime.newArchiveRuntimeClasspathEntry(compilerPath)); 75 86 } 76 87 … … 91 102 */ 92 103 @Override 93 protected void setupLaunch( ILaunch launch, String launchMode,IProgressMonitor monitor) throws CoreException {104 protected void setupLaunch(final ILaunch launch, final String launchMode, final IProgressMonitor monitor) throws CoreException { 94 105 createConfigFile(); 95 106 super.setupLaunch(launch, launchMode, monitor); … … 134 145 */ 135 146 protected void createConfigFile() { 136 File file = new File(getRuntimeDelegate().getRuntime().getLocation().toFile(), "/conf/" + getConfigFileName());147 final File file = new File(getRuntimeDelegate().getRuntime().getLocation().toFile(), "/conf/" + getConfigFileName()); 137 148 138 149 if (file.exists()) { … … 148 159 149 160 int size = 0; 150 byte[] buff = new byte[1024];161 final byte[] buff = new byte[1024]; 151 162 152 163 while ((size = in.read(buff)) != -1) { … … 154 165 } 155 166 out.flush(); 156 } catch ( FileNotFoundException e) {167 } catch (final FileNotFoundException e) { 157 168 throw new RuntimeException(e); 158 } catch ( IOException e) {169 } catch (final IOException e) { 159 170 throw new RuntimeException(e); 160 171 } finally { … … 162 173 try { 163 174 out.close(); 164 } catch ( IOException e) {175 } catch (final IOException e) { 165 176 // ignore. 166 177 } … … 170 181 try { 171 182 in.close(); 172 } catch ( IOException e) {183 } catch (final IOException e) { 173 184 // ignore. 174 185 }
