Windows refuses to run the java.exe in my path.

Hi all -
I'm having some problems managing Java in Windows. All my experience with Java is primarily from a Unix environment, so I'm really having a tough time solving this issue.
Windows is obsessed with using java from c:\program files\Java\jre1.5.0. That directory isn't in my path anywhere, and I don't have the problem from within Eclipse because you can specify your environment, but if I type 'java' from a command line, it invokes a version from that directory. I only noticed when trying to debug an RMI problem related to this and I started my project with "java -server" and it gave me the error:
"Error: no `server' JVM at `C:\Program Files\Java\jre1.5.0\bin\server\jvm.dll'."
Of course if I type in the full path to the java.exe I want to use, its fine.
I've tried just removing the directory in the hopes that it would then take a look at my path variable and find the correct version, but then I just get the error:
"Error: could not open `C:\Program Files\Java\jre1.5.0\lib\i386\jvm.cfg'"
It's driving me mad! What do I have to do to tell Windows to give up on this directory? I've looked at the registry and it is in there about 30 times. That seems a little crazy to me, but I'm just not a Windows guy.
Thanks
Jason

To allow "naked" java commands, Sun places a copy of java.exe and javaw.exe in a Windows directory that's on the execution path. In 2000/XP they're in WINDOWS\system32 (along with a copy of the Web Start program javaws.exe.)
Either remove them, or place the directory that contains the wanted java.exe in the path before the WINDOWS\system32 entry - the first copy found will be used.

