Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )

后端 未结 13 1486
深忆病人
深忆病人 2020-11-30 07:34

I\'m trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse.

Current System Config:

Ecl         


        
13条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 08:18

    Eclipse is launching your application with whatever JRE you defined in your launch configuration. Since you're running the 32-bit Eclipse, you're running/debugging against its 32-bit SWT libraries, and you'll need to run a 32-bit JRE.

    Your 64-bit JRE is, for whatever reason, your default Installed JRE.

    To change this, first make sure you have a 32-bit JRE configured in the Installed JREs preference. Go to Window -> Preferences and navigate to Java -> Installed JREs:

    Installed JREs

    You can click Add and navigate to your 32-bit JVM's JAVA_HOME to add it.

    Then in your Run Configuration, find your Eclipse Application and make sure the Runtime JRE is set to the 32-bit JRE you just configured:

    Run Configuration

    (Note the combobox that is poorly highlighted.)

    Don't try replacing SWT jars, that will likely end poorly.

提交回复
热议问题