What are the prerequisites for Eclipse 64 bit? - eclipse

What are the prerequisites for Eclipse 64 bit?
Do I have to download eclipse 64 bit for jdk 1.6 64 bit or 32 bit jdk will suffice to work with 64 bit DLLs? I have configured 32 bit Eclipse to have 64 bit JDK. But when I run my test suite then I'm getting java.lang.OutOfMemory error

When I installed Eclipse 64-bit, I had to install 64-bit JDK. I'm not 100% sure if it is an absolute requirement, but it seems to be the best way.
Plus the 32-bit and 64-bit versions of Java can coexist on the machine.

I wouldn't mix the 64-bit eclipse with a 32-bit JDK or vice versa. Stick with 64-bit or 32-bit for both. Of course as Almo says, you can have both installed and tell eclipse to use the correct jvm using the eclipse.ini file.

Related

Is Eclipse 2018-12 availabe for 32 bit Windows or Linux?

I need to install Eclipse 2018-12 modelling tools on my 32 bit machine.
In the official site it is available only for 64bit machines.
I tried to download Eclipse 2018-09 and then upgrade it to Eclipse 2018-12 but the upgrade process creates p2bu file and deletes the application files.
No, in Eclipse 2018-12 (4.10) the support of 32-bit platforms has been dropped.
See Eclipse 4.10 - New and Noteworthy - Dropped support for 32-bit platforms:
Eclipse and eclipse based applications no longer run on 32 bit
platforms or 32 bit JVM. Only 64-bit platforms/JVM are supported.
See also Eclipse bug 536766.

Which version of SWT should I run on 64bit OS with a 32bit JVM?

I am running a 64bit of Windows 7.
I am executing an Eclipse RCP application on a 32bit JVM.
Which version of SWT should I use? 32 or 64 bit?
The 32 bit. The launcher (.exe) will seek for a 32bit version of Java Installed, which your JVM is.

SWT on 32 bit and 64 bit JRE

Can anyone suggest good idea over this issue.!!
Am aware of 32 bit JRE can load only 32 bit SWT libraries and also 64 bit JRE can load only 64 bit SWT libraries.
But my question is, how to load SWT libraries ( 32 bit and 64 bit ) dynamically based JRE bit size.?
Thanks in advance.!!
under the JRE installation path you will find lib\ext this is for any additional libraries you wish to add the the JRE. They will be picked up by any java application that wishes to use them.
the other option is to put them in the required classpath
java -cp:other_libraries my.Program
you could but that in a shell script eg
run64.cmd
java -cp<SWT64_libraries>:other_libraries my.Program
run32.cmd
java -cp<SWT32_libraries>:other_libraries my.Program
there are ways to autodetect the bitness of the JRE but they are not trivial.

Eclipse JVM version issue: System.getProperty("sun.arch.data.model") returns 32 bit but i want 64

If i run "java -version" it returns 64 bit, which i guess means that my default JVM is 64 bit? but eclipse is using 32 bit since System.getProperty("sun.arch.data.model") returns "32".
I can't use the libraries i need in 32bit mode, jogl which auto detects my platform and incorrectly tries to load a 32bit dll. See more information in my other question: https://stackoverflow.com/questions/14007335/eclipsejogl-issue-cant-load-amd-64-bit-dll-on-a-ia-32-bit-platform
I'm running 64 bit windows 7, eclipse, java and JDK. even tried uninstalling Jre 32 bit to no avail.
Someone else having a similar problem with no solution given: How to reconfigure eclipse to use a 64 bit JVM
Can anyone tell me how i can specify the correct jvm?
That "trick" is just the normal configuration file for eclipse and it's used to specify the full path for the VM that the user wants to adopt.
The standard JVM also offers the -d64 that tries to force the adoption of the 64 bit memory model.
If you want to keep your environment compatible as much as you can with the libs out there you should keep the 32 bit version, and I'm saying this because of my experience with java, also the 32 bit version is probably more stable than the 64 bit version, especially when interacting with external libs ( again in my experience ).
Anyway keep in mind that you need the 64 bit version of Eclipse, otherwise you will go nowhere.
You should install a 64 bit version of Eclipse. Or what you can do is edit the Eclipse.ini file, and change the path it uses for java.exe or javaw.exe to start eclipse to point to your 64 bit version. Also make Eclipse.ini is picking up the right JAVA_HOME environment variable, which may be whatever that value is set to in Windows.
Eclipse has environment variables it uses, but it picks most of them up from Windows. If you change the ones in Windows, you need to restart Eclipse to pick up the new values. I think Java changes the JAVA_HOME variable anytime you install a new version.
Maybe you can tell eclipse where is you own JDK.
Eidt the eclipse.ini in eclipse home dir:
-vm
/path/to/jdk64/bin/javaw.exe
If you want to compile a project in eclipse with jdk 7, click here.

Java and Eclipse - 32 vs. 64bit

I'm a little bit confused about the two different versions of Eclipse - 32/64bit.
As far as I know, Java bytecode (= build of your code) is platform independend. If a user runs your bytecode in a 32bit JRE, the code is executed in as a 32bit process, if a user runs your bytecode in a 64bit JRE, the code is exectued as a 64bit process.
Eclipse needs the JRE to run, cause it's written in Java. But why are there 32 and 64bit versions of Eclipse on the Eclipse download page if only the user's JRE version does matter?
Does a 64bit Eclipse version need a 64bit JRE or JDK? If yes ,why?
Second confusion: I understand the need for a 32 and 64 bit version of the JRE. But why are there 32 and 64 bit versions of the JDK if the resulting bytecode is platform independet?
Thank you
Eclipse relies on SWT, which is essentially native code. There will be quite a few DLLs etc. exists (in the plugins or features directories) that will be used by the 64-bit version, that are drastically different from the 32-bit version.
It is not because of the running environment, it is because Eclipse uses some native stuff and must be run on corresponding JDK. The applications you are developing inside Eclipse can then be run on whatever JRE you have installed, just specify it in the settings.
JDK is a compiler and also a lot of other stuff. Many of them are native applications that need to be run corresponding platform.