Can't get javac to work???

I can't get the javac to work, and i set the path to c:\jsdk\bin%PATH% and then i try the java -version and it says it failed, then the javac says bad command, so it's not seeing it. what gives??

Hi Ricky,
try this, in your autoexec.bat file:
SET PATH=C:\JDK1.3.0_02\BIN
of course change JDK1.3.0_02 by the folder where you have the java SDK.
other paths should be separated with semicolon in the same statement
re init your machine
good luck
PD:are you writing java -version in the DOS promt?
are you writing javac yourfile.java in the folder where yourfile is? Be care,Case matters!

Similar Messages

  • 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.

  • Have entrourage and want to use Mail. Can't get it to work.

    I had a macbook and purchased the Microsoft office for Mac which included Entrourage.
    I have now purchased a new macbook Pro and want to begin to use Mail rather than Entrourage. 
    I have Entrourage on my new computer but i can't get it to transfer my information to the the Mail program
    I am on Charter.net at my office and sbcglobal.net at home.
    How can i get this to work.  I can receive on Mail, but i can't send.

    check your outgoing port settings and make sure it's using a specific port and not the default port, also you might want to check to see if it is using SSL, TLS or any other encryption.  Verify the setting from your old machine setup.

  • Got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    If it's showing the red disabled screen due to incorrect passcodes then you may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808 - you should then be able to reset the iPad via your computer's iTunes and restore/resync your content to it

  • HT1151 i have a new apple external dvd drive, and i can't get it to work with my iMac?

    I have a new apple dvd drive, I was told it will work with my imac,  but when i plug it in ...nothing... iv been for update... still nothing. How can i get it to work???

    If it is this drive, note that it is for MBA's and Mini's only:
    http://store.apple.com/us/product/MC684ZM/A
    Ciao.

  • Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Hi,
    Is there an iPhone involved ?
    If not, what happens  if you remove the Apple ID on the iPad and then set it in Airplane Mode (allow a couple of minutes at this point) followed by re-adding the Apple ID ?
    What, if any error messages are appearing on the Mac when you try to launch the App or Login to the iMessages server ?
    Is the Apple ID linked to an iCloud account ?
    In Messages 7 (Mountain Lion) this did not seem to be important but it seems it is in Mavericks/Messages 8
    9:14 pm      Friday; April 11, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • I bought an IR receiver and an Apple Remote, and I can't get it to work. What am I doing wrong?

    I bought an IR receiver and an Apple Remote, and I can't get it to work. What am I doing wrong? The receiver is a Lenovo eHome OVU430006/01 USB IR Receiver.

    Hello,
    You would need to pair the Apple Remote with the receiver. So I would use the generic Mac/PC receiver and follow these instructions:
    http://support.apple.com/kb/HT1619
    If that doesn't work then check in System Profiler to see if the IR receiver has been recognized by the PowerBook's hardware. You may require the install of drivers for this device to be recognized.
    Best of luck

  • I have a go daddy email account and I can't get it to work on my iPad

    I have a go daddy email account and I can't get it to work on my iPad

    Try turning the email account off and then turn it on again. Settings>Mail, Contacts, Calendars>select your gmail account>Off. Go to the mail app and then come back to the account in the settings and turn it on again.
    If you can't find any other way for the iPad to accept the password, delete the email account and then add it back onto the iPad.

  • I have a Mac Mini and I can't get it to work with my Ricoh Aficio MP 161.  Any ideas?

    I have a Mac Mini and I can't get it to work with my Ricoh Aficio MP 161.  Any ideas?

    The latest Apple driver support begins with the MP 171.
    Here is Ricoh's official driver download page specifically for the Afico MP 161. Note that new drivers for this device were released on Aug 2, and include Lion and Mountain Lion.
    Hopefully, this will solve your device issues.

  • My iPhone 5 went black. I tried pushing the on/off button and the circle button at the same time.  It worked once and then it happened again and I can't get it to work.

    Iphone 5 went black.  Tried pushing on/off and circle at the same time.  Worked yesterday and then did it again today.  Can't get it to work.

    You need to hold those button longer until you see the apple logo, then release, then wait for the phone to boot back up.

  • I just got a new computer with Windows 7 and all my songs were transferred to my new computer along with itunes.  But I can't get it to work.  I also tried downloading Quicktime and couldn't get it to download.

    I just bought a new computer and had files transferred along with itunes to the new computer.  I can't get it to work.  It doesn't recognize the extensions for itunes.  I also tried downloading Quicktime and couldn't get it to download.

    iOS: Device not recognized in iTunes for Windows
    I would start with:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • I bought a DataPilot to transfer my pictures from my phone to my macbook, and I can't get it to work

    I bought a DATAPILOT to transfer pictures to my macbook and can't get it to work.  Any suggestions please?

    Best if you try and explain what you are trying to acheive.
    Iphoto is a different paradigm than you're used to. I don't understand why you are trying to transfer your edited photos back to an external disk.
    There are tutorials here
    http://www.apple.com/findouthow/photos/
    Regards
    TD

  • I have signed up for adobe conversion to microsoft word and i can't get it to work - can you help me

    I have signed up for adobe conversion to microsoft word and I can not get it to work -  can you help me?

    Hi Mike,
    I've checked your account. I see that you just purchased the subscription this morning. The order is still pending processing, which is why you haven't yet been able to log in an use your subscription. It can take 24-48 hours for a subscription to process fully. Once it does, you'll be able to log in and convert files.
    I apologize for the inconvenience.
    Best,
    Sara

  • Trying to connect 2010 Mac mini to alba hd tv but can't get it to work, any theories?

    Trying to connect 2010 Mac mini to alba hd tv but can't get it to work, any theories?

    Welcome to the Apple Community.
    The iPad 1 is only able to do basic AirPlay, many providers of programming have blocked their apps from working with AirPlay.

  • I just bought Quick time Pro and I can't get it to install. It shows a yellow box in my application folder, but I can't get it to work. Help!

    I just bought Quick time Pro and I can't get it to install. It shows a yellow box in my application folder, but I can't get it to work. Help!

    you launch QT then go to its REGISTRATION

Maybe you are looking for