Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, December 2006
Trouble with examples


Message 1 in thread

I can run the examples from the launcher, but I cannot run the
class files from a command window.

After getting a window that says "The procedure entry point ??0QVariant@@QZE@H@Z
could not be located in the dynamic link library QtCore4dll"

I get in the commmand window
C:\qtjambi-win-1.0.0-tp3>java com.trolltech.examples.Mandelbrot
Exception in thread "main" java.lang.UnsatisfiedLinkError: __qt_initLibrary
        at com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary(Nat
ive Method) at com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_Lib
raryInitializer.java:10) at com.trolltech.qt.core.QAbstractFileEngineHandler.<clinit>(QAbstractFi
leEngineHandler.java:7) at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryI
nitializer.java:25) at com.trolltech.qt.QtObject.<clinit>(QtObject.java:27)

   So I thought, if I want to make a program, I'll just give it the same
name as one of the examples, and run it from the launcher.  I made
a change in Mandelbrot.java, compiled successfully, but the launcher
runs the old version, it doesn't see my change.

I have set the path and classpath according to the install instructions.
Any ideas?  Thanks.

Ralph





Message 2 in thread

ralph wrote:

>I can run the examples from the launcher, but I cannot run the
>class files from a command window.
>
>After getting a window that says "The procedure entry point ??0QVariant@@QZE@H@Z
>could not be located in the dynamic link library QtCore4dll"
>  
>
Is it possible that you have another version of Qt in your PATH which 
overrides the Qt libraries shipped with Jambi? Try making sure that the 
Jambi bin-directory is the first entry in your PATH.

Could you also try cd-ing into your Qt Jambi directory and running e.g. 
the following command:

    java -cp .;qtjambi.jar -Djava.library.path=bin 
com.trolltech.examples.Mandelbrot

You will need to have Java in your path, but this should run with the 
correct environment to start the example.

>   So I thought, if I want to make a program, I'll just give it the same
>name as one of the examples, and run it from the launcher.  I made
>a change in Mandelbrot.java, compiled successfully, but the launcher
>runs the old version, it doesn't see my change.
>
>
>  
>

This sounds very odd to me. Have you checked the timestamp of the 
Mandelbrot.class-file to check that it has actually been altered? The 
only thing I can think of right now is that the classpath might point to 
the wrong location on the disk, and that you e.g. have two installations 
of Qt Jambi.  Although, if you  are using the QtJambi.exe file  to run 
the launcher, then the class path ought to be set correctly, so I think 
it's a more likely reason that the files aren't being updated (for some 
reason.)

-- Eskil


Message 3 in thread

"Eskil A. Blomfeldt" <eblomfel@xxxxxxxxxxxxx> wrote in message news:457D0E3F.4030905@xxxxxxxxxxxxxxxx
> ralph wrote:
>
>>I can run the examples from the launcher, but I cannot run the
>>class files from a command window.
>>
>>After getting a window that says "The procedure entry point ??0QVariant@@QZE@H@Z
>>could not be located in the dynamic link library QtCore4dll"
>>
> Is it possible that you have another version of Qt in your PATH which overrides the Qt libraries 
> shipped with Jambi? Try making sure that the Jambi bin-directory is the first entry in your PATH.
>
> Could you also try cd-ing into your Qt Jambi directory and running e.g. the following command:
>
>    java -cp .;qtjambi.jar -Djava.library.path=bin com.trolltech.examples.Mandelbrot
>
> You will need to have Java in your path, but this should run with the correct environment to start 
> the example.
>
>>   So I thought, if I want to make a program, I'll just give it the same
>>name as one of the examples, and run it from the launcher.  I made
>>a change in Mandelbrot.java, compiled successfully, but the launcher
>>runs the old version, it doesn't see my change.
>>
>>
>>
>
> This sounds very odd to me. Have you checked the timestamp of the Mandelbrot.class-file to check that 
> it has actually been altered? The only thing I can think of right now is that the classpath might 
> point to the wrong location on the disk, and that you e.g. have two installations of Qt Jambi. 
> Although, if you  are using the QtJambi.exe file  to run the launcher, then the class path ought to 
> be set correctly, so I think it's a more likely reason that the files aren't being updated (for some 
> reason.)
>
> -- Eskil

Mandelebrot.class timestamp has changed.
I tried your second suggestion and it works, and
uses the new Mandelbrot.class file.  Thanks.
Tonight, I'll do your first suggestion, have to rush to work

Ralph