Probably the least interesting question but has anyone created a JAVA application that does the same job as the Virtualbox GUI? by using the files supplied in the SDK?
I have managed to create a JAVA app using Netbeans IDE, my app uses the clienttest(altered some code myself) make file found in the SDK and it runs a premade UUID that I have already hard-coded in my script. I am not an expert programmer but Im keen on learning. Im trying to make use of the CLASS files in the SDK to provide function to my tabs in my applicatin i.e RAM - set the specified value, HDD - set the space for hard disk. For example with RAM i have read this function associates with 2 methods setMemorySize() and getMemorySize(), trying figure out how to link my script to these methods to provide the function Im wanting.
Can anyone advise or provide me a base on this? or anything, will help alot
thanks
New Software
-
CIvandal
- Posts: 5
- Joined: 7. Oct 2010, 23:52
- Primary OS: MS Windows XP
- VBox Version: OSE Fedora
- Guest OSses: Linux
Re: New Software
Im trying to get the following method to work in my script. I copied this patchment from the SDK doc. Any advise on the below? who was successfully programmed a front-end for virtualbox?
public static void setMemory(){
IWebsessionManager mgr = null;
IVirtualBox vbox = mgr.logon("test", "test");
long var = 512;
IMachine machine = ; // read-only machine
ISession session = mgr.getSessionObject(vbox);
vbox.openSession(session, machine.getId()); // machine is now locked
IMachine mutable = session.getMachine(); // obtain mutable machine
mutable.setMemorySize(var);
mutable.saveSettings(); // write settings to XML
session.close();
}
public static void setMemory(){
IWebsessionManager mgr = null;
IVirtualBox vbox = mgr.logon("test", "test");
long var = 512;
IMachine machine = ; // read-only machine
ISession session = mgr.getSessionObject(vbox);
vbox.openSession(session, machine.getId()); // machine is now locked
IMachine mutable = session.getMachine(); // obtain mutable machine
mutable.setMemorySize(var);
mutable.saveSettings(); // write settings to XML
session.close();
}