I’ve been trying to Run a simple program on NetBeans but just after I hit the RUN, I get a Message Box with- One or more projects were compiled with errors.Application may end unexpectedly.
When I “Run is anyway” I get the desired output for the program but if I cancel it, I get this error on the Output pane-
run: /root/.netbeans/6.8/var/cache/executor-snippets/run.xml:45:
Cancelled by user
When I click on the error, I’m taken to
<translate-classpath classpath="${classpath}" targetProperty="classpath-translated" />
line on a run.xml file.
My code is:
public class minitest {
public static void main(String[] args) {
Connect conn=null;
try{
Domain testDomain=conn.domainLookupByName("test");
System.out.println("Domain:" + testDomain.getName() + " id " +
testDomain.getID() + " running "
);
} catch (LibvirtException e){
System.out.println("exception caught:"+e);
System.out.println(e.getError());
}
}
} }
Thanks!
Seems that you don’t have all project required libraries in the classpath …
Have you verified the classpath ? For example you use libvirt, do you have libvirt jar in your project classpath ?