Multiple JREs installed - how to select correct one?

Hi all
I have multiple JREs installed on my computer, which I need to keep.
I'm doing some development, and when I try to run the class, I get the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorldApp
(Unsupported major.minor version 50.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)java -version shows:
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)The reason I'm getting this error is because Eclipse is using the following JRE:
C:\Program Files\Java\jre6\bin>java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)My Path environment variable is:
C:\Program Files\Java\jre6;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Gemalto\GACMy CLASSPATH environment variable is:
C:\Program Files\Java\jre6;C:\Program Files\gemalto\gac\GATicket.jar;How do I force my Windows XP system to use the latest JRE installed?
Thanks

Thanks again.
However, it appears the PATH variable may be a red herring.
If I set the class path to exclude the jre6 directory, as follows:
C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Gemalto\GACThen the following error occurs:
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>java -
version
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>dir
Volume in drive C has no label.
Volume Serial Number is 2806-C30D
Directory of C:\Documents and Settings\Me\workspace\RegexTestProject\bin\re
gextest
03/09/2010  13:55    <DIR>          .
03/09/2010  13:55    <DIR>          ..
03/09/2010  13:56             1,707 RegexTestHarness.class
               1 File(s)          1,707 bytes
               2 Dir(s)  11,257,622,528 bytes free
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>java R
egexTestHarness
Exception in thread "main" java.lang.UnsupportedClassVersionError: RegexTestHarn
ess (Unsupported major.minor version 50.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)This is expected as the class was compiled using a later version of the JDK.
However, if I update the PATH, and add the JRE6 entry to the path as follows:
C:\Program Files\Java\jre6\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Gemalto\GACI then get a class not found exception!!??
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>java -
version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>dir
Volume in drive C has no label.
Volume Serial Number is 2806-C30D
Directory of C:\Documents and Settings\Me\workspace\RegexTestProject\bin\re
gextest
03/09/2010  13:55    <DIR>          .
03/09/2010  13:55    <DIR>          ..
03/09/2010  13:56             1,707 RegexTestHarness.class
               1 File(s)          1,707 bytes
               2 Dir(s)  11,257,618,432 bytes free
