views:

1656

answers:

2

I'm running 64-bit version of Vista on my notebook with 4G of RAM, the Ram is maxed out at 1.5G on the 32-bit version of Java. But if I move completely to 64-bit version of Java, the JDIC part won't work, so my question is : if I install both 32 and 64 bit versions of Java, can Netbeans easily switch between the two ? So if I run out of ram at 1.5G, I switch to the 64-bit, but if I need to develop JDIC part, I switch back to the 32-bit, is this possible with Netbeans ?

========================================================================

I've just realized I asked half a question, since which version(32/64 bit) of Netbeans also matters. So my question should be : If I run 64-bit of Neatbeans(assume it's available), and have both versions of Java installed, can I switch between the two Java versions for my projects in Netbeans ?

A: 

You cannot switch JVMs in a running app. You'll have to restart it, but you should certainly be able to run Netbeans in both JVMs.

Michael Borgwardt
I was under the impression that he doesn't care what NetBeans itself is running in, but I could be wrong.
Michael Myers
Does NetBeans use whatever JVM it's running in to run a project?
Michael Myers
I read it as wanting to run Netbeans itself in differen JVMs. Of course it does not necessarily use the same JVM to run projects.
Michael Borgwardt
it matters more which JVM netbeans is running in. JDIC has native code parts (JNI) and JNI parts must match architecture. 32-bit jvm needs a 32-bit dll. 64bit jvm needs a 64bit dll. JDIC doesn't have a 64bit dll
basszero
+2  A: 

NetBeans does work with both 64-bit and 32-bit JVM. Eclipse can only work with 32-bit JVM. I have a script for launching Eclipse with installed 32-bit JVM and NetBeans for the 64-bit or 32-bit JVM.

AlexC
I'm now running 32-bit NB, but if I run the 64-bit version, why do I need a script to launch different JVMs ? Can't I specify it inside the 64-bit NB ?
Frank
I have several JREs installed so the script simply sets the JAVA_HOME and such, no magic. :)
AlexC