Running Multiple JDKs on the Same Machine

I've been developing with the 1.4.2_07 JDK, but my company is moving to the 1.5.0 JDK as the new standard for our product. Of course, we're going to continue supporting the 1.4.x JRE as a deployment platform for the near term.
As a developer, I'm going to need to have both JDKs installed, side-by-side so that I can use both of them in my development/testing cycles. So I just downloaded and installed the 1.5.x JDK, and I defined the following environment variables:
JAVA_HOME_1_4 = C:\j2sdk1.4.2_07
JAVA_HOME_1_5 = C:\Program Files\Java\jdk1.5.0_02
JAVA_HOME = %JAVA_HOME_1_4%
In theory, I should now be able to switch JDKs just by changing my JAVA_HOME variable to %JAVA_HOME_1_5%.
Easy as pie.
Unfortunately, that doesn't work, because the 1.5 JDK installs a number of registry keys which hard-code the current java version. So, even when I have JAVA_HOME set up to point to the 1.4.x JDK, running "java -version" at the commandline indicates that the 1.5 java is being called.
I'd like to suggest to Sun that, in the future, there should be a generic, version-independent launcher that reads in the JAVA_HOME variable at runtime and calls the appropriate binaries and the appropriate runtime libraries.
Having to futz around with the registry every time I want to switch my development environment is a big hassle.
--BenjiSmith                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

I've been developing with the 1.4.2_07 JDK, but my
company is moving to the 1.5.0 JDK as the new
standard for our product. Of course, we're going to
continue supporting the 1.4.x JRE as a deployment
platform for the near term.
As a developer, I'm going to need to have both JDKs
installed, side-by-side so that I can use both of
them in my development/testing cycles. So I just
downloaded and installed the 1.5.x JDK, and I defined
the following environment variables:
JAVA_HOME_1_4 = C:\j2sdk1.4.2_07
JAVA_HOME_1_5 = C:\Program Files\Java\jdk1.5.0_02
JAVA_HOME = %JAVA_HOME_1_4%
In theory, I should now be able to switch JDKs just
by changing my JAVA_HOME variable to
%JAVA_HOME_1_5%.
Easy as pie.
Unfortunately, that doesn't work, because the 1.5 JDK
installs a number of registry keys which hard-code
the current java version. So, even when I have
JAVA_HOME set up to point to the 1.4.x JDK, running
"java -version" at the commandline indicates that the
1.5 java is being called.
I'd like to suggest to Sun that, in the future, there
should be a generic, version-independent launcher
that reads in the JAVA_HOME variable at runtime and
calls the appropriate binaries and the appropriate
runtime libraries.
Having to futz around with the registry every time I
want to switch my development environment is a big
hassle.
--BenjiSmithI've tried the same approach, but abit different
first - deleted java.exe and javaw.exe from %SystemRoot%\system32
Then set the following (All vars are system ones)
JAVA_HOME=D:\sun\jdk1.5.0_04
JAVA_HOME_1.4=D:\sun\j2sdk1.4.2_08
JAVA_HOME_1.5=D:\sun\jdk1.5.0_04
JAVA_HOME_BIN=%JAVA_HOME%\bin
PATH=%JAVA_HOME_BIN%;...
Now by switching JAVA_HOME we should get it right
but,
it appears that xp recognizes the new values for vars only upon rebooting.
Also, you can see all current vars by typing set in cmd
More over, I thought that maybe it'd work if I just simply logout/login back, and it did but strangely the var while JAVA_HOME showed a new value, JAVA_HOME_BIN had the previous one.
HMM...