C:\Documents and Settings\Me\workspace\RegexTestProject\bin\regextest>java R
egexTestHarness
Exception in thread "main" java.lang.NoClassDefFoundError: RegexTestHarness (wro
ng name: regextest/RegexTestHarness)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: RegexTestHarness.  Program will exit.Below is the code of the class:
package regextest;
import java.io.Console;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class RegexTestHarness {
    public static void main(String[] args){
        Console console = System.console();
        if (console == null) {
            System.err.println("No console.");
            System.exit(1);
        while (true) {
            Pattern pattern =
            Pattern.compile(console.readLine("%nEnter your regex: "));
            Matcher matcher =
            pattern.matcher(console.readLine("Enter input string to search: "));
            boolean found = false;
            while (matcher.find()) {
                console.format("I found the text \"%s\" starting at " +
                   "index %d and ending at index %d.%n",
                    matcher.group(), matcher.start(), matcher.end());
                found = true;
            if(!found){
                console.format("No match found.%n");
}Based on the above, I think the path is set correctly, but I'm doing something else wrong.
Thanks for you help so far. :-)

Similar Messages

  • If I have multiple email accounts, how can I prevent one of them from sending email?

    If set up multiple email accounts in Thunderbird, how can I prevent one of them from sending email, while allowing others to send?

    Simple answer:
    do not use the email address when sending or replying or forwarding emails. Sending is not automatic, you have to generate the email and click on a Send button.
    You could use an smtp server that will not allow sending using the incorrect server for the email address, so that it cannot send, but if you accidentally use the email address you may get an error message, but at least the email will not be sent. Do this here:
    Tools > Account Settings for the mail account.
    bottom right Outgoing Server - select one that will not accept sending using wrong email address
    OR
    in Outgoing Server(SMTP) select the server you are using for that account
    click on 'Edit'
    deliberately make an error in the server name - remove the port details etc.
    So the details are wrong and cannot send.

  • How to select only one record at a time in ALV

    Hi all,
    I have to use ALV report.  Each record on the report output should have a button (or radio button) which will allow the record to be selected.  My requirement is to select only one record at a time.
    please guide me how to proceed further.
    regards
    manish

    hi
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCheckBoxProgram
    Regards
    Pavan

  • Finding the multiple JRE installed path in Linux OS

    for my requirement on finding the JRE installaiton folder on windows and Linux machines , I can able to get it in windows but I am facing problem in getting the jre installed path from Linux machine. I am using Debian etch OS. Can anyone help me to find the installed path of JRE in Linux machine using a Java program. I need to find the multuiple JRE installed paths, i.e. my java program should find all the JRE installed paths and versions of the same.
    Thanks in advance.
    Edited by: VijayForumScreen on Jul 29, 2008 5:46 AM

    As per the terminal prompt its ok...but i need the java concept to retrieve the versions and installed paths of the all JRE.
    e.g;For current JRE we can get by,
    System.out.println(System.getProperty("java.version"));
    System.out.println(System.getProperty("java.home"));
    Output:
    1.5.0_10
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.10/jre
    If i installed 1.3 and 1.4 also.,
    How can i get installed paths and versions for all three 1.3,1.4 and 1.5 JRE's

  • How to select correct time machine backup for migration assistant

    We have two MacBooks backing up to one Time Capsule using time machine: let's call them H and R.
    I have had to reinstall Leopard on Macbook H and am now trying to restore using Migration Assistant.
    Migration Assistant finds the Time Capsule and identifies that there are two Time Machine Backups, but doesn't give an option to select the one to use.
    Whenever I click 'Continue' it does the 'Checking time machine backup' (for hours), then brings up the data to restore, but every time it comes up with the data and settings from Macbook R.
    How can I tell Migration Assistant which Time Machine Backup I want to use?

    Brilliant. That was it.
    I used the other MacBook to run Disk Utility on my backup volume and repaired it: #A5 is bang on.
    Then, Setup Assistant saw both backups and let me select the one I wanted. It's now transferring my stuff.
    Very relieved and extremely grateful.
    Your apple tips should come with every mac and time capsule.

  • How to select top one in CDS view ?

    I have tried following logic to select top one in CDS view but its giving error -
    define view Cds_View_First_Reference as select  top one CReferredObject from CDSVIEWCROSSREF

    Hi Ruchi,
    since you posted this question in "ABAP in Eclipse" I assume you are asking about CDS in ABAP. This is important because the CDS features sets in ABAP and (native) HANA are different.
    Be that as it may,, SELECT TOP 1 is neither supported in the CDS implementation in ABAP nor in HANA.
    In ABAP you might consider using the min() or max() function together with the appropriate GROUP BY clause in the CDS view (depending on what you want to achieve), but you can also easily "implement" this in the Open SQL statement which selects from your CDS view.
    Using the additions SELECT SINGLE or UP TO 1 ROWS and an appropriate ORDER BY clause in Open SQL, you can achieve the same as SELECT TOP 1.
    Unfortunately there is currently no possibility to define a view which delivers the TOP 1 which you can again use in another view ("view on view").
    Kind regards
    Chris

  • How to select correct size for publish media browser

    I have successfully imported and edited movie from my Sony cam. Now when I share it via idvd, the size of the video is large. It doesn't look the same as imovie preview.
    How to select the right size to view video threw idvd?

    The size that plays on the screen. I'm doing share->media browser-> medium(640x360). with idvd, import media browser, select theme and burn dvd. The problem is when I playback the video it's shows as widescreen (large) as oppose to the normal viewing threw imovie preview.

  • I was running firefox beta 9,selected about firefox, which then updated to 10, and when opening 10, began to update to version 11. now the desktop icon is beta 9, start menu beta 10, and version 11 is installed. how do i correct this problem?

    after updating from beta 9, to 10, to11, my desktop icon still says beta 9. The start menue has beta 10, and will not allow me to select open file location, which when accessing through programs(x86) is listed as beta 9. When checking uninstall programs, beta 11, is listed.
    how do i remove references to beta 9 and 10?

    Mr. Willener,
    Thank you for your reply.
    I did un-install and then re-install per the Adobe recommendations which are what you listed in your reply.  The problem remained until I did a MS Windows restore to a restore point a month or so ago.  The IE problems vanished.  However, now I'm using an outdated and unsupported version that is lower than most of the web pages require for their sites, at least the ones I want to view (they all say I need to upgrade my Flash Player which, when I did, put me in this fix).
    As to:
    Pat Willener wrote:
    Usuallyexasperated wrote:
    it requires a...... 2.33 Ghz processor!
    You can safely ignore that requirement; it is simply not true.
    Why would Adobe post a system requirement of 2.33 Ghz for 11.2 if it simply were not true?
    Message was edited by: Usuallyexasperated

  • JNI (Java from C) -- multiple JREs installed, need to use non-default one

    Hello,
    I don't know how many Google/forum searches I must have tried -- I can't seem to find a solution to my problem.
    I am calling Java from C. We have two types of environments:
    (1) 1.3/1.4 mix, and
    (2) 1.4 only.
    The mixed environments are configured to use 1.3 by default. This configuration will not be changed. The original developer's code needs backported to the mixed environment, but it has been discovered that his Java code is not 1.3-compatible.
    Since the code is not compatible with 1.3, I need a way to bypass the default JRE setting and get JNI to start a 1.4 JVM. Is there a way to do this?
    Thank you for your help.

    My "solution" is a kludge. It attempts to compensate
    for what I thus far believe to be an apparent lack of
    functionality. I believe the functionality I
    described should exist in JNI so that little jewels
    like my "solution" are not needed. What I am doing
    is improper. Therefore, I respectfully disagree with
    you.Except that your OP suggested that if you could replace it with 1.4 then that would be suitable solution.
    So if that is a suitable solution and you can in fact modify the JNI code then that is a solution that meets all of your needs.
    Regardless however you will note that the "The Java Native Interface" book in chapter 7 provides a specific section which
    1. Specifically points out why you can't depend on a generic VM loading mechanism
    2. Provides a specific mechanism which is OS/Platform specific, for doing runtime loading of the VM presuming certain constraints are followed.

  • List item w/ multiple data items - how to select data items?

    I have a list component (myListBox) that is showing the
    labels for some data items read in from an XML file. Each item in
    the list has an associated name, description, and path (they're mp3
    files) and they are named accordingly in the XML tags.
    Using myListBox.selectedItem.label gives the correct label
    but myListBox.selectedItem.data is undefined. I've tried using the
    XML tags after the data selector (e.g.
    myListBox.selectedItem.data.path) but those don't work, either. All
    of the examples I've found in the docs show only a single data
    element associated with each list item.
    So, if a list item has multiple data items associated with
    it, how do you select them using the listBox.selectedItem property?
    TIA,
    rgames

    Q2. when I type "Oracle" in A long list item box, cursor is going to the initial character "O" , so I can find "Oracle" in A long list item box easily.Maybe , but of course your list gets smaller as you see only the entries starting with a "O" , except if there are entries in the list which all start with the letter "O" so the total number of entries in the list is equivalent to the number of entries start with "O"...!!!!!!!!!
    My greetings,
    Simon

  • How to select only one row

    hello,
    i've got a select query which returns a couple of rows.
    now i would like for the query to return only one row (the first match it can find).
    how do i do that?
    thank you!
    my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second row .
    84A8E46E8C97     9410     20110812
    84A8E46E8C97     9420     20110813
    84A8E46E8C6E     9410     20110816
    84A8E46E8AFA     9400     20110819

    876602 wrote:
    my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second rowThere is no row order in relational database tables. Same query canreturn rows in different order next time you run it unless you specify ORDER BY. Only ORDER BY guarantees order, so when you say first row/second row you must provide ordering criteria.
    SY.

  • Multiple JREs installed only 1.5 loads and works

    I originally installed jdk/jre 1.5 on a new computer. I then needed to use an applet that requred a version of 1.4.2 (1.5 will not run the applet without errors). I then installed jre 1.4.2 and attempted to configure IE to use it instead of 1.5 but it will not. Clicking the icon in the system tray always displays jre 1.5 spash screen once an applet is loaded.
    I then uninstalled jre 1.5, and IE hangs when an applet tries to load. I uninstalled and reinstalled jre 1.4 and IE still hangs. I reinstalled jre 1.5 and other applets work - except the one I need (back to the original errors). IE, however, does not stop responding as when 1.5 is not installed.
    Solutions?
    Thank you.

    Thanks for the URL.
    I have been through all this configuration documentation and I'm not sure it relates to my problem. I think my subject title is misleading
    My problem is that any version other than jre 1.5 causes my browser to stop responding (I have only tried 1.4.x). The problem even extends to Java Web Start. Its splash screen comes up and then goes away and nothing more.
    When I go to the windows task manager/processes I find a "javaw" for each time I tried starting something.
    I tried turning on the logs for JWS but nothing gets logged.
    Is there a log file for the plugin that may indicate some error that might be taking place?
    Thanks

  • MS 12.01 Component has several models: How to select correct model

    Hello,
    When I select a component from the Master Database, sometimes there are several simulation models avaliable for it.  How can I tell which is appropriate for my use?
    For example, TLC2227 is an opamp from Texas Instruments.  As far as I can tell, it's available in 3 packages and 4 temperature ranges.  The MS Master Database has 5 models to chose from, with no way to know the difference between the 5 unless I want to try to decypher the model code.  How should I know which one is appropriate for my use?
    Regards,
    Who

    Hi,
    If you find the model you want (So say TLC2274CD) and hit on detail report, you might get a better report on what each model does. The models are created by the manufacturers and most of the time they are created to vary in complexity. Some will give you more accurate results but will require more processing time while others will give you less accurate ones but being easier on the simulation. It is up to them to relay the information in each model they make and if they don't we cannot have a sure way of knowing unless you look at the SPICE code. Short answer is yes you have to look at the code itself, usually they vary in degree of complexity (most of the time you don't really need super complex models).
    Kind Regards,
    Miguel V
    National Instruments

  • How to Selectively Delete ONE Key Figure from Cube....

    Hi:
    On a Daily basis (Via Process Chain), I need to do the following:
    1.  DELETE Single Key Figure from my planning cube.  When the "PYMNT DATE" is greater than System Date, then delete the
         key Figure.
    2.  Once Deleted, LOAD the same Single Key Figure from another cube when the PYMNT DATE is GT  System Date. 
    How can I do this in a Program.  What would be the code for this?  Need help with ABAP.
    Thanks in advance.....  PBSW

    Hi,
    See Article on Selective Deltaion in
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Using Selective Deletion in Process Chains
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20selective%20deletion%20in%20process%20chains.pdf
    Thanks
    Reddy

  • Buddies with multiple jabber accounts - How to select?

    I use iChat Jabber support to connect to MSN and ICQ networks. I associate the msn/icq users with a profile in the address book so I see the names in the buddies list (instead of [email protected] server.com
    The problem is when a single user is in more than one network (with a msn and an icq account for instande). In this case iChat only shows one entry in the buddies list, no matter if the user is online at msn, icq or both. This is fine, but when I wanto to send a message and I double clik on the buddies name it always selects the Yahoo account for sending the message.
    Is there a way to select the other account (MSN) without duplicating the address entries in Address book?
    Thank you

    Hi bmoraes,
    Welcome to the Apple Discussions
    Is there a way to select the other account (MSN) without duplicating the address entries in Address book?
    The answer is NO.
    7:43 PM Thursday; June 22, 2006

Maybe you are looking for

  • Lost profile and all mail folders after mac crash

    disaster! my mac crashed. when i restarted and opened thunderbird, i was prompted to create an account. ii spent a lot of time on mozilla support--determined that my address book was in tact and tried several things according to other posts including

  • Incompatiility between iPod Photo and iTunes 7.6.2.9 and vista.

    I have connected 2 iPod photo with my new laptop and none of them are recognizeds by iTunes 7.6.2.9. Other iPods like my 5.5Gen 80GB and an old iPod mini 4GB and my sister's 80GB iPod classic are recognized without a hitch. I reinstalled the windows

  • Months changing in numbers I type september and it changes to october

    After updating to the latest version of numbers I noticed some of the data in my spreadsheets changed. The formulars get confused when a month is used as a reference but I couldn't work out why. I tried formatting a cell with a pop-up box containing

  • Harvest flies in the screen

    I doubt anyone can help, maybe more of an amusement than anything. A while back I got a small line, not even completely horizontal or vertical, of black pixels. I thought they were dead. A couple of days later, another cluster in a completely differe

  • GENERATE A LINK FOR PURCHASE DOCUMENT

    Hi, our scope is to generate a link for a purchase document in a 45.B release. Manually we can, inside a PO, go to menu system>links and add a url link for the opened document (link type URL). Is it posible to generate this link form abap starting fr