Error with 64 bit in 2.1.0

Started by Fool Running, March 26, 2009, 15:34:18

Previous topic - Next topic

Matzon

could you try a Toolkit.getDefaultToolkit(); prior to using LWJGL - it can possibly load the jawt.dll for you

Kiena

I'll try later and report the results. (Very little time during the week that's why I didn't post in the win64 tester recruiting thread.)

By the way, I wonder how many awt classes are loaded this way that wouldn't be if they were not otherwise used. (It may be desirable to avoid loading most of them if lwjgl provides their functionality through other and/or native apis.)

Kiena

A static call to Toolkit.getDefaultToolkit() indeed solved the problem as well.

Getting the default toolkit was the solution in this case too:
http://lwjgl.org/forum/index.php/topic,2847.0.html

Does Sys.alert(String, String) have similar issues or that problem is unrelated?

Matzon

I really dont know why Sys.alert is misbehaving ...
however, we are talking about adding getDefaultToolkit to lwjgl itself - which should be fine (unless you're doing awt-less stuff, then you have to remove it).

Simon Felix

Quote from: Matzon on March 30, 2009, 11:18:51
could you try a Toolkit.getDefaultToolkit(); prior to using LWJGL - it can possibly load the jawt.dll for you

That didn't fix it for me. I had to add jre\bin to PATH.

(Win7, Java 1.6 Update 13, no 32bit JDK/JRE installed)
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Matzon

are you sure you are calling it BEFORE *any* LWJGL references?
try adding some System.out when calling Toolkit and then add -Dorg.lwjgl.util.Debug=true and see which spit something out first.

Fool Running

For some reason, I thought this issue was resolved. Just looked again because I installed the latest W7 release and was getting this problem again.
I tried the Toolkit.getDefaultToolkit(); and it didn't work for me either. I'm sure its called before any LWJGL as its the first thing in my main() method.

Adding the jre/bin to the path did help, still.

EDIT:
Using Windows 7, JRE1.6.0_13. My application uses an AWTGLCanvas inside a Frame, so I would think it would load the toolkit anyways.
I'll try do some more testing.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

Matzon

I just tried the latest from nightly on windows 7 64bit, java 1.6.0_14ea 64bit and no problems at all ... I do have a dev environment installed - not sure if that changes anything tho?

Fool Running

I got it working, but its kinda strange.
I wasn't using the JRE like I thought I was :-[, I was using the JDK. When using the 64 bit JDK it fails no matter what I try unless I add the jre/bin to the path. But when using the 64 bit JRE it works fine. I don't even need the Toolkit.getDefaultToolkit() fix (which is what I expected since I use a AWTGLCanvas in a Frame).

I have no explanation as to why using the JDK always fails, though. ;D

EDIT: I looked closer at my Eclipse settings... I'm wondering if it has something to do with the way Eclipse sets up the JDK. It might look at <jdk path>/bin for stuff when the .dll is actually in <jdk path>/jre/bin. This is just grasping at straws as I wouldn't think any AWT would work without these .dlls being loaded properly.

Has anyone else tried this in Eclipse, setup with a JDK?
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

Matzon

I was testing from command line.

Fool Running

Yeah, it looks like it was just Eclipse not being set up quite right. The command line works fine for me.
Sorry for the false alarm. :P
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D