Similar Messages

  • I am trying to reinstall Windows on my macbook pro.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."

    I am trying to reinstall Windows (would not launch).  I removed the partition and started over.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."  I was successful before, what am I doing wrong this time?

    Try a restart.
    If that doesn't fix the problem, shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application unistaller. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About
    General information.
    Isolating issues in Mac OS X
    Troubleshooting Permission Issues
    Step by Step to Fix Your Mac

  • Get these two error messages when I run the iTunes exe file:  Error 2 and Error 2 (Windows error 2).  Both say Apple Application Support is required.  Uninstalled and tried to install again several times.  Using Windows 7 64 bit on laptop.

    Trying to install iTunes on my Dell laptop with Windows 7 - 64 bit.  Get these two error messages when I run the iTunes exe file:  Error 2 and Error 2 (Windows error 2).  Both say Apple Application Support was not found.  Can anyone tell me why this is happening?

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • I can't uninstall Firefox(3.6.3) either through the control panel or by going to Program files/Mozilla Firefox/Uninstall and running the helper.exe, I have Windows 7 Home Premium(64bit)

    I simply want to uninstall Mozilla FireFox 3.6.3. I tried both recommendations of using the control panel to add/remove program and running the helper.exe in Program Files/Mozilla FireFox/uninstall. I am running Windows 7 Home Premium Edition(64bit). When I tried to remove it using the add/remove program and helper.exe all it does is start for a split second(mouse pointer turns into circular loading icon) and then it stops.
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    Hi Guys,
    I had this same problem too, and i want to share to all of you my own fix for this kind of problem;
    (READ FIRST: ''This step will wipeout everything that mozilla saved on your computer including : password, history and bookmarks''.)'''
    '''1. download the Revo Uninstaller''''''
    - quick step guide for this:
    select mozilla firefox, don't forget to uninstall everything that relates to mozilla including registry to clean them all up.
    '''2. download mozilla firefox again'''
    - AND REINSTALL. however on this stage, in some cases mozilla will not open at this stage.
    '''3. Uninstall Mozilla firefox again NOW using control panel.'''
    '''4. Restart the computer to refresh everything.'''
    '''5. Reinstall mozilla firefox again, once you have received the prompt for "exporting or importing etc.. etc.. from Microsoft" that means its already working.. it will take around 5-10 sec to load up (in my case) .'''

  • Running a java exe without JRE

    i have created an exe for a java application by using a C program...The c program invokes the DOS shell and runs the JAVA application...
    now how do i make this exe executable on a windows XP machine without JDK being installed...
    The second issue is that if i wrap my exe with the required JRE components the size becomes too large...how do i ship my java application as a single EXE runnable on all WINDOWS machines!!!!!!!!!!!

    Including the JRE with your app, if you zip it, will add about 14MB to your distribution. It's annoying but in the days of broadband, it's not so much of a problem. You could also check this:
    http://www.excelsior-usa.com/jet.html

  • Force jar to run through java.exe not javaw.exe

    Hi,I am programming using eclipse 3.5.1 when i try to export my project as a single jar file it always runs through javaw.exe
    even if its a console app the problem is that sometimes i want it to run through java.exe without having to write the annoying batch file (java -jar "appname.jar") which will only probably run under windows, is there a way around this that would force the jar file to run automatically in console mode?

    803038 wrote:
    Hi,I am programming using eclipse 3.5.1 when i try to export my project as a single jar file it always runs through javaw.exe
    even if its a console app the problem is that sometimes i want it to run through java.exe without having to write the annoying batch file (java -jar "appname.jar") which will only probably run under windows, is there a way around this that would force the jar file to run automatically in console mode?Windows, not java, has file associations which specify what happens to certain files when someone double clicks on it.
    You have one extension which you want to run two different ways. That of course isn't possible.
    You could write a wrapper that spawns a console via Runtime.exec. Then your console apps would be wrapped in that.

  • My computer won't let me run the setup.exe file. I am an admin I've run as admin and I've downloaded many times. I just reformatted my computer and now it won't work.

    My computer won't let me run the setup.exe file. I am an admin I've run as admin and I've downloaded many times. I just reformatted my computer and now it won't work.

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430http://support.apple.com/kb/ht1430
    If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808http://support.apple.com/kb/ht1808
     Cheers, Tom

  • Getting windows error during running the sql scripts from form 6i

    I made a little form application. The purpose of this application is to generate explain plan for a particular SQL. Some sql scripts run internally in order to populate the result on form’s screen after pressing the form’s button but I am getting windows error during running the sql scripts from form 6i.
    I am using forms 6i with patch 17 with Oracle 10G database on windows 2000 professional on same computer.
    This application runs fine with 8i.
    Please inform me where the problem is and how to overcome it.
    Zafri.

    I am using Text_IO in my form's when button press trigger , inorder to create the
    text file, then in the same when button press triger
    I am calling RMAN via host command in order to run the script which was created by text_IO.
    Below you find some of the code. I will appreciate if you solve the problem.
    when button press trigger:
    Declare
    in_file3 Text_IO.File_Type;
    linebuf3 VARCHAR2(1800);
    output11 varchar2(1000);
    BEGIN
         output11:='C:\EXPLAIN_PLUS\misc\rm_file.bat ';
    Host(output11,no_screen);
    :sql.execution_plan:= 'Working........................';
    synchronize;
    in_file3 := Text_IO.Fopen('c:\explain_plus\misc\create_table.txt', 'w');
    Text_IO.Put_Line(in_file3, linebuf3);
    Text_IO.put_line(in_file3,' ');
    Text_IO.put_line(in_file3,' run { sql "create table PLAN_TABLE (statement_id,...object_name varchar2(30),object_instance numeric,object_type varchar2(30),optimizer varchar2(255),search_columns number,id .....partition_start varchar2(255),partition_stop  varchar2(255),partition_id numeric,other long,distribution varchar2(30)) "; } ');
    Text_IO.put_line(in_file3,' ');
    Text_IO.put_line(in_file3,' ');
    Text_IO.FCLOSE(in_file3)
              Declare
    un VARCHAR2(80);
    pw VARCHAR2(80);
    cn VARCHAR2(80);
    output VARCHAR2(1000);
    output2 VARCHAR2(1000);
    dummy varchar2(40);
    in_file Text_IO.File_Type;
    linebuf VARCHAR2(1800);
    BEGIN
         Get_Connect_Info(un,pw,cn);
         /* for Plan_table Begg. Second INNER BLOCK */
         declare
              dummy2 varchar2(40);
         begin
         select table_name into dummy2 from all_tables where table_name='PLAN_TABLE';
         if dummy2 = 'PLAN_TABLE' then
         output2:='rman target/ nocatalog @C:\EXPLAIN_PLUS\MISC\TRUNC2.txt ' ;
    Host(output2,no_screen);
         end if;
         exception
         when no_data_found     then
    output2:='rman target/ nocatalog @C:\EXPLAIN_PLUS\misc\create_table.txt ';
    Host(output2,no_screen);
         end; --

  • Is it possible to run the java program without main?

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    Ramya

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    RamyaWhy do you ask? It sounds like an odd question. Your program can be an applet and it doesn't need a main method in that case.
    Kaj

  • Getting an error msg while trying to run the java class from CMC

    Hi All,
    I am getting an error, while trying to run the java .class file, that which is imoported into CMC.
    Error msg:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:49)
    I have imported .class file into CMC and trying to invoke the .class file by another java program from eclipse..When i tried to invoke the .class in cmc, i am getting an error msg, mentioned above. I thought there might be version conflict. So i changed the java complier version to 1.5 in my Eclipse. After that is done again i am facing the same problem.
    Can anyone help me to resolve this issue?
    Thanks in Advance.

    i have installed BO SDK 3.1 , Service pack 3. It comes woth JDK 1.5 version. i have not done any chnages to it. I impoprted all the jar files related to BO into eclipse.
    1)  Actually, i am writing java code on eclipse. When i run code from the eclipse, it creates a session to cmc and creates folder structure what i need.
    2)  But the thing is, that code needs to run, when i import the .class file into cmc. The process how i imported the .class file to cmc.
    Manage> Add> Program File-->Java (Check Box). In this way i added java class file from the eclipse workspace (class file from the bin directory).
    3) So when i run the .class file externally by another java program or also when i log in to CMC and run that .class file, the instance shows sucess, but when i see the logfile i am getting an exception that which i mentioned above.
    If my method is worng can you please let me know the stepts how to run java program in cmc.
    Thanks in Advance

  • Why the constructor of the base class calls first when u run the java app.

    why the constructor of the base class calls first when u run the java application

    For the record the other very exciting questions are:
    pls give the differences between application server and web server with examples
    will u pls narrate the differences between servlet context and servlet config.....
    where can we find servlet config...
    is there any methods to access servlet config

  • Safari 5.1 not loading MOST of the times. like 1 in 100 attempts it works fine, and that too, as long as you work in same window. and what's the webkit2webprocess.exe file?

    safari 5.1 not loading MOST of the times. like 1 in 100 attempts it works fine, and that too, as long as you work in same window. and what's the webkit2webprocess.exe file?

    the webkit2webprocess.exe has something to do with the sound. Safari works fine for me, except for the occasional time when the webkit2webprocess.exe crashes. Sometimes it crashes Safari altogether but sometimes it just reloads all the tabs I have opened. Either way, it's a huge pain. I hope they fix it with an update soon.

  • When instructed "the java binary in your path"

    please help
    when Im instructed with the following:
    a JDK or JRE 1.0+ (see www.javasoft.com) installed and the java binary in your PATH
    my operating system is windows server 2000
    how do i set the path to to the java binary, Is the java binary. Is the java binary the bin folder, if so i have two of those, one directly under the jdk folder and one under jre folder.
    Do i use autoexecute.bat, if so how.
    thank you for any help rendered.
    Yaary

    Oh oh.
    Java uses the sys var CLASSPATH to look for - well - java classes.
    For that reason, CLASSPATH should always include ".;<yourJavaDir>\jre\lib\rt.jar" or ".;<yourJavaDir>\j2re1.4.x\lib\rt.jar". This ensures that Java can find the classes that come with the distribution (i.e. everything in rt.jar) and all classes in the directory from which you invoke Java or Javac.
    Now, the "<yourJavaDir>\jdk1.x.x\bin" thingie belongs into your PATH variable - that's the var your system uses to look for executables, i.e. java or javac.
    Regards, Thomas

  • Updating BIOS, Windows won't run the exe

    I'm running Win7 Pro x64 and I want to update the BIOS on a a55m-p33 mobo. Live update just says 'download fail', so I've downloaded the file separately and put it on a pen drive as per the BIOS Update SOP. When I run the exe it says it isn't compatible with this version of Windows.
    Anyone know why that would be?
    Thanks.

    >>Use the MSI HQ Forum USB flasher<< and point to the uncompressed archive from MSI or create a dos bootstick (https://forum-en.msi.com/index.php?topic=165175.0), put the .exe on it and start it in dos (also described in the BIOS Update SOP).

  • To run the java application without jdk package

    i would like to know whether possible to make the java .class file as .exe file to run in window environment without the help of jdk package.....if the answer is yes,,,,,is it going to use the jvm???is it come together with window os or not and start from which windows version?? or do we need to use the jre??? actually i would like to make installation package to install an application in windowsxp....i know how to do that one in vb and i've done that one before using visual studio 6.0.....is there any possible way....but please explain in easy words and way coz i might not understand if too technical...nobody can help me in my college,,,even lecturers.....thanks a lot

    i would like to know whether possible to make the java .class file as >>.exe file to run in window environment without the help of jdk >>package.....Yes it is possible, there are many tools like one mentioned above to convert your java .class program to .exe and you dont need jdk for that, though you will need JVM
    if the answer is yes,,,,,is it going to use the jvm???Yes it needs a JVM
    is it come together with window os or not and start from which windows >>version?? You need some tool like PJ2Exe or one mentioned above to convert it to .exe, it wont be available with OS.
    or do we need to use the jre???Yes you will need to install JRE for the JVM
    actually i would like to make installation package to install an >>application in windowsxp....i know how to do that one in vb and i've >>done that one before using visual studio 6.0.....is there any possible >>way....Yes it is possible,
    Make a .exe of your application and using VB make a setup file which takes care of installing JRE as well as your application.
    Regards
    Rohan

Maybe you are looking for