All pastes #277430 Raw Edit

h6w

public java v1 · immutable
·published 2006-12-13 05:12 UTC
rendered paste body
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.snippets;/* * example snippet: Hello World * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ */import org.eclipse.swt.widgets.*;public class Snippet1 {public static void main (String [] args) {        Display display = new Display ();        Shell shell = new Shell(display);        shell.open ();        while (!shell.isDisposed ()) {                if (!display.readAndDispatch ()) display.sleep ();        }        display.dispose ();}}And then:tudor@epsilon:~/development/swttest$ gcj -c --CLASSPATH=/usr/lib/java/swt.jar Snippet1.java tudor@epsilon:~/development/swttest$ gcj -o Snippet1 --main=Snippet1 Snippet1.o /usr/lib/gcj-4.1/org.eclipse.swt.gtk.linux.x86_3.1.1.jar.so /tmp/ccxSnQXH.o: In function `main':ccPE7ruz.i:(.text+0x1d): undefined reference to `Snippet1::class$$'Snippet1.o: In function `void org::eclipse::swt::snippets::Snippet1::main(JArray<java::lang::String*>*)':Snippet1.java:(.text+0x16): undefined reference to `org::eclipse::swt::widgets::Display::class$'Snippet1.java:(.text+0x31): undefined reference to `org::eclipse::swt::widgets::Shell::class$'collect2: ld returned 1 exit statustudor@epsilon:~/development/swttest$ gcj --versiongcj (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-14ubuntu7)Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.