Code Monkey home page Code Monkey logo

Comments (5)

dmicale avatar dmicale commented on September 17, 2024

Thank you for bringing this to my attention. Change has been put in. Tested Windows 7 in 32-bit with jdk and jre's 1.8.0_144. 64-bit with JDK and JRE's of 1.8.0_144 also. Both compiled successfully and the -gui command worked correctly.

from ertool.

arnabban5 avatar arnabban5 commented on September 17, 2024

Even after downloading latest code and compiling freshly it is giving the same error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

I checked build.xml:

It is having


	<condition property="iswindows32">
		<os family="windows" arch="x86"/>
	</condition>

May be that is why it is not loading swt 32 bit file in jar. I have 64 bit Windows 7 OS, But 32 bit JVM.

from ertool.

dmicale avatar dmicale commented on September 17, 2024

Make sure you clean out the build directory first with 'clean' at the end to make sure ANT is actually recompiling.

If you are still getting errors then you are compiling with 64-bit -- I added an echo at the top of the ant build to show your architecture, if it is reporting amd64 then you are using ant/java 64-bit to compile.

Eg.

[echo] Windows 7, amd64, 64 = 64 bit
[echo] Windows 7, x86, 32 = 32 bit

Make sure your JAVA_HOME in system variables is pointing to the right place, Java Configuration is disabling 64-bit editions and even in my case I had to actually uninstall the 64-bit JRE/JDK to test 32-bit, then re-install to test 64-bit again.

from ertool.

arnabban5 avatar arnabban5 commented on September 17, 2024

You are checking operating system bitness, not the JVM one. I have Win7 64 bit OS, which is reflecting in the echo output

[echo] Windows 7, amd64, 64

But looks like the JVM bitness is 32 bit

Command
java -d64 -version
Response

Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.

Command
java -d32 -version

Response

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode, sharing)

I resolved the problem with loading 32 bit swt jar without any condition.

<include name="swt.jar"/>

Your condition in the build file is perfectly logical, but I have 32 bit JVM running on 64 bit OS. Just curious if we can check JVM bit in the build file, instead of checking OS.

Thanks anyways for quick resolution.

from ertool.

dmicale avatar dmicale commented on September 17, 2024

Actually in my case the architecture returns the JVM bit, not the Windows OS (since I was running 64-bit). As is mentioned here: https://stackoverflow.com/questions/1386247/detecting-system-architecture-in-ant

Something unique is happening in your case where you are using ANT with a 64-bit JVM to compile.

from ertool.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.