Supressing GUI?
- by Legend
I am trying to run a plugin designed for Vuze using Java. For this I am using a command like this:
/home/x/jre1.6.0_14/bin/java -Dazureus.config.path=/home/x/plugin_directory -Dfile.encoding=ANSI_X3.4-1968 -classpath /home/x/P/lib/swtgraphics2d.jar:/home/x/P/lib/Azureus2.jar:/home/x/P/lib/swt.jar org.gudy.azureus2.ui.swt.Main
The problem with this is that the launch is failing with an error:
changeLocale: *Default Language* != English (United States). Searching without country..
changeLocale: Searching for language English in *any* country..
changeLocale: no message properties for Locale 'English (United States)' (en_US), using 'English (default)'
Invoking main failed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:3910)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:863)
at org.eclipse.swt.widgets.Display.create(Display.java:851)
at org.eclipse.swt.graphics.Device.<init>(Device.java:152)
at org.eclipse.swt.widgets.Display.<init>(Display.java:479)
at org.eclipse.swt.widgets.Display.<init>(Display.java:470)
at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:84)
at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:59)
at org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:110)
at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:88)
at org.gudy.azureus2.ui.swt.Main.main(Main.java:255)
... 6 more
Exception in thread "MainRunner" java.lang.SecurityException: VM exit operation prohibited
at org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl$2.checkExit(SESecurityManagerImpl.java:274)
at java.lang.Runtime.exit(Unknown Source)
at java.lang.System.exit(Unknown Source)
at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:42)
at java.lang.Thread.run(Unknown Source)
I am sure that this is happening because I am running the program on a terminal. Is there a way to supress the GUI or let the program think that the GUI was spawned successfully? Any suggestions?