Similar Messages

  • Disallow running multiple instances of the same web start application..

    on the client? I have an application that is launched on the client by clicking on the link to the JNLP file. The problem is that I don't want the application to launch twice if the user clicks the link twice. Is there a way to keep web start from running multiple instances of the same app?
    I don't want to just disable the button after it is clicked because then the user won't be able to get back in if they need to.
    Any help out there?
    Thanks,
    Melanie

    The way I do this is to try connect to an obscure port number on the localhost at startup.
    if this connection succeeds I assume the app is already running. otherwise the program continues and registers as a server at that port number.
    I actually take this a little bit further by registering a web server at this port (I use the Brazil server), That way if the program finds an instance of itself running it can send a message to the web server and ask the program to do something (like start another window if,for instance you wanted to allow this but only within the same VM).

  • Restricting users to login multiple times on the same machine..

    Hi everyone,
    Is it possible to restrict the users to login multiple times on the same machine...did someone implemented this kind of process.Please help me how can i achieve this or any suggestions.
    Thanks in advance.
    Phani..

    Hello,
    I decided to answer you in the original thread - Identify currently active users – as I believe that the outline background of the issue is important to better understand it.
    Regards,
    Arie.

  • Multiple users on the same machine using a common iTunes Library

    I'm running iTunes from my user profile in Vista, the songs are stores in a shared directory.
    My wife recently purchased an iPhone, so I decided to setup her phone under her user profile in Vista, so she could use her contacts out of outlook, this meant I had to setup iTunes for her. All the outlook contacts sync with her phone (no issues), but when I point the music library to the directory where I stored the music I can't see the library.
    I have searched under my user name and found the iTunes library.itl, this file in my user directory, not accessible when I wife is logged into her account.
    Is there any way to have different user profiles on the same machine access the same music library in iTunes. So when I purchase music under my account and download it to the library, my wife's iTunes will also see the music, I'm okay if I have to do a manual sync, under her iTunes..

    Move the \Music\iTunes\ folder to a Shared directory.
    Hold Shift and launch iTunes.
    Select *Choose library* and select the _iTunes library.itl_ file in the \iTunes\ folder in the Shared directory.
    Quit iTunes then let yoru wife log in and hold Shift and launch iTunes.
    Select *Choose library* and select the _iTunes library.itl_ file in the \iTunes\ folder in the Shared directory.

  • How to configure multiple clusters on the same machine.

    I am attempting to configure multiple clusters on the same set of machines. I have set the cluster name and multicase IP addresses to be different for each cluster. However I am still getting and error that states:
    "This indicates that there are multiple clusters on this network attempting to use overlapping network configurations."
    Is this not possible? If it is possible, is there some further way i need to tell the VMs they are part of different clusters?
    Thanks,
    Jacob

    FYI: I'm using the wrong multicast IP above. 224.0.0.1 is reserved and something else should be used. See:
    Re: UDP flood hosed my LAN?

  • Multiple Instances on the same machine: Several IP Addresses

              Hi all, I want to set up several instances of WL on the
              same server. These instances will be clustered. I am
              using Apache for the WebServer. Here the configuration
              I used: I first change the weblogic.conf file in Apache
              to set up the bridge.I restart apache using apachectl.
              Then, on the WebLogic site, I created a new ipadress
              using ifconfig hme0:1 ip adress ... I created a file
              hostname.hme0:1 in /etc I added this Ip address in /etc/hosts.
              I added this Ip address in the mycluster DNS. I wanted
              to start both WL manually using startWebLogic.sh file
              to see the log file. So, I first assign hostname to WL1.
              Then start WL. I opened an other terminal. Assign the
              hostname to WL2. Then start using startWebLogic.sh. The
              first instance started correctly.When the second started,
              there was an error: when listening to the port 7001,
              this port was already used. That was the same with the
              port 7002.
              Then , my question is How is it possible to configure
              several instances on the same machine using several ip
              addresses and one port. Thank you for your help. Erwan
              

              Please try -Dweblogic.system.bindAddr=<a.b.c.d> in your startWebLogic.sh.
              Brian
              "Merg" <[email protected]> wrote:
              >> Then , my question is How is it possible to configure
              >> several instances on the same machine using several
              >ip
              >> addresses and one port. Thank you for your help. Eourwan
              >
              >On Win2K/WinNT you can assign several IP adresses to you
              >NIC. (Advanced
              >TCP/IP options.) Each server instance has to run on it's
              >own port.
              >
              >Regards,
              >Merg
              >
              >
              

  • Open/run Multiple Windows of the same VI

    Hi!
    In my current project I would like to have the user open multiple windows of the same VI.  I've made a re-entrant VI:
    This is, currently, a very simple VI that just has a numeric control, a loop, and a stop button.  I then have a VI that calls the re-entrant VI.  I'd like it so that each time the user presses the "Call Re-Entrant VI" button, a new window of this VI is spawned and run.
    The first time the button is pressed, the re-entrant VI opens and runs fine. The title of the VI in the title bar is "Re-Entrant.vi:1 (clone)" (as expected).  When I try to launch another instance I get this error:
    I'm running LabVIEW 2009.
    Thanks for your time.
    Solved!
    Go to Solution.

    Here we go.  The Close Reference VI was causing my re-entrant VI to stop execution.  What do you think of this:
    This appears to work.  I'd probably want to get the path of my referenced re-entrant VI outside of my loop (since this will remain constant throughout the programs execution).  My guess is the Auto Dispose Ref feature will mean that as these windows are closed by my user, their garbage will be collected properly....?
    Thanks for your help.
    Edit: how odd that my Error Cluster constant in the VI Snippet wasn't saved to the image properly.
    Message Edited by Nickerbocker on 10-08-2009 10:33 AM

  • Sharing one Aperture Library between multiple users on the same machine

    Is there a way of setting up Aperture so that two different users on the same machine have full rights to do everything?

    Ian,
    Thanks for the suggestion. It certanly better than nothing, but in my case there is no partition with permissions off and there are other users to whom I wouldn't want to give full rights to the library. As an alternative I thought of simply creating a special user and do all editing from it.
    At any rate, it would have been useful if Aperture had something like that built in - like a preferences option, where one could specify a MacOS group name, and Aperture would do all its file/folder create operations within a given library with setgid()/setegid() of that group and corresponding umask() to give rw permissions to that group. Not too hard to do, either.

  • Log4j in multiple clusters in the same machine

    Hi,
    i use log4j and i'm having some problems with my log files. I have two clusters in the same machine. How can i have the logs independent of each other. Now i have one cluster jamming the log of the other cluster. I want this doesn't happen, i want they log separately. How can i do it?
    Many thanks in advance,
    Nuno

    nfalmeida wrote:
    Hi,
    i use log4j and i'm having some problems with my log files. I have two clusters in the same machine. How can i have the logs independent of each other. Now i have one cluster jamming the log of the other cluster. I want this doesn't happen, i want they log separately. How can i do it?
    I hope you have configuration files that configure log4j? The applications/clusters shouldn't use the same configuration.

  • Running multiple Photoshops on the same version?

    Is there a way to run more than one version of photoshop on the same computer?
    You could do it with a virtual machine but I'd like to know if there are other options.
    My system has a 6-core CPU (12 threads) and most of my cores are idle all the time.
    I work a lot with very heavy files for large format printing that need to be flattened, rasterized, and so on.
    Any ideas?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Behelitho wrote:
    I've benchmarked my system with Cinebench CPU test.
    I'm sure the test is comparable to my application.
    That's kind of a stretch.
    I have a decently large PDF file (one of my books).  It is 348MB, 165 pages and contains about 70 full page high resolution images.
    I copied the file (to better simulate two different documents), and set Photoshop CS4 x64 and Photoshop Elements 7 (two versions I have installed on a multiprocessor computer otherwise doing very little right now) to open the first set of 10 pages and the second set of 10 pages at 600 ppi respectively.  Each rasterized image came out to about 100 MB.
    Photoshop alone rasterized the 10 pages in 6 minutes 35 seconds at a rate of about 40 seconds per page.  It mostly used just 1 thread, as you have described.
    With Photoshop and Photoshop Elements working simultaneously on the task, the page rate in Photoshop went down to almost 60 seconds per page (and it finished first). Elements took 90 seconds per page on the first 6 pages (while Photoshop was rasterizing).  It was slower likely because it is a 32 bit app.
    Surprisingly, the apps didn't demand too big a memory footprint and didn't even come close to chewing up the entire 8 GB.  I assume they hit the scratch disk reasonably hard, and in my case that would be the same drive for both.  You might be able to do better if you have multiple candidate partitions for use as scratch.
    This workstation (a Dell Precision 470 with 8 GB RAM), while older and not nearly as powerful as yours, is good at multitasking as it has two separate Xeon processors, each with one core and Hyperthreading (Task Manager shows 4 threads available).
    Tentative Conclusion:  You'll see an incremental throughput gain by running two rasterizations, but not nearly 7 to 1 as your benchmark shows.  Probably more like 1.5 to 1.
    -Noel

  • Running multiple agents on the same server

    Has anyone run multiple instances of essbase on the same server, using the agentport command? If so, how well did it work and what do you think about running it in a production environment?Thanks alot!

    I have tested it, but the documentation does not recommend using this feature in production. You can achieve the same thing with creating test applications/databases.Also, when you run 2 instances of the agent on one box, you must modify the essbase.cfg of the client machine to indicate which instance (port) that client will connect to.Regards,Jade------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

  • Can I use FCX for multiple users on the same machine?

    I have one mac pro, and two video cmpanies. I have two users on my machine and would like to set up two different final cut x workplatforms. Is that possible?

    Of course, you can use FCP X from two different user accounts on your machine. The question here, I believe, is how to separate the content that each user accesses.
    One obvious way to achieve that would be to store the content in the system disk - that would put events and projects in each user's Movies folder. But that is a bad option, for performance reasons, and more.
    You could have separate external disks for each user to store his content.
    Also, you could use different disk images which could, say, be all stored in the same internal (but not system) drive.

  • Setting up a shared library for multiple accounts on the same machine

    I am in idiot. I can't figure it out. This is exactly what I did.
    1 - I set up multiple accounts on the computer. 1 for me and another for my wife.
    2 - I loaded all the music into my account's public folder.
    3 - I set the default folder in both hers and mine iTunes for this Public folder
    4 - I then opened iTunes in my account and none of the songs were showing up so I dragged the folder into iTunes and it did its business. Now my account is all set.
    Here are my questions:
    A - Do I need to drag the folder into my wife's account iTunes as well?
    B - If either of us add music when logged in, will it automatically update in the other iTunes interface or is there something specific that needs to (manually) be done?

    Doing it the way you did, you each have your own iTunes library file and are using the same iTunes music folder.
    Changes by one will not be seen by the other and any new music added by one will have to be added to the library by the other.
    Also, if one deletes music, it will be in teh library for the other but it will not be playable because the other person deleted it in the iTunes music folder.
    Launch iTunes, then immediately press and hold Option, then select *Create new library*.
    Create one in Users/Shared.
    Quit iTunes.
    Move all your music into the new /Users/Shared/iTunes/iTunes music folder.
    Login to your Wife's computer account.
    Move all her music into the new /Users/Shared/iTunes/iTunes music folder.
    On her account, launch iTunes, then immediately press and hold Option, then select *Choose existing library*.
    Select the _iTunes library file_ in /Users/Shared/iTunes.
    In iTunes, File -> Add to library and select the iTunes music folder in /Users/Shared/iTunes.
    All the music will be there.
    Quit iTunes and log out of her account and back into your account and launch iTunes normally.
    All music will be there.
    You should go to /Users/Shared/iTunes folder and right click - get info, click *Ownership & Permissions*. Set *You can* to *Read & Write* and set Others to *Read & Write*.
    Click *Apply to enclosed items*.
    Any changes (new/deleted music, ratings, playlists, etc.) by one will be seen by the other sionce you are using the same iTunes library file.
    Only one person can have iTunes open at a time. If you use Fast User switching, one will need to quit iTunes before the other can use it.

  • Can device run multiple encryptions at the same time?

    I have a G5 at home and I'm considering hooking up a new Airport Extreme to enable wirelsss access from my work laptop (WIN PC). I use a Netgear 54MBPS Wireless PC card WG511 v2 which supports 128bit encryption. Should this work with the mac APE and if so can I also run other encryption modes at the same time in future if needed. I will be connecting the APE to my cable modem and using one of the LAN ports to connect to the G5.

    Thanks Don, at this stage I'm only using the Netcomm wireless but maybe in future I might go for the iTV or add another computer.
    Rob

  • Can we have multiple IE in the same machine to access IC Webclient ?

    Dear expert,
    I have a question here. Can we access IC Webclient if our computer have multiple IE ( E.g IE 6 & IE 7 ). Currently the client computer have multiple IEs in the computer by using Tredosoft product. The environment of the system is as below :
    Server environment :
    1. Windows 2003 server Enterprise Edition
    2. SAP Netweaver 2004s SPS9
    3. SAP CRM 5.0 (ABAP & Java stack)
    4. SAP Enterprise Portal 7.0
    Client PC :
    1. Windows XP Profesional SP2
    2. Java Runtime Environment 1.4.X
    Your help is much appreciated

    Hi Ku Izrul Hadi Ku Hilmy ,
    For the Webclient to run you just need a browser. It will work on IE06/07 . Just the thin client should be properly configured. As far as the requirements put down by you is concerned I dont think so there should be any problem for the webclient to run from the client side.
    Reward useful answers,
    Regards,
    Shrita Sharma.

