1 /******************************************************************************* 2 * Copyright (c) 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 12 package org.eclipse.jdt.launching; 13 14 15 /** 16 * Optional extensions that may be implemented by an 17 * {@link org.eclipse.jdt.launching.IVMInstall}. 18 * <p> 19 * When an <code>IVMInstall</code> implements this interface, 20 * clients must call <code>getVMArgs()</code> in place of 21 * <code>getVMArguments()</code> and <code>setVMArgs(String)</code> in place of 22 * <code>setVMArguments(String[])</code>. This avoids the problem noted 23 * in bug 73493. 24 * </p> 25 * <p> 26 * Additionally, this interface optionally provides the Java version 27 * associated with a VM install. 28 * </p> 29 * <p> 30 * Clients that implement {@link org.eclipse.jdt.launching.IVMInstall} may additionally 31 * implement this interface. However, it is strongly recommended that clients subclass 32 * {@link org.eclipse.jdt.launching.AbstractVMInstall} instead, which already implements 33 * this interface, and will insulate clients from additional API additions in the future. 34 * </p> 35 * @since 3.1 36 */ 37 public interface IVMInstall2 { 38 39 /** 40 * Returns VM arguments to be used with this vm install whenever this 41 * VM is launched as a raw string, or <code>null</code> if none. 42 * 43 * @return VM arguments to be used with this vm install whenever this 44 * VM is launched as a raw string, or <code>null</code> if none 45 */ 46 public String getVMArgs(); 47 48 /** 49 * Sets VM arguments to be used with this vm install whenever this 50 * VM is launched as a raw string, possibly <code>null</code>. 51 * 52 * @param vmArgs VM arguments to be used with this vm install whenever this 53 * VM is launched as a raw string, possibly <code>null</code> 54 */ 55 public void setVMArgs(String vmArgs); 56 57 /** 58 * Returns a string representing the <code>java.version</code> system property 59 * of this VM install, or <code>null</code> if unknown. 60 * 61 * @return a string representing the <code>java.version</code> system property 62 * of this VM install, or <code>null</code> if unknown. 63 */ 64 public String getJavaVersion(); 65 } 66