Re: [jnc-users] SWT compile issue
Status: Beta
Brought to you by:
soapy
From: Marco T. <mt...@gm...> - 2007-03-31 08:28:22
|
Jer A wrote: > hello all, here is an SWT sample. > Why is it taking so looonnnnnnng to compile.... I think mainly because no one optimized GCJ/GCC for speed... It become even worse with GCJ 4.3... Other reasons might be your processor, RAM and swap... But you did notice that compiling swt.jar is only done once, right? It is cached in swt-[win|lin].jar.[a|o]. This will be reused in every compilation as soon as it exists... > does it really have to > process the entire swt.jar? even for reference? Yes, you don't know in advance which classes you need from swt.jar. Also what would happen if you took the cached swt.jar for another project? Marco > > thanks in advance for all your help. > -Jer A. > > -------------------------------------------- > > import org.eclipse.swt.widgets.Canvas; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.events.PaintListener; > import org.eclipse.swt.events.PaintEvent; > import org.eclipse.swt.graphics.Rectangle; > > public class cexample2 { > > public static void main(String [] args) { > final Display display = new Display(); > final Shell shell = new Shell(display); > shell.addPaintListener(new PaintListener() { > public void paintControl (PaintEvent e) { > test.shell = shell; > test.paint(e); > } > }); > shell.setBounds(10, 10, 200, 200); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) display.sleep(); > } > display.dispose(); > } > > > static > { > Class c; > //c = javax.swing.plaf.metal.MetalLookAndFeel.class; > c = org.eclipse.swt.widgets.Canvas.class; > c = org.eclipse.swt.widgets.Display.class; > c = org.eclipse.swt.widgets.Shell.class; > c = org.eclipse.swt.events.PaintListener.class; > > //c = javax.media.j3d.WakeupOnActivation.class; > } > > } > > > class test { > > public static Shell shell = null; > > public static void paint(PaintEvent event) { > Rectangle rect = shell.getClientArea(); > event.gc.drawOval(0, 0, rect.width - 1, rect.height - 1); > } > > } > > _________________________________________________________________ > RealLiveMoms: Share your experience with Real Live Moms just like you > http://www.reallivemoms.ca/ > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |