32 bit Eclipse: JRE and JDK versions needed - java

Apologies in advance. I know this is a basic question.
I am new to server administration. I am administering a server where the users do Java development.
They have a Java-based application and do development in Eclipse. Eclipse is 32-bit. The OS is 64-bit.
I recently updated the JDK and JRE on the server. I have both the 64-bit and 32-bit of each installed.
Eclipse ran into an error where it couldn't start after I had updated to the new JRE and JDK. So I took some advice online and updated the -vm path in the Eclipse .INI file to point to the new 32-bit JRE path. It now works.
I have two main questions:
Will updating the JRE and JDK EVER cause an issue with development, or as long as they can open up Eclipse and use at least one version of the JRE or JDK, they will be fine? I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java (that is where the path points to for that installation). If something is developed in 32-bit Eclipse can it run with 64-bit Java? Side question: is there a certain advantage with developing with 32-bit Eclipse on a 64-bit system or is it personal choice?
Thanks a lot and cheers!

I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
Java 6 and 7 are end of life; Java 8 code should still be run when Java 9+ rolls out. I've not been aware of any backwards compatibility issues in recent years, it's only forward compatibility that doesn't work (running Java 8 compiled libraries with JRE 7).
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java
The IDE and code run in separate processes. There's no harm in using the 64bit JDK with 32bit editor.
Eclipse 32 bits running on 64 bits JVM
Should I use Eclipse 32bits or 64bits on my new machine?

Will updating the JRE and JDK EVER cause an issue with development...
I believe it technically could render what you developed "obsolete" if you're initially using one JDK with some specs and change for another one with specs that are not "compatible" with what you built so far. By specs, I mean the libraries, tools, etc that the JDK contains. But I would say it would be unlikely that such problems occur. It personally never happened to me. I'd like to have someone with more knowledge give more details though and validate what I'm saying or correct me if I'm wrong.
If something is developed in 32-bit Eclipse can it run with 64-bit
Java?
To my knowledge, there are not related things. In my mind, Eclipse is just your IDE and it allows you to build/compile code using specific JDK (32 or 64 bits). As a matter of fact, you don't even need eclipse to build code but you definitely need a JDK: it's the JDK that give you the tools to compile code that "targets" a specific JRE/JVM and Eclipse is using the tools your JDK provide.
So yes, you can use eclipse 32 bits to build code for a 64 bits JRE.

Related

When JRE is a subset of JDK, why do we have to download JRE separately in a PC?

When the JDK already includes JRE for the execution of code, why do I have to download JRE separately to execute my java code is the doubt that's bothering me
As far as I remember this depends on your OS, browser and JDK version.
Eg. if you're using a 64-bit OS and installed a 64-bit JDK, but are using a 32-bit browser, then you might have to install a 32-bit JRE if you need Java support in the browser.
Otherwise a separate JRE installation should not be required, since the JDK installation also installs the JRE.
JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on.
JDK: It is a group of utilities one needs to develop programs in Java including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to convert the source code into bytecode.
Refer: http://javarevisited.blogspot.de/2011/12/jre-jvm-jdk-jit-in-java-programming.html
Similar, post is there on below link as well.
What is the difference between JDK and JRE?

Trouble Installing Eclipse Classic 4.2 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Eclipse can't find the JDk or JRE
I have the latest JRE and JDK installed, however when I install Eclipse Classic 4.2 and try to run it, it displays the following message:
I have tried moving the installation to Program Files, as well as to the Java installation folder itself. The former generates no difference other than the path displayed in the message. The latter starts loading Eclipse, to the point that it shows the blue rectanglue loading box, at which point I get a different error message saying it couldn't load a particular.dll file in the Java installation. That said, I don't see why I would have to move the Eclipse files into the Java folder for it to work.
I used to have a working installation of Eclipse some time ago, which I uninstalled. Now I plan to use Eclipse, possibly with PyDev, in order to learn Python.
P.S. I realize this is not exactly a question involving coding, however I know I can't be the only one experiencing this issue. So hopefully others may benefit from seeing the response.
EDIT: The installation is now working. Here are the steps I took:
1) Make sure the JDK and Eclipse installations are both 32-bit or 64-bit, depending on your setup.
2) Add -vm
/absolute/path/to/jre6/bin to the top of the eclipse.ini file
Note: After reinstalling both Eclipse and the JDK, making sure the bit-type matched, step 2 was no longer necessary as Eclipse finally ran normally.
This question was asked before and the answer was very well written so just follow the link and read the answer to this.
Eclipse - no Java (JRE) / (JDK) ... no virtual machine
It worked for me.
As noted above:
Please refer to http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Find_the_JVM.
Also make sure that you're using a 64-bit JDK with a 64-bit bundle of Eclipse, and a 32-bit JDK with a 32-bit bundle of Eclipse.
By default, the 32-bit JDK will install into "Program Files (x86)", and a 64-bit JDK will install into "Program Files". Under 64-bit Windows, you can choose to use either 32-bit or 64-bit Eclipse/JDK - but the Eclipse bundle and the JDK must match. (I'd recommend 64-bit, as your OS supports it.)

Known Tomcat 6.0 and JDK 1.7.0_02 issues?

Are there known Tomcat 6.0 and JDK 1.7.0_02 issues?
I know this is a hard question to answer, if the answer is no. But I need to ask just in case the answer is yes. Also I will accept any solutions to the issues below as answers. Please just share whatever issues you have had, and I will update this question if need be.
Issues:
Some issues I have run into since upgrading from JDK 1.7.0 to 1.7.0_02 (which I did to avoid the Eclipse's help menus from crashing, due to a Java 1.7.0 bug.):
Tomcat server takes much longer to start, I need a 120 second timeout to handle it.
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) error, which disappeared the next day and then reappeared the third day, with no changes other than reloading Eclipse.
Tomcat server takes much longer to shut down. I need a 60 second timeout to handle it, from 15 second default.
Eclipse itself appears to crawl to a halt (figuratively speaking) upon building the workspace and validating the project at hand. Everything within Eclipse appears to take longer, even opening an unopened file.
Everything seems suspicious.
P.S. JDK 1.7.0_02 is also known as 1.7.0u2, Java SE 7u2, Java SE 7 Update 2, etc.
Versions:
JDK = Oracle, 64-bit, downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html. Exact file downloaded and installed was jdk-7u2-windows-x64.exe.
Tomcat = Tomcat 6.0.33, downloaded separately from Eclipse
Eclipse = Eclipse Java EE IDE for Web Developers., Version: Indigo Release, Eclipse Platform, Version: 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f, Build id: I20110613-1736.
64-bit Windows 7 machine, 8GB RAM, Intel Core i7-2600 CPU # 3.4GHz (4 cores)
Eclipse, Tomcat, Apache HTTP Server, are all on the same (development) computer.
EDIT: Added system specs above.
When running 64 bits Java with default options (references compaction is off by default), it requires almost twice the amount of memory than with 32 bits.
For Eclipse, open the eclipse.ini file and double/increase a lot the -Xmx option.
Of course, your physical memory may not be enough when running some JVMs.
So I recommend you to test the -XX:+UseCompressedOops HotSpot option with 64 bits JVM and monitor memory usage thanks to jconsole for instance. You can also read details about that recent option. That option
For Tomcat, create the file bin/setenv.bat with content:
set JAVA_OPTS="-Xmx1024M -XX:+UseCompressedOops"
Well, perhaps it's all about the new JVM released in that update. It alledgedly improves performance but... well, who knows. JDT on Tomcat6 interacts with JDK 1.7 so unexpected things could happen.
Other than that, there're few things to check.

JavaServiceWrapper on 64bit linux, any problems?

We've been using the 32bit linux version of the JavaServiceWrapper for quite a while now and it's working perfectly. We are now considering also using it on 64bit linux systems. There are downloads for 64bit binaries on the website, but looking into Makefile for the 64bit version I found the following comment, though:
# This makefile is in progess. It builds, but the resulting libwrapper.so does not yet work.
# If you know how to fix it then please help out.
Can anyone confirm, that this comment is just outdated and the resulting wrapper will work without flaws?
I've had it running in production on 64-bit red hat without any trouble for the last year or so.
From http://wrapper.tanukisoftware.org/doc/english/introduction.html :
Binary distributions are provided for
the following list of platforms and
are available on the download page.
Only OS versions which are known to
work have been listed.
(snip...)
linux - Linux kernels; 2.2.x 2.4.x, 2.6.x. Known to work with Debian and Red Hat, but should work with any
distribution. Currently supported on
both 32 and 64-bit x86, and 64-bit ppc
systems.
Take a look at http://yajsw.sourceforge.net/.
It's free and rather compatible reimplementation of TanukiSoftware Java Service Wrapper featuring free 64-bit support.

JVM terminates when launching Eclipse MAT on Mac OS with J2SE 6.0

I have recently discovered the incredibly useful Eclipse Memory Analysis Tool, which makes quick work of finding memory leaks in Java applications. Unfortunately, after switching my JDK to 1.6 (under Mac OS 10.5), the JVM terminates immediately upon startup. All that appears is a dialog stating "JVM terminated" with "Exit code = -1".
Anyone else encounter this one? Perhaps there is a way to configure it to use a different JDK? (such as 1.5: which it was shown to be compatible with)
To configure Eclipse to use another VM use this command line:
eclipse -vm <path to java>
You can also specify the path in Eclipse.app/Contents/Info.plist. There is a section like this:
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
-->
For the Memory Analyzer the you can find the Info.plist file under MemoryAnalyzer.app/Contents.
The official Java 6 for the Mac only has a 64 bit data model. Unfortunately, Eclipse uses Carbon on the Mac which is only available in 32 bits. In short, it is impossible to run Eclipse with the official Java 6 distribution.
The classical solution to this is to set the default VM to Java 5, and then choose Java 6 as the JRE/JDK within Eclipse.
If you really need to run Eclipse with Java 6, then you could take a look at SoyLatte which is a build of OpenJDK which both supports 32 and 64 bit modes.

Categories