Problem in running javac.exe

Hi
I'm using Windows 2000 server.
I installed Java 2 sdk in directory c:\jdk1.2.2. After this I added
c:\jdk1.2.2\bin in the path environment variable using Control Panel ,System Utility.
Then I opened the command prompt (Start ,Run ) and typed command in the box:-
Steps:
1.Start ->Run
2. Typed command in the box
Now when I tried c:\> javac Hello.java it gave the foll. error:-
javac is not an internal or external command.
But when I tried to run javac using cmd instead of command in the start->run box it works fine
1.Start ->Run
2. Typed cmd in the box . Now javac Hello.java worked .
My Question is why it works with cmd and why not with command
Please help

cmd is the win2k console. it carries all system settings from wn2k. command is a dos box. it wont have the path settings u did for java

Similar Messages

  • "Error running javac.exe compiler" when using ant to compile Eclipse plugin

    Hi
    I encounter an error "Error running C:\jdk1.5.0_06\bin\javac.exe compiler" when building my project using ant1.7.
    My project has 10 eclipse plugins, and each plugin is compiled by invoking following ant target
    <!-- ===================================================================
    Compile specified plugin
         target parameters:
              param.plugin.dir: the plugin directory
              param.plugin.targetJarFile: the name of jar file for the given plugin
              param.plugin.src.dir: the folder name of source codes. Note: it is relative path name
              param.fork: indicate if another process is forked to run javac
    =================================================================== -->
    <target name="compilePlugin">
         <!-- Prepare compile environment -->
         <!-- Delete obsolete build folder -->
         <delete dir="${param.plugin.dir}/${build.dir}" quiet="true"/>
         <!-- Delete obsolete jar file -->
         <delete file="${param.plugin.dir}/${param.plugin.targetJarFile}" quiet="true"/>
         <mkdir dir="${param.plugin.dir}/${build.dir}"/>
         <!-- Compile source codes -->
         <javac      srcdir="${param.plugin.dir}/${param.plugin.src.dir}"
                   destdir="${param.plugin.dir}/${build.dir}"
                   failonerror="${javacFailOnError}"
                   verbose="${javacVerbose}"
                   debug="${javacDebugInfo}"
                   deprecation="${javacDeprecation}"
              optimize="${javacOptimize}"
                   source="${javacSource}"
                   target="${javacTarget}"     
                   fork="${param.fork}" memoryInitialSize="256m" memoryMaximumSize="512m">
              <classpath refid="compile.classpath" />
         </javac>
         <!-- Create plugin jar file -->
         <copy todir="${param.plugin.dir}/${build.dir}" failonerror="true">
              <fileset dir="${param.plugin.dir}/${param.plugin.src.dir}" excludes="**/*.java, **/package.htm*" />
         </copy>
         <jar jarfile="${param.plugin.dir}/${param.plugin.targetJarFile}" basedir="${param.plugin.dir}/${build.dir}"/>
         <delete dir="${param.plugin.dir}/${build.dir}" quiet="true"/>
    </target>
    Since each of first 9 plugins contains less than 500 java source files, we always set "param.fork" to false when invoking this ant target.
    For the 10th plugin, it has about 1000 source files. If we set "param.fork" to false, we will get the error "Error running javac.exe compiler". So we have to set "param.fork" to true when compiling it. This week, this plugin contains about 1250 files and we get the same error again when compiling it. I tried to increase the "memoryMaximumSize" to "768", but still couldn't get through it.
    BTW, There are about 150 jar files in our classpath for compiling plugins. Do many jar files cause this problem?
    Any help is highly appreciated.
    Many thanks
    Oceanman

    I encountered a very similar error and I was able to resolve it by removing the following parameters from the javac task:
    fork="${param.fork}"
    memoryInitialSize="256m"
    memoryMaximumSize="512m"My values were not the same as yours, before I removed them, the values were set to:
    fork="true"
    memoryInitialSize="256m"
    memoryMaximumSize="256m" Not sure why this fixed my problem but it did. I was using Ant 1.7 and Java 1.6_07 hope this helps.

  • GeoKettle: Error running javac.exe compiler

    Hi,
    I am trying to use GeoKettle exactly as mentioned at
    http://209.85.229.132/search?q=cache:JHfrxCo7y0YJ:forge.osor.eu/docman/view.php/143/250/Kettle_Devel_guide_v0.odt+geokettle+spoon+java+api&cd=2&hl=en&ct=clnk&client=firefox-a
    But when I try to build it, i am getting the following error.
    [javac] Compiling 135 source files to D:\workspace\geokettle\classes-core
    BUILD FAILED
    D:\workspace\geokettle\build.xml:74: Error running javac.exe compiler
    Can anyone guide me please to resolve this problem.
    Best Regards
    Tabbasum

    most likely the javac executable is not on the system path. Try typing 'javac -version' in a command prompt and see what response you get.
    If it is something like 'javac is not a recognized...', locate where the JDK is installed and add its bin subdirectory to the PATH system variable. Restart any command prompt and type javac again.
    You DID have a JDK installed, didn't you?

  • RFE: faster javac compilation using invocation instead of running javac.exe

    Sun's JDK contains the Java compiler in tools.jar.
    Why not use it instead of running javac.exe?
    It should also simplify the code for cross platform compatibility...
    Regards,
    Yaniv Kunda

    I meant that JDev would invoke the compiler from the libs of the project JDK.
    But this is indeed a sort of a hack because the libs are not documented and are sun-specific (a problem with other JDKs).
    Anyway, I was just reading a bit on Java 6 (Mustang) and saw that an API (per JSR-199 : http://jcp.org/en/jsr/detail?id=199) for java compilation is one of its new features!
    This feature is documented in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4164450.
    I guess it would be a feature for a newer major release of JDev, but nevertheless important to mention.
    Regards,
    Yaniv Kunda

  • I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...

    I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...what should I do?

    Hi Arika,
    The drivers that you need to install to make your executable work depends on what your executable is doing. To get started, you need to have the LabVIEW Run-Time Engine installed on your target machine (the Win2000 machine you are planning to use) in order to run your executable. Next, you need to determine what drivers your executable uses, if any. For example, if you are using GPIB instrument control, you will need to install the NI-488 drivers on your target machine. If you are performing data acquisition, you will need to install NI-DAQ drivers. If you are doing image acquistion, you will need to install NI-IMAQ drivers.
    All these drivers are available for downloading on ni.com. To get the drivers, go to ht
    tp://www.ni.com/support , click on the link that takes you to Drivers and Updates (under Option 3), and click on the links to get to the driver(s) you need. For example, if you need the LabVIEW 5.1.1 Run-Time engine, click on the All Drivers and Updates by Application link on the main page (http://www.ni.com/softlib.nsf/). Then click on the LabVIEW link, Windows 2000, Run Time Engine, and then you will see the link to get to the page to download the LabVIEW 5.1.1 Run-Time Engine.
    I hope this information helps.
    Best Regards,
    Wilbur Shen
    National Instruments

  • XI installation - problem when running sapinst.exe

    hai,
      when i'am running sapinst.exe file i'am getting the following error  -
    SAPinst is getting started.
    Please be patient ...
    guiengine: call to bind() for socket 1832 failed. No such file or directory
    ERROR      2007-02-28 14:50:20 [iaxxgenimp.cpp:532]
               init()
    FGE-00006  Attempt to open a communication port connection failed. Check whether the port 21212 is already in use.
    ERROR      2007-02-28 14:50:20
    FCO-00034  An error occurred during the installation. Problem: error in GUI server subsystem.
    Exit status of child: 1
    can anyone help?
    bye
    nandana

    Hi Nandana,
    Please check this link...
    Re: problems installing NW04 sneak preview (java)
    it talks about the same problem as yours...
    Thanks.
    btw...i got the link from google
    Message was edited by:
            Renjith Andrews

  • Problem with running java.exe

    I am new to Java, I have windows XP PRO and have recently installed JDK 5.0 with net beans 4.0 beta 2 bundle to C:\. I have also set the PATH & CLASSPATH as follows
    PATH = C:\jdk1.5.0\bin
    CLASSPATH = .;%classpath%
    I am able to compile at the comand prompt using for example javac Fruit.java
    but when I try to run the program using java Fruit , I get the following message:
    Exception in thread "main" java.lang.NoClassDefFoundError: Fruit
    Please can some one help me where am I going wrong?

    Thakyou for the reply , but I am still having the same problem
    My .Java & .class file are in C:\MyJava
    My JDK is in C:\jdk1.5.0
    My Command Prompt is C:\MyJava
    The Only way I have managed to run my programs is, at the Command Prompt by typying
    C:\MyJava>C:\jdk1.5.0\bin\java Fruit
    But I am able to compile my programs by typing
    C:\MyJava>javac Fruit.java
    I would like to know is there any way I could run my programs by typing
    C:\MyJava>java Fruit
    My Source code is
    public class Fruit
    public static void main(String[] args)
    //Declare and initialize three variables
    int numOranges = 5;
    int numApples = 10;
    int numFruits = 0;
    numFruits = numOranges + numApples;
    System.out.println("A totally fruity program");
    System.out.println("Total fruit is " + numFruits);
    C:\MyJava>set
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\S Kathirkamanathan\Application Data
    CLASSPATH=.;%classpath%
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=SAYANTHA-WL3F5L
    ComSpec=C:\WINDOWS\system32\cmd.exe
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\S Kathirkamanathan
    LOGONSERVER=\\SAYANTHA-WL3F5L
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\AT
    I Technologies\ATI Control Panel;C:\Program Files\Sonic\MyDVD;C:\jdk1.5.0\bin;c:
    \jdk1.5.0\bin;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 3, GenuineIntel
    PROCESSOR_LEVEL=15
    PROCESSOR_REVISION=0303
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\SKATHI~1\LOCALS~1\Temp
    TMP=C:\DOCUME~1\SKATHI~1\LOCALS~1\Temp
    USERDOMAIN=SAYANTHA-WL3F5L
    USERNAME=S Kathirkamanathan
    USERPROFILE=C:\Documents and Settings\S Kathirkamanathan
    windir=C:\WINDOWS
    I would be grateful for any suggestions. Thank you

  • Problem with running rhcl.exe in batch file

    Hi,
    I'm running Robohelp 8 and trying to use rhcl.exe to generate multiple help projects. I'm having a problem with the folder where the rhcl.exe is generating the web help. It seems to ignore the "-o" switch and gets the generation folder from the project all the time. As you can see from the log file below, the exe appears to pick up the "-o" path  (......\Test\Opportunities.htm), but writes the generated files to the path in the project (.....\Opportunities\index.htm).
    Anyone else come across this problem?
    MY BATCH FILE IS:
    "C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\rhcl.exe" "C:\Data\RoboHelp\RoboHelp Projects\SubProjects\SupplierPortal\Opportunities\Opportunities.xpj" -l Webhelp -o "C:\Data\RoboHelp\GeneratedWebHelp\SupplierPortal\mergedProjects\Test" -g "C:\Data\RoboHelp\GeneratedWebHelp\Generate.log"
    THE LOG FILE CREATED IS:
    Adobe (R) RoboHelp Project Command Line Compiler version 8.0.0.203
    Copyright (C) 2006-2007, Adobe Systems Incorporated and its licensors. All rights reserved.
    Project: C:\Data\RoboHelp\RoboHelp Projects\SubProjects\SupplierPortal\Opportunities\Opportunities.xpj
    Layout: WebHelp.
    Output: C:\Data\RoboHelp\GeneratedWebHelp\SupplierPortal\mergedProjects\Test\Opportunities.htm.
    Scanning project for compilation....
    Scanning finished.
    Warning: No baggage file description.
    Starting compilation...
    WebHelp preprocessor 8.0.0.203
    Compiling C:\Data\RoboHelp\GeneratedWebHelp\SupplierPortal\mergedProjects\Opportunities\index.htm ...
    Preparing to create WebHelp...
    Clearing output folder...
    Preparing files for WebHelp...
    Copying files...
    Updating files...
    Finished preparing in 1 sec(s)
    Initializing compiler...
    Generating WebHelp 5.50 (8.0.0.203)...
    Processing TOC data...
    Processing Context-sensitive-Help data...
    Updating HTML topics...
    Updating opportunities/e-auctions/how_do_i/creating_a_new_bid.htm...
    Updating opportunities/e-auctions/how_do_i/creating_a_response.htm...
    Updating opportunities/e-auctions/how_do_i/viewing_auction_details.htm...
    Updating opportunities/e-auctions/how_do_i/viewing_bid_details.htm...
    Updating opportunities/e-auctions/how_do_i/viewing_a_list_of_auctions.htm...
    Updating opportunities/e-auctions/how_do_i/withdrawing_from_an_auction.htm...
    Updating opportunities/e-auctions/screen_level_help/list_of_auctions.htm...
    Updating opportunities/e-auctions/screen_level_help/new_bid.htm...
    Updating opportunities/e-auctions/screen_level_help/view_auction_details.htm...
    Updating opportunities/e-auctions/screen_level_help/view_bid_details.htm...
    Updating opportunities/e-auctions/introduction_to_e-auctions.htm...
    Updating opportunities/introduction_to_opportunities.htm...
    Finished updating HTML topics in 0 sec(s) : total 12 topic(s).
    Processing Full-text-search data...
    Finished processing Full-Text-Search data in 0 sec(s)
    Applying WebHelp 5.50 Template...
    Finished applying Template in 1 sec(s)
    Processing Mark of the Web...
    Finished compiling WebHelp in 3 sec(s)
    Compilation complete.

    Hi again
    And that's why we call them bugs.
    Did you remember to report it as same to Adobe? The link is in my sig.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Application Builder 7.1: problem when running an EXE

    Hello,
    I have developped a VI on a computer with LabView 7.1. The VI uses an USB 6008 (with DAQmx base 1.4 drivers.) to measure signals. It perfectly works. Now I've spent a lot of trying to put the system on a computer that doesn't have LabView installed.
    -I first installed the USB 6008 drivers on the computer
    -Then I made an installer with the application builder (including the run-time engine)
    -Once the application is installed on the new environnement, I just keep on having error messages when running it.
      -first it doesnt find all the DLL, you have to copy them from the PC with LabView in C:\windows\system32\.   Done.
      -then I get this big dialog box with a listing of sub-Vi missing, such as: Sub-VI Create Task.vi missing in VI Instance 1  6ProgName.v1
       I've looked into the LLB file created with the builder: all these sub-VI are here!! Why won't it work?
    What can I do to solve this?? Thanks for your help.

    Hi  batsenn,
    for the missing dll: what are those dll's? you may need to install additional run-time packages, or check some more component in the Advanced Installer Settings form, depending on your application.
    Now for the main problem: are you calling vi's dynamically from an external LLB? in many cases when a file is not found from the built application, it's a path problem. In fact, if a vi path is e.g. c:\mysourcedir\myvi.vi, when the EXE is built the path will be something like c:\myexedir\myexe.exe\myvi.vy. You see that there is an additional Strip Path you need to do if you are getting the current path from a vi path.
    What I said can be relevant or not depending on the vi calling techinique you are using. A suggestion is to execute the built EXE on the development computer (where all components are present) to check if the problem is still there.
    Hope this helps.
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Computer restarting when running javac.exe

    Hi...i am new to Java.
    I have a problem, when I compile my java file using javac myfilename.java then suddenly my computer restarting itself...
    This happens many times on my computer...Is there anybody know the reason?
    Thanks

    This is an odd problem. Apart from viruses, the usual reason for an unexpected restart is some kind of driver problem, since in XP this often triggers an automatic restart instead of a blue screen (what a creative approach to ridding the world of the BSOD ;-)
    It doesn't seem likely to be a graphics problem, since it occurs with non GUI apps, but just so you know, ATI cards are particularly prone to trouble.
    Install any pending service packs, and update your SDK to 1.4.1_02 if you haven't done so already. Change your graphics drivers to the newest available set.
    That should knock the problem on the head, hopefully.

  • Problem  run Sapinst.exe

    Hi, i have the problem with run sapinst.exe
    I installing Netweaver 7.0  EHP2 in Windows 2003 server 32 bits
    i have the following number installation:
    - 51040135_11      BS7i2010 Installation Master Windows Server on IA32 32bit
    - 51040135_12      BS7i2010 Installation Master Windows Server on IA64 64bit
    - 51040135_13      BS7i2010 Installation Master Windows Server on x64 64bit
    I using option  51040135_11 but no show all options installations, only show option: "standalone Engines", "optional standalone units" and "Software life-cycle option"
    Whe run option 51040135_13 show messages: "sapinst.exe is valid, but is for a machine type toher than the current machine".
    The option 51040135_13 if show all option installtions. I need install netweaver 7.0 EHP2 stack Java.
    I could help?

    Hi,
    It seems for windows 32 bit OS there is no installation options for NW7 EHP2
    WINDOWS SERVER 2003/IA32 32BIT  Released Conditionally  19.04.2010     
    WINDOWS SERVER 2003/IA64 64BIT  Released  19.04.2010     
    WINDOWS SERVER 2003/X64 64BIT  Released  19.04.2010     
    WINDOWS SERVER 2008/IA64 64BIT  Released  19.04.2010     
    WINDOWS SERVER 2008/X64 64BIT  Released  19.04.2010     
    WINDOWS SRV 2008 R2/X64 64BIT  Released  02.07.2010     
    See the PAM for NW7 EHP2.
    I think its better to have a 64 bit machine or install lower version of SAP.
    Thanks
    Deepthi

  • Facing problem with running exe from my java code

    Hello,
    I have to run the exe from java code for which I m using Runtime and Process classes. The exe runs in the following way on command line
    C:/ myexe -j [now press enter]
    input sentence followed by ! [now press enter]
    And after this exe gives the output.
    So is there any way to achieve this programmatically in Java?
    Thanks in advance.
    Regards,

    I m confused .. how can i pass input to the Process through InputStream? I think it will need OutputStream for that.
    Here is my code...
    import java.io.*;
    class CallToExe
    static BufferedReader br;
    public static void main(String[] args)
    File F = new File("C:/Chasen.exe");
    try
    if( F.exists())
         System.out.println("Exe exists");
         Runtime rt = Runtime.getRuntime();
         Process proc = rt.exec("C:/chasen.exe");
         br = new BufferedReader(new InputStreamReader(in));
         int a = in.read();
         System.out.println(a);
         String res = br.readLine();
         System.out.println(res);     
         while(!res.equals(null))
         System.out.println(res);     
         res = br.readLine();
    proc.waitFor();
         proc.destroy();
    catch(NullPointerException npe)
         npe.printStackTrace();
    catch (Exception IOEx)
    IOEx.printStackTrace();
    But it doesnt work as my chasen.exe needs arguments from stdin.
    The way exe works is as follows.
    on command prompt>>
    C:/chasen.exe -j [ Need to press ENTER here]
    input statement . [ Need to press ENTER here too]
    Then output is displayed on command prompt which can be taken from InputStream of the process. But I m not able to properly run this exe itself with all the arguments frm Stdin

  • Problems to invoke java.exe from Java application, but ok for javac.exe??

    How to invoke DOS application from Java application??
    I try the following but it didn't work to invoke command prompt and java.exe, it
    is working to invoke javac.exe. Any ideas why??
    import java.io.*;
    public class CallJavaTest
    { public static void main(String[] args)
    { try
    Runtime.getRuntime().exec("C:\\WINNT\\System32\\cmd.exe"); //doesn't work!!
    Runtime.getRuntime().exec("javac "+ "Test.java"); //it works!!
    Runtime.getRuntime().exec("java "+ "Test"); //doesn't work!!
    catch(IOException e)
    System.out.println(e);

    hi
    String[] cmd = {"cmd","/c", "start",enteryourdoscommandhere};
    Runtime rt = Runtime.getRuntime();
    Process ps = rt.exec(cmd);
    ps.waitFor();
    int ev = ps.exitValue();
    it works for my winXP.
    hope it can helps and not too late ..

  • Having problems with javac.exe??

    hey.....I cannot use any text editor to compile in either windows me, or windows xp...appearently, javac.exe is missing from file path C:\Windows\System32\javac.exe??? any advise??please?!?!is this a windows thing?

    This probably is a windows thing. You need to add the jdk/bin directory to the system path variable.
    See
    http://java.sun.com/j2se/1.4.1/install-windows.html

  • Can't find Javac.exe

    I'm new to Java (presently taking a class). I'm very confused and not getting too far. I'm running Win XP and have downloaded the latest version of Java J2SE1.4.0_01 (actually because of repeated problems, I've uninstalled and installed it a few times).
    I can't find javac.exe anywhere on my c drive. I read a past forum posting describing the same problem which suggests downloading the latest version of SDK1.4. Isn't this what I have been downloading? Where can I find this download? If it isn't what I've been downloading, why do I need both and how would I have known this? I understand how to set the path once I get javac.exe but I'm becoming frustrated trying to obtain this file and move forward with my study of java. Thanks for the help.

    If you need only to run a java application then you just need a JRE (Java Runtime Enviorment ). It contains everything that you wanted to run it.
    But, if you want to develop some java application , then you needs something more... you need to have to compile those source files first... For this what you want is a SDK (Software development Kit)... Both is free.. You can download the 1.4sdk from http://java.sun.com/Download6
    After downloading and installing it, set the path corectly to include the bin directory of the installed folder..
    Hope it helped
    appu

Maybe you are looking for

  • Previewing Pages document in Preview shows page numbers incorrectly

    Previewing Pages (5.2) document in Preview (7.0) shows page numbers incorrectly. Regardless of starting page number preview shows as Page 1. Suggestions appreciated...

  • Hiding a hierarchy column in graph view

    Hi All, In an compound layout I would like to have pivot view and bar chart view. There are two hierarchy columns in criteria. These column should display in pivot view. My requirement is to hide the hierarchy columns in Bar chart view and can we app

  • HT4623 Phone does not work after update

    After update 6.1.4 phone cannot find signal to function even though wireless works.  Cannot reload update...says it's up to date.  Reboot nothing,  Reset, nothing.  Really beginning to dislike this piece of junk.  Just need a phone that works.

  • Quota status bar in Convergence

    Hello I'am working on convergence and I want to show Quota in Convergence. Messaging server version : Sun Java(tm) System Messaging Server 7.0-3.01 32bit (built Dec 9 2008) Convergence Version : Sun Convergence 1.0-4.01 (built December 8 2008 - 14:54

  • Can't import RAW files from Canon Powershot S50.

    iPhoto6 will not import RAW files from my Canon Powershot S50. It says the files are "unreadable". Image capture will import to the desktop, but neither iPhoto nor Photoshop Elements can open the file. I checked and the S50 is supposed to be compatib