Java Swing not working

1

Whenever I try to launch any of my java apps that display a gui, I get an error. I have tried with both java 6 and java 7. Neither of these work, I have tried older and newer nvidia drivers. I'm not sure if this is an issue with Java or with the mobo that we're using not having compatible video drivers? The onboard video driver is geforce 520 and the board is a d2700itx zotac.

Here is the error I get from all of our in house java apps on this machine on windows xp:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000001fe, pid=3628, tid=3896
#
# JRE version: 6.0_37-b06
# Java VM: Java HotSpot(TM) Client VM (20.12-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  0x000001fe
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x033ef400):  JavaThread "AWT-EventQueue-1" [_thread_in_Java, id=3896, stack(0x03d60000,0x03db0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x000001fe

Registers:
EAX=0x00000000, EBX=0x00000015, ECX=0x22a2f620, EDX=0x00000000
ESP=0x03db9c3f, EBP=0x03dae65c, ESI=0x36b42f81, EDI=0x03dae688
EIP=0x000001fe, EFLAGS=0x00010216

Top of Stack: (sp=0x03db9c3f)
0x03db9c3f:   0000000b 00000000 00000000 00000000
0x03db9c4f:   23c10100 0023e200 07f40100 c0006be0
0x03db9c5f:   0000026d 6dc70000 6dd00604 00050000
0x03db9c6f:   00000000 00000000 056dd500 006ddd15
0x03db9c7f:   e2002b00 00000004 05c20000 0013c200
0x03db9c8f:   00000000 05e20000 c1000000 08c20012
0x03db9c9f:   0009c200 00000000 00000000 00000000
0x03db9caf:   00000000 00000000 01010100 00000001 

Instructions: (pc=0x000001fe)
0x000001de:   
java
swing
asked on Stack Overflow Dec 11, 2012 by davidahines

1 Answer

2

Try disabling Java's hardware acceleration for the system as a whole.

  1. Open Java Control Panel.
  2. Double click the Java icon.
  3. Click the Java tab.
  4. Click the View button inside Java Applet Runtime Settings.
  5. Add -Dsun.java2d.d3d=false in the Java Runtime Parameter field for each JVM being used.

Note that this will also have the side-benefit of reducing the amount of memory used by the app (in my experience).

You can also set JVM default properties using properties files and env. variables (google for details). It may be worth adding the property to the command line of one of your failing apps first just to test.

answered on Stack Overflow Dec 11, 2012 by Lawrence Dol • edited Dec 11, 2012 by Lawrence Dol

User contributions licensed under CC BY-SA 3.0