Javac wanted

Hi
I have del my java 1.3, which then i install java 1.3.1
but when i set the path and everything else i can't find the javac in the java folder?????? . I thought that the javac.exe comes with the installation file but for some reson it was not there. Can anyone tell me what is the latest version and where i can get a full version of java
What i mean is a full package of AWT, SWING and all the other stuff like javac.exe, java.exe, javadoc.exe etc....
Plz can any of u help me cos it very important thank you

I have install the JDK well it said JDK anyway.
But where can i get a Full JDK i mean the one with everything in it like AWT,SWING and GUI intiface like the one shown in the SWING TUT.
I'm very Confuse at the moment cos I don't know which is which. All i know is a bit of java language hehe I thought that was enough to start Learing java I guess wrong:(
But thank you for what you just said cos I'm learing more as i go.. thanks you

Similar Messages

  • 9iAS javac is running well but also want to compile Servlets

    Dears!
    I have installed Oracle 9iAS on Windows NT4.I want to develop servlet & JSP
    using Oracle 9iAS.
    I have tried compiling my servlet in Command Prompt after setting up the
    PATH for the JSDK & JDK shipped with 9iAS but i got the following error:
    Package javax.servlet not found in import.
    import javax.servlet.*;
    ^
    Supperclass HttpServlet of class (my class) not found.
    public class (my class) extends HttpServlet.
    ^
    The home of my 9iAS is as,
    e:\9ias_home & i found the JDK & JSDK folders as,
    e:\9ias _home\Apache\Jdk
    e:\9ias _home\Apache\Jsdk respectively.
    Similarly when i tried to compile the servlets(given in 9iAS) i got the
    same above error.(But Java's Application programs are running OK! and not
    Servlet & JSP etc!)
    I think that this problem is because of environmental variables etc.
    but i have set the paths but did not succeeded.i have set the path of
    JDK & JSDK using (Controll panel->System->) environment tab as
    .;e:\9ias_home\apache\jdk;e:\9ias_home\apache\jdk\bin
    ;e:\9ias_home\apache\jdk\lib\tools.jar;e:\9ias_home\apache\jsdk
    ;e:\9ias_home\apache\jsdk\bin;e:\9ias_home\apache\jsdk\lib\jsdk.jar
    .. it is very important and your help can makes a great.
    Many thanks!
    [email protected]
    null

    To set up Tomcat, here's what I'd do.
    1) Remove j2ee.jar from C:\JDK1.3\jre\lib\ext
    That will cause more headaches than you can imagine.
    2) Add servlet.jar to your classpath. Servlet.jar is located in lib under your tomcat directory. ( so, something like C:\jakarta-tomcat\lib\servlet.jar )
    3) Make sure that you have your JAVA_HOME environment variable set to C:\JDK1.3. If this is not set up correctly then you will get the error: sun/tools/javac/Main not found...
    Hope that helps.
    Anne

  • I'm new to Java and can't get javac command working

    Ok first of all hello ( i'm new to the forum ), second i'm reading a book about Java and im trying to compile a sample code from the book, but javac command gained life and it's against me. So the book i'm reading is Sams Teach Yourself Java in 21 Days (YAY), and the code i want to compile is an application that works with another bit of code that mimics what a robot could do inside a volcano. So the Volcano program code is the following ( i'll post the robot code at the end of the post):
    1: class VolcanoApp {
    2: public static void main(String[] arguments) {
    3: VolcanoRobot dante = new VolcanoRobot();
    4: dante.status = ?exploring?;
    5: dante.speed = 2;
    6: dante.temperature = 510;
    7:
    8: dante.showAttributes();
    9: System.out.println(?Increasing speed to 3.?);
    10: dante.speed = 3;
    11: dante.showAttributes();
    12: System.out.println(?Changing temperature to 670.?);
    13: dante.temperature = 670;
    14: dante.showAttributes();
    15: System.out.println(?Checking the temperature.?);
    16: dante.checkTemperature();
    17: dante.showAttributes();
    18: }
    19: }
    Ignore the numbers they are used for explaining stuff in the book, and i din't copy the indentation.
    So what i do is that i creat a file with notepad ( no fancy stuff only plain old notepad ) and i copy this code, remove the numbers and make the indents.
    After that i save as .txt file with the apropriate name ( i know it's case sensitive ). After that i open command prompt and write:
    javac VolcanoApp.java
    And it tells me that "javac is not recognized as an internal or external command operable program or batch file".
    I managed to solve that by going to the control panel and by adding to the system variables for my user in the path variable this :
    ;C:\JAVAJDK\bin
    ( C:\JAVAJDK is where JDK is installed)
    And then i modified the system variables like this:
    In the CLASSPATH i entered this .;%JAVA_HOME%\lib\tools.jar
    In JAVA_HOME i entered this C:\JAVAJDK
    Setting the variables like this made the javac error go away but now when i write in command line
    javac VolcanoApp.java
    It gives me this error
    javac: file not found : VolcanoApp.java
    Usage: javac options source files
    use -help for a list of possible options
    And then i read that i can drop my java file directly in the javac file. So i did.
    When i drop my VolcanoApp.java in the javac file it open a command line window and writes a bunch of stuff in like a milisecond and shuts down. And no file is created.
    I wanted to know what was writen in that window so i did it again and took a print screen and pasted it on paint ( it writed so much text that i only got a little bit but enough to see what hapend)
    I read it and in the print screen it said it had 15 errors ( so far ) and then it point the errors with little arrows and there were characters that weren't present in the original code.
    What hapend the compiler added wierd letters?
    SO, my real question is, how the heck do i get javac working and compiling stuff properly?
    Plz help i'm getting mad at this! ; (
    And the code for the "robot":
    1: class VolcanoRobot {
    2: String status;
    3: int speed;
    4: float temperature;
    5:
    6: void checkTemperature() {
    7: if (temperature > 660) {
    8: status = ?returning home?;
    9: speed = 5;
    10: }
    11: }
    12:
    13: void showAttributes() {
    14: System.out.println(?Status: ? + status);
    15: System.out.println(?Speed: ? + speed);
    16: System.out.println(?Temperature: ? + temperature);
    17: }
    18: }
    Again no indents and ignore the numbers. In the book it only said to compile the VolcanoApp.java , and not the VolcanoRobot.java
    Edit:
    I'm using Windows Vista Home Premium 32 bit.
    Edited by: BBlop on Dec 13, 2009 11:29 AM

    guess what it says java file. So yes i'm sure. Sarcasm. Not the best way to encourage a total stranger to help you. Then there's
    Sorry if i wasn't more clear but was that response needed?No it wasn't needed, but I'm not the one asking for help so I have the luxury of not worrying too much about it. It's extremely frustrating trying to drag relevant information out of someone, and makes one less inclined to bother.
    Anyways, there's still nothing in this thread that actually explicitly says "there is a file called VolcanoApp.java in the directory where I'm running javac from" and I really can't be bothered banging my head against the wall any longer. You've made a silly mistake, or a false assumption. We all do it from time to time. My advice is, take a break, go for a walk and re-visit this in a while. You'll probably spot the mistake right away.

  • Path not working in win xp pro, can call java but not javac !

    Hello,
    I just upgraded to win xp and set up the J2SDK. I have set the path variable in the environment settings.
    when I tried to test this by typing java from my documents directory it works all right but not the javac command, to which it gives the error
    "'javac' is not recognized as an internal or external command,
    operable program or batch file."
    when I type path then I get the following result -
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\borland\bcc55\bin; c:\jdk1.4.0_01\bin;C:\FSC\PCOBOL32;C:\PROGRAM\PCOBOL32 , so my path settings are correct.
    Why is this happening? Thanks for any help.
    - rdg
    P.S. I also am also unable to invoke the c++ compiler from my documents, so I think this may be a problem with my path, but then how am i able to call the java.exe ?

    -----BEGIN PGP SIGNED MESSAGE-----
    In win xp you must type the name of the directory as Dos-8 format,
    for example, if you want to use c:\J2sdk1.4.0_01 you must write in
    the path c:\j2sdk1~1.0_0
    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
    iQEVAwUBPWL6quIx3Zm+mBoJAQFhVwf/dM2pfQYN5Wp5AnmD+HV1Nx+5MSm1zmUs
    b3UPC8xJt0JhJItyims6YLEJKAv+Mrm0sk3fVyfg1o4Tcpw0bzG/RsVdsTsrmlDu
    vUlqWrxgTRH85IAjro83lGNuLUo6PKs10hVj4h4tqL8BkLE4pCkZfLT2tpG7VLt0
    YylUFx6DZQzF1HVK9+6MqYOvBEjxLhkNRHThNysUJj6SBkNHKDbDgnOcUQf+8PpZ
    RxItuKGUys6FdLSvrxonbj2qbHJ34Ewb/a8DL1MXcCOtP2QGIta4ozq/3SVPDAK4
    BD/NG97FsuYbL/l18Je4EzXRWqtG9IlIY8WBhbdx8X3B3fpuq8gICw==
    =UJDG
    -----END PGP SIGNATURE-----

  • How to make netbeans compile files as javac cmd??

    hi all...
    I have a problem running my java code from netbeans, I use netbeans 6.7 with jdk 1.6.0_16 on windows XP
    when i compile the java file in netbeans and then run it, i get an exception but if i compile the same java file using the javac from cmd then run it, everything is perfect without any error.... so i think the problem is from the compiler in my netbeans,
    I want to make the netbeans compiles the java files exactely as javac CMD, and produce the same .class files... how can i do this?
    thank you...

    You should post the error message. Maybe someone can then give you some guidance.

  • How to put the ".class" file in Memory with Javac?

    The J2SE 6 RC have an tool : javax.tools.JavaComplier. I can use it to compile the source code in memory( I implemented an JavaFileObject).
    But the compiler aways put the output file(.class) to file system. It;s not my want to do . I am writing an IDE ,I use javac to determine the code error after the user's typing. So complier is used a lot , writing to file system is a time consuming job.
    I also want to use the byte code(".class" file) for reflection , so if the JavaCompiler can put the output file in memory and then I can reflect it.
    My current solution is puting the output file to file system then use Class.forName() to reload it in memory then reflect it. It seems a useless IO operation with file system.
    How can I do with it?
    Thanks!

    Those 'useless' I/O operations are one or two out of thousands that are implied by compiling a Java source file.
    I wouldn't worry about it.

  • Is this a bug in javac?

    I have compiled with java 1.4.0 this:
    int decimals = Integer.parseInt("123456");
    but had an error with this:
    int decimals = Integer.parseInt(s).intValue();
    This is a bug in javac?

    The method parseInt() already returns the primitive type int, there is no need to invoke intValue() (see Java API documentation for details). You only use the intValue() if you want the primitive value of an Integer object.
    int number = Integer.parseInt("123456"); // ok returns primitive value
    int number2 = new Integer("123456").intValue(); // get primitive value from Integer objectNote that in Java (contrary to C#) primitive values and equivalent number objects are not compatible and must be converted.

  • Unable to use javac or jar commands

    Hi all,
    I've been using my IDE to compile and run my programs. However, when I want to use -javac or -jar commands in my command prompt, it doesnt work.
    The error is :
    'javac' is not recognised as an internal or external command,
    operable program or batch file
    Same goes for jar
    -java works for me. Why is that so? I hope anyone can give me solution.
    Note : I'm on windows vista
    Another question :
    I've been using JMF (Java Media Framework) to develop a simple audio player. However it can be run on my pc. What happens if I try to run the program at another pc, will it still work? The other pc will not have JMF installed, but will have JRE to run java apps. If it cannot be run on the other pc, is there any solution?
    Thank you for your kind assistance.
    Edited by: TrAnScEnD3nT on Sep 30, 2007 10:18 PM
    Reason : Sorry I have mixed up java and javac, I've corrected it.

    Mainta? That's my favourite!This time...
    In very general terms the PATH is a system variable that is maintained and used by your operating system or shell (not Java) to locate executable files. So, for instance, if you type the command:
    >writeit will be the PATH that Windows uses to locate the write.exe word processor.
    The directory containing the Java tools - java.exe, javaw.exe, jar.exe, appletviewer.exe etc - very commonly goes into the PATH variable.
    The classpath is a list of locations that Java uses to locate classes (as you said). It is used by Java and not your operating system. It is commonly (but not always) set each time you use one of the Java tools. There is a -cp switch that lets you do this. For instance a common command to compile a file would be
    >javac -cp . HelloWorld.javaThe "-cp ." bit means "the classpath shall be the current directory".
    Setting a particular classpath does not, in general, affect the "built in" classes of Java, so you don't have to worry about this. If you search the documentation that came with your distribution you will find the exact rules for "how classes are found": but to begin with the important thing is that any classes you write must be included in the classpath which can be specified as part of the commands to compile or run your code.

  • Calling javac in java code- possible?

    I'm writing a reasonably large app which can be run with X11 (using swing etc) or as a CLI app. This is basically because it will be useful in many different circumstances, for instance where there is no swing or X support, it'd be pointless building it with those capabilities. Now the easy way to do this, of course, (and I'm pretty lazy so I'll do it this way) is to write the base app, and then on one copy of it create a CLI, the other a GUI, and then give users the option of which to use. Also because of the size of it, I believe it'd be better for users to compile it themselves, so it is tailored perfectly (esp. where different J/SDKs are used.
    Now what I decided to do was just fire out some javacode to take command line options to compile- makes sense I thought, then I hit a problem... Is it possible to call javac in a java app? Can I have a line of code to call javac in the same way I could in a bash script? For reference, here is my code thus far- the lines that need replacing are the print lines saying which option is being used...
    class MakeII {
         private int choice;
                    public static void main(String[] args) {
                             if (args.length != 1) {
                  System.out.println("Bad choice/ no choice- please try again");
              } else { MakeII myComp = new MakeII(args[0]); }
         public MakeII (String choose) {
              System.out.println(choose);
              if (choose.equals("--make-x11") ) {choice = 1;}
                             else if (choose.equals("--make-sh") ) {choice = 2;}
                             else if (choose.equals("--make-full") ) {choice = 3;}
                             else {choice = 3;} //any error, assume full version
                             switch (choice) {
                  case 1: System.out.println("x only"); break;
                  case 2: System.out.println("cli only"); break;
                  case 3: System.out.println("full ver"); break;
    }And yes I know its ugly code, I just prefer to seperate everything out at this stage- I also know I've done everything the long way too, its for maintainability.

    jamesCondron wrote:
    Employer? Nah- this is a none-paid bit of project, more voluntry than anything, but I regret saying I would. Can't turn around now and say no... And I can't use anything but java because of how the project started, and the guys I'm working with; because Its server side stuff that needs to be distributed and portable I'd rather use python (or perl, but not quite that good) but ah well- what can you do?First off: challenge the requirement that it must be portable. More often than not, that's bogus. Beyond that, dude, you hold all the aces. They don't wanna pay but they still expect you to do it? That means they don't have a clue where to start. Baffle 'em with science, shouldn't be too hard. If it's lines of code they want, write them a bit of custom JSTL and show 'em how 2 lines of JSP can equate to 200 lines of Java, thus proving that lines-of-code is an utterly worthless metric. Then ask them if they want it done or not, and mumble a lot about going to the beach

  • 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

  • Javac command line program can use class, need tomcat to do same

    This may be simple, but any assistance to a newby would be greatly aprreciated. I have a this class file:
    import java.io.*;
    public class OCrypt
    static public String getEncryptedText (String plainText)
    Runtime R;
    String _encryptedText = "";
    char[] someData = new char[16];
    R = java.lang.Runtime.getRuntime();
    try
    java.lang.Process P = R.exec("./OCrypt " + plainText
    InputStreamReader ISR = new InputStreamReader(P.getInputStream());
    ISR.read(someData);
    _encryptedText = new String(someData,0,11);
    catch (Exception e)
    _encryptedText = "***ERROR***";
    return (_encryptedText);
    Where ./OCrypt is a compiled program writtine in C in the same folder. A small test program calls the class and C code and works. Now for the tomcat part, I need to be able to call this code from tomcat. I know it has worked in the past on a much older version of tomcat. I need to figure out how to make it work on tomcat 5.5.9
    Thanks

    Thanks for the reply. Please bare with me. I am reading in the SAMS teach yourself book to know how to create the folder structure. I assumed this folder should be off of my WEB-INF/classes folder. See the full path below.
    Couple of things
    1 - Your class should be in a package. Otherwise you
    will have problems.I added the .class file to a package. Or at least I think I did. I added this line to the top of the code.
    package OCrypt;
    The file is in this folder:
    /var/local/jakarta-tomcat-5.5.9/webapps/ROOT/pss/WEB-INF/classes/OCrypt
    Then I ran 'javac OCrypt' in that folder.
    2 -
    Where ./OCrypt is a compiled program writtine in C
    I always keep the C file in the same location as the class. That may be a problem later when tomcat can resolve the class but then can't find that program. I hope that will generate a completely different error.
    in the same folder.
    In the same folder as what?
    The current working directory for Tomcat is normally
    [TOMCAT]/bin. Is that the folder you mean? I will put it there if I get the class resolved.
    If you want to use this tool, I would say put it in
    the PATH for the machine (so it can be found from
    anywhere) or use an absolute reference to it.I can put a complete path in the .java file before I compile if you think that will help.
    You> can't count on the working directory being where you
    think it is. But right now I would just like to create a simple class like adding two numbers together and returning a result. My larger issue is more of a server configuration. I am using a enterprise wide tomcat server and have been told EACH application folder has it's own classpath. I even attempted to write a JSP that would output my enviroment to a simple page. This didn't work because the env was only for the user, not the env AFTER all the startup scripts run for the server.
    >
    One solution is to use ServletContext.getRealPath().
    Is there any reason you couldn't rewrite the
    encryption into Java - that way you wouldn't have to
    bother with Runtime.exec()
    Another alternative would be to use JNI to get a Java
    interface to the C class.
    http://www-128.ibm.com/developerworks/edu/j-dw-javajni
    -i.html
    I think either of those solutions are preferable to
    using Runtime.exec().

  • Why I can't use javac? and why my program doesn't pop up cmd window?

    I have 2 questions here:
    1) I try to compile my HelloWorld.java using command prompt,
    javac HelloWorld.java
    But it won't work; by right it should create a HelloWorld.class. When I go to Configure/Options/JDK Profile, it is already showing JDK version 1.6.0_07. My environment variables show User variables and System variables with C:\Program Files\Java\jdk1.6.0_07\bin. This is where my JDK is stored, but I don't know why I can't use javac. It keep saying
    'javac' is not recognized as an internal or external command, operable program or batch file
    2) Why is it when I run my java script using JCreator, the print out appear in the box below in JCreator and not in command prompt? How can I make it pop up on command prompt window?

    Things tend to move fasterYep... until something goes wrong... then you're completely stuffed, because you have no idea what's actually happening, because the idjit IDE is hiding all the gory details... it doesn't even tell you what it's doing, let alone how it's doing it, or what to do when it fails.
    Another argument for the command line is that it's simple. There are 16 distinct dialogues involved in adding a new jar to a library in jBuilder... There may well be less than 16 characters in the equivalent edition to the equivalent build command line. That's an extreme case, I admit, but it goes to disprove the notion that IDE's are simpler for noobs.
    Also, it's easier to get help on command line usage... because it's all text based you can just copy & paste the problematic command and it's output, and the eggspurts (tm) can do likewise with a response... and there are limited number of command lines out there... and *nix, windows, and mac cover maybe 99.5% of java users... and the eggspurts are likely to know all three (colectively if not as individuals) fairly well, because they deal with them all day every day.
    My belief is that noob's are better off at the command line until such time as they need (not just want to play with) a visual debugger... at which time its time to download netbeans and eclipse, and see which one suits you better... if you have money to splurge I'd also evaluate intelliJ... But avoid jBuilder, 2008 is total carp! The FREE eclipse is (IMHO) "nicer to use", and it has a LOT less bugs.
    Cheers. Keith.

  • How to compile java programs? There is no javac for me!

    Hi, I'm starting to learn java and downloaded the java 1.4.0.1 standard edition from this website. However, after I installed the program, there is no javac to be found while there is a java.exe. I need javac to compile my program before I can interpret it but it is nowhere to be found!
    Did I download the wrong SDK version? I thank anyone in advance who can help me in the right direction!

    You must have the SDK to create programs. The Jre is a component of the SDK that can be downloaded separately if you only want to run programs.
    SDK downloads from here, use the row "Windows (all languages, including English)" and be sure to select the SDK COLUMN, not the JRE:
    http://java.sun.com/j2se/1.4/download.html

  • Question about how javac finds referenced files.

    Hi
    I am just beginning to learn Java and have got some questions related to packages.
    I have two classes:
    MyClass.java
    package pkg;
    public class MyClass {
         public void prn(int x){
         System.out.println("Integer: "+x);
    Test.java
    import pkg.*;
    public class Test{
         public static void main(String[] args){
              MyClass obj=new MyClass();
              obj.prn(2);
    Directory structure
    /root/ jprog/MyClass.java
    /root/ jprog/Test.java
    Executing the following sequence of commands gives me:
    # ls
    MyClass.java Test.java
    # javac -d . MyClass.java
    # ls
    MyClass.java Test.java pkg/
    # cd pkg
    # ls
    MyClass.class -----compiles.
    # cd ..
    # javac Test.java
    Test.java:5: cannot access MyClass
    bad class file: ./MyClass.java
    file does not contain class MyClass
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    MyClass obj=new MyClass();
    ^
    1 error
    Now after reading another thread on this forum I came to know that the compiler finds the
    MyClass.java in the wrong package. Using verbose option with javac shows this.
    So I move it to some other directory and everything works.
    # mv MyClass.java /root
    # ls
    Test.java pkg/
    # javac Test.java
    # java Test
    Integer: 2
    Now the question begins:
    Suppose we go back to how the files were arranged before I moved the MyClass.java file and
    I change the Test.java file by adding
    package pkg2;
    statement to it.
    Now everything compiles
    # ls
    MyClass.java Test.java ---I have deleted pkg and .class files
    # cat Test.java
    package pkg2;
    import pkg.*;
    public class Test{
    public static void main(String[] args){
    MyClass obj=new MyClass();
    obj.prn(2);
    # cat MyClass.java
    package pkg;
    public class MyClass {
    public void prn(int x){
    System.out.println("Integer: "+x);
    # javac -d . MyClass.java
    # javac -d . Test.java
    # ls
    MyClass.java Test.java pkg/ pkg2/
    # java pkg2.Test
    Integer: 2
    Why isn't the MyClass.java file causing any problems now?
    Using the verbose option with javac shows that the compiler goes straight for the pkg/MyClass.class.
    My readings of Core Java Horstmann tell me that the compiler always looks in the current directory. javac documentation also doesn't help. I know that the documentation recommends that the source file locations should match the package statements.
    I'm just trying to learn how javac finds referenced files.
    Any help??
    Thanks a load in advance.

    I know that the
    documentation recommends that the source file
    locations should match the package statements.This is not merely a recommendation, it is a requirement.
    Both javac and java find classes by traversing the classpath. The classpath should contain directories (or jar files) that correspond to the top of a (part of the) package hierarchy.
    For example, if the Java code for your class is in a file C:\src\pkg\MyClass.java, and MyClass.java declares the class to be in package pkg, the classpath should contain C:\src. Classes are then found by transforming their package declaration into a directory structure.
    Please note that javac works on files, not classes. Therefore it is necessary to specify the full filenames of the files you want to compile, even if you have specified the classpath. By default, javac will put compiled class files in the same location as their sources, so the classpath for the java command should also contain C:\src.
    The exception to the rule is when all classes for the program are in the default package (i.e., they do NOT contain a package statement). In that case, it is possible for javac (and I believe java as well) to find all classes in the current directory, so it will "just work".
    You can specify the classpath using the -cp parameter to both javac and java.
    Hope this helps.

  • CLASSPATH and javac

    Hi all,
    I forgot a lot about Java, and need to relearn a few things. I had a JRE (5.0_06) already installed, and installed the JDK (1.5.0). It seems to me I do not need to use the "old" JRE. Comments? But first things first, I use XP Home SP 2.
    I am now doing a Wireless Development Tutorial where I had to install Tomcat. In the tutorial it says I need to set my classpath. It now points to the JRE (.;D:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where should I point it to if I want to use the JDK instead of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\ ?
    Next, I should be able to compile a simple program. But when I type javac, I get "'javac' is not recognized as an internal or external command". How come?
    I sat my JAVA_HOME in the System Properties (Advanced tab, Environmental Variables). I should think that would be enough to let the system find the javac program. The system does not agree with me, so who can enlighten me?
    Macamba

    Hi all,
    I forgot a lot about Java, and need to relearn a few
    things. I had a JRE (5.0_06) already installed, and
    installed the JDK (1.5.0). It seems to me I do not
    need to use the "old" JRE. Comments? But first things
    first, I use XP Home SP 2.
    I am now doing a Wireless Development Tutorial where
    I had to install Tomcat. In the tutorial it says I
    need to set my classpath. It now points to the JRE
    (.;D:\Program
    Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where
    should I point it to if I want to use the JDK instead
    of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\
    I, personally, do not set the CLASSPATH environment variable. I use the -cp option with the command line tools.
    Next, I should be able to compile a simple program.
    But when I type javac, I get "'javac' is not
    recognized as an internal or external command". How
    come?The is a PATH issue. In you system path, you need an entry that points to your <JDK INSTALL DIR>\bin folder.
    Also, with the JDK, the JRE is bundled under the <JDK Install Dir>\jre folder.
    I sat my JAVA_HOME in the System Properties (Advanced
    tab, Environmental Variables). I should think that
    would be enough to let the system find the javac
    program. The system does not agree with me, so who
    can enlighten me?Again, javac has to be on your system PATH.
    >
    MacambaThe JAVA_HOME environment variable should point to the <JDK INSTALL DIR>
    The CATALINE_HOME should point to the <Tomcat Install Dir>
    For Windows:
    Configuring the JDK
    Configuring Tomcat

Maybe you are looking for

  • Need suggestion on Active data guard or Logical Stand by

    Hi All, Need a suggestion of on below scenario. We have a production database ( oracle version 11g R2 ) and planning to have a Logical standby or physical standy (Active data guard). Our usage of the standby database is below. 1) Planning to run onli

  • Document Set and WF 2013

    I have two questions: 1. Can workflow be started on Document Set (using 2013 workflow - Visual Studio) ? 2. Can Document Set be declared as Record from 2013 workflow - Visual Studio? EDIT: 3. Can Document Set be declared as Record programmatically?

  • Using TortoiseSVN with Jdeveloper

    Hi, How to use TortoiseSVN with J developer 10g. I have installed Subversion1.3.2, TortoiseSVN 1.5.6,but couldn't find any tutorial online..........

  • ADF input LOV

    ADF input LOV by default validates the value entered by user against LOV. If value is invalid, it gives error to user. I want to configure it to not show any error because i want to allow user to enter any data whether it is in LOV or not. How i can

  • Contribute Menu area Not Resizable

    Hi I upgraded CS3 Web Premium to CS5.5 and Contribute 5 has a large area for the menu. Should just be two lines one for icons and one for File|Edit|View etc. But instead it takes up over 1/3 of my workspace. Is there anyway to fix this? I am unable t