Results 1 to 11 of 11

Thread: About JAVA...

  1. #1
    Moderator Bouncer's Avatar
    Join Date
    Oct 1999
    Location
    Baghdad, IZ, Iraq
    Posts
    4,830

    About JAVA...

    Anyone who's experienced in either JAVA or IE, I've a question for you...

    Basically, I need to know if there is a way I can force IE to use jAVA version X when talking to web addess 1 and JAVA version Y when talking to web address 2.

    JAVA ver X for website1.
    JAVA ver Y for website2.

    Any ideas how I can accomplish this? If you don't know, know of any good JAVA forums where they might have an idea?

    Alternatively, is there a way I can switch JAVA versions on the fly?

    The problem here (obviously) is that I'm having to uninstall and reinstall different flavors of JAVA in order to talk to particular JAVA application servers, and I'm trying to not do that. Any pointers on how I can target the appropriate JAVA client/server so that I don't have to manually uninstall and re-install is really what I'm trying to find. Again, any help or pointers would be appreciated.

    Regards,
    -Bouncer-

  2. #2
    SG Enthusiast
    Join Date
    Jan 2001
    Location
    DC
    Posts
    4,726
    Which version of Java depends on how the developer compiled it - could be if you could somehow force from the client side that you would get an error.

    Do you control the servers or are you trying this purely from the client side?

    EDIT - syntax changes from one version to the next - generally code is upwards compatible, but there are plenty of exceptions
    anything is possible - nothing is free


    Quote Originally Posted by Blisster
    It *would* be brokeback bay if I in fact went and hung out with Skye and co (did I mention he is teh hotness?)

  3. #3
    Forum Techie Amro's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,695
    That's nuts. I've never had a backward compatibility issue with it. I don't know of a way to do what you're wanting to do. Although several JREs can coexist on a machine, the program using the JRE must know ahead of time what to use. In the case of Internet Exploder, Sun installs a plugin that uses the version of the JRE that the plugin was installed with.

    Having said that, go to your control panel and double click on the "Java" icon. When the window pops up, click the "Java" tab. The first view button will show you which JREs are installed. The second seems to allow you to add secondary JRE locations, activate them, and click "Choose" to select them. I imagine if this works for you, you'll have to "Choose" the specific JRE prior to launching Internet Exploder.
    amro.co, github.com/amro

  4. #4
    As Amro stated, you can have more than one version installed at the same time. Have you tried this, and maybe using 2 different browsers setup to use one version for each browser?

    If Amro's suggestion works, you could try monitoring the registry while the changes are made, and then write a small script to make the changes easier in future. Not quite "on the fly" but one click solution isn't too bad.

    No, I don't have a definite answer, but experience tells me it isn't impossible. Basically that is what computers are for, making things like this easy. A good programmer would be able to write something to work I'm sure.

    Skye?

  5. #5
    SG Enthusiast
    Join Date
    Jan 2001
    Location
    DC
    Posts
    4,726
    There's theory and then reality.

    http://www.javaworld.com/javaqa/2003...3-version.html

    I don't know java syntax well at all, but the link I posted shows how you can run into compat issues - the syntax can and does change between versions.

    Nice suggestion on the java applet (pun) to add additional choices for runtime. I'd be interested in knowing if that works for Bouncer.

    Skye
    anything is possible - nothing is free


    Quote Originally Posted by Blisster
    It *would* be brokeback bay if I in fact went and hung out with Skye and co (did I mention he is teh hotness?)

  6. #6
    Forum Techie Amro's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,695
    So the article you linked talks about writing 1.0 code, compiling on 1.4.1 and running on 1.3. Of course it isn't going to work! The Java compiler, as you know, produces bytecode and not real executable assembly (so it needs a version compatible w/ the compiled bytecode to run the bytecode). I simply meant that if you compile something on a 1.3 JVM and run it on a 1.4.1, it'll still work--at least in every case I've tried . I meant the JVM was backwards compatibly of the JVM itself, not so much backward compatibility of the compiled bytecodes. The code itself is generally forward compatible and the syntax doesn't change. There are additions via new classes and such, which provide more methods.

    There is no issue w/ having several JVMs installed for normal Java applications, you just have to start the applications with the main jvm set in the classpath and nothing set in your system path. Applets, however, are a different story and there's why I suggested the Java util that Sun loads. I have NO clue if it'll work for him though as I haven't tried :/

    What problems are you having bouncer, specifically?
    amro.co, github.com/amro

  7. #7
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,073
    multiple versions of java plugin for ie?
    try toggling the plugins via IE Tools Menu\Manage Add-ons...
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  8. #8
    Moderator YeOldeStonecat's Avatar
    Join Date
    Jan 2001
    Location
    Somewhere along the shoreline in New England
    Posts
    49,802
    Just as a note..I actually have seen issues with having multiple versions of Java installed on a rig. This was around 2 years ago, having the very latest JRE installed on a workstation....a certain function of ADP payroll, when submitting online, would not work. I had always thought latest version would be backwards compatible. Oh well. Perhaps that latest release of JRE at that time was buggy. Could replicate it several times...I had to keep the JRE back a few versions for it to work.//shrug
    MORNING WOOD Lumber Company
    Guinness for Strength!!!

  9. #9
    Forum Techie Amro's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta
    Posts
    10,695
    Quote Originally Posted by YeOldeStonecat
    Just as a note..I actually have seen issues with having multiple versions of Java installed on a rig. This was around 2 years ago, having the very latest JRE installed on a workstation....a certain function of ADP payroll, when submitting online, would not work. I had always thought latest version would be backwards compatible. Oh well. Perhaps that latest release of JRE at that time was buggy. Could replicate it several times...I had to keep the JRE back a few versions for it to work.//shrug
    Yea, there are definately bugs from time to time. I generally find issues in SWING w/ cross thread callbacks to components. I don't mean having them installed so much as having a copy of the folder there. The installation itself just puts crap in the registry and such..if the JRE folder is there, you can put it in the classpath of the java app looking for it and it'll run with it rather than another one in the system path (I'm not sure which takes precedence so removing it from the system path might be a good idea)
    amro.co, github.com/amro

  10. #10
    Moderator Bouncer's Avatar
    Join Date
    Oct 1999
    Location
    Baghdad, IZ, Iraq
    Posts
    4,830
    Okay, so here's how I pounded it into submission.

    Java 1.4.2 on IE
    Java 1.5.0 on FireFox.

    Selected Java 1.4.2 under tools/advanced options in IE.

    FireFox doesn't seem to have a place to select Java Versions. At least, I couldn't find it.

    What apparently happens is that when you install java 1.5.0 it overwrites a particular explorer setting in the registry, REGARDLESS of what's being displayed in tools/advanced settings. This means that you must go into the 1.4 java directory and use it's javacpl (control panel) to uncheck then re-check 1.4. JNLP to force IE to use that version, AFTER you have installed java 1.5.

    Now, the problem is that that does work, UNTIL you visit a site that has 1.5.0 which immediately sets the flag to try and use 1.5 again, regardless of the setting in IE. Lovely. So, you must deny access to that particular site for the IE user (Thus the use of FireFox for some sites.)

    It's more complicated though, in our case both websites actually reside on the same IP address server (different ports), so a normal IE filter on the ip won't work to block access to just one site. You have to open IE, go to tools/internet options/content. Then enable content adviser, and then create a PICSrule file (a script) that will block access to the specific web content files, and NOT just the IP address of the web server. This way the user uses IE to talk to 123.123.123.123:8080 for one service and FireFox to talk to 123.123.123.123:80 for a different service.

    Ugly? You bet. Does it work. Yes. Figuring this out and making it work is why they pay me eight-fiddy-five an hour bay-bee!

    Regards,
    -Bouncer-

  11. #11
    IT Consultant koldchillah's Avatar
    Join Date
    Apr 2002
    Location
    Orlando, FL
    Posts
    4,592
    Wow, what a mess, but good to see you got it working with such a clever workaround.

    For a second there, I was thinking "Virtual PC" for running IE with old java just to keep your current install free of any "dual version" java issues, but then comes the problem of setting up a virtual installation and then you end up basically isolating what you are doing within the virtual session whereas you may not want to seperate your work as such. :::shrugs:::
    "Nobody's invincible, no plan is foolproof, We all must meet our moment of truth." - Guru

Similar Threads

  1. Symantec and Java Issues
    By mnosteele52 in forum Software Forum
    Replies: 1
    Last Post: 03-09-06, 01:59 AM
  2. Freeware Java Applications
    By Amro in forum General Discussion Board
    Replies: 3
    Last Post: 07-23-05, 01:45 AM
  3. java nice questions
    By aaa_aaa in forum Programming Forum
    Replies: 0
    Last Post: 03-25-05, 06:59 AM
  4. Issue with Java vitual machine.
    By burple in forum Software Forum
    Replies: 13
    Last Post: 07-27-03, 06:42 PM
  5. Replies: 3
    Last Post: 02-12-03, 03:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •