[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] problems running HelloWorld.

I am having troubles running a HelloWorld example on linux. I'm not running the program as an eclipse build, but as an ant build.

I get the following error when I try to run the program:

[java] java.lang.UnsatisfiedLinkError: no swt-pi-gtk-2133 in java.library.path


I am using a java.library.path argument for building the file:

-Djava.library.path=/home/jwickard/eclipse/plugins/org.eclipse.swt.gtk_2.1.1/os/linux/x86

this is where libswt-pi-gtk-2133.so resides.. there is no: swt-pi-gtk-2133.so

Is there a problem with the naming, or is there something else in this process that I"m missing?

attached is the contents of the build file I'm using:

build.xml:

<?xml version="1.0" encoding="UTF-8"?>

<project basedir="." default="all" name="Tester">

<!-- target init sets up the "variable" declarations for use later in the build file. -->
<target name="init">
<property name="build.dir" value="./build" />
<property name="src.dir" value="./src" />
<property name="swt.lib" value="/home/jwickard/eclipse/plugins/org.eclipse.swt.gtk_2.1.1/ws/gtk" />
<property name="native.widget.path" value="/home/jwickard/eclipse/plugins/org.eclipse.swt.gtk_2.1.1/os/linux/x86" />


        <!-- Setup the classpath definition for building the project -->
       <path id="classpath">
            <fileset dir="${swt.lib}">
                <include name="**/*.jar"/>
            </fileset>
            <pathelement location="${build.dir}"/>
        </path>
    </target>

<target depends="init" name="compile">
<javac debug="true" deprecation="true" destdir="${build.dir}" srcdir="${src.dir}">
<classpath refid="classpath"/>
</javac>
</target>


    <target depends="init,compile" name="exe">
     <java classname="HelloWorld">
         <arg value="-Djava.library.path=${native.widget.path}" />
         <classpath refid="classpath" />
       </java>
       </target>


<target depends="init,compile" description="builds all" name="all" />

</project>