Maybe you are looking for

  • Can't get MacBook Pro to recognize Motorola H500 Bluetooth headset

    Hello all, I am trying to get my MacBook Pro to recognize a Motorola H500 Bluetooth headset. Bluetooth is ON and "discoverable" on my mac. When I go to system preferences and click "bluetooth", then "devices", the headset won't show up (it is turned

  • How do i get my update to work?

    I need to restore my ipod, but to do so i have to update the software. I have tried to do this and it says its downloading until when its finished it says it could not be dowloaded because the network connection timed out error-3259. I have checked t

  • Hyperlinks not converting from Word to PDF

    I've read the other discussions regarding this topic & the solutions don't seem to work for me. I'm using Word '07 converting to Acrobat 8. Some of my hyperlinks will convert but not all. AND, one hyperlink is linking wrong in Acrobat even though it'

  • Simple Count query and fetching data

    Hello, I have a table Emp : Name, age, sal, dateUpdated A 21 100 6/4/10 B 21 101 6/4/10 C 32 101 2/2/2 D 20 100 3/3/3 I am trying to count the number of people in the same age group AND fetch that number. For ex, I want to count the number of people

  • Not enough VRAM to run Flash 11.  What do I do?

    I recently upgraded my imac 5,2 by adding RAM so I could download snowleopard 10.6.8, update itunes, etc for my new ipad and ipod.  After the numerous upgrades in sofware to safari Version 5.1.2 (6534.52.7)  I am now having issues with flash and now