Easy question about 'javac'...

Yeah, at school, we're so used to using a program like CodeWarrior or NetBeans to do all our programming with. However, here at home, I'm trying to code simply in Notepad, and I'm having a little trouble.
Basically, I'm getting the NoClassDefFound error. The problem is, though, that I can't actually COMPILE the .java file I wrote in notepad - whenever I try to use the 'javac' command, it gives me an error saying it's not recognized as an external command, blah blah blah. So, there's no .class file.
Yeah, before this, I had downloaded the runtime environment, and it all went fine, but there still isn't any 'javac' command. :/

You know how states are always debating whether we (Americans)
should have the ten commandments carved in stone in front
of our courthouses? - or something like that...
Well i think someone needs to carve the god-d@mned classpath
instructions beside the heads at Mt Rushmore, lol.
Darkslime, dont feel bad everyone has this problem when they
start (at least the people that dont read the installation instructions).
This is what you do.
Install the SDK (not the JRE)
Take note of the installation folder.
Recent installations (1.5) seem to be in:
C:\Program Files\Java\jdk1.5.0_06\
Find the \bin folder. it contains the "javac.exe" and "java.exe".
these are the 2 exes responsible for compiling and running
java programs.
the final path should be:
C:\Program Files\Java\jdk1.5.0_06\bin
go to MY COMPUTER
right click
go to PROPs
ADVANCED tab
ENVIRONMENT VARIABLES button
Under SYSTEM VARs:
"CLASSPATH" - i keep this empty
"PATH" - add your installation path
(i.e.: C:\Program Files\Java\jdk1.5.0_06\bin )
make sure to add a semicolon " ; " to separate it from the last entry.
SAVE all of this.
when you compile "cd" into the directory your project is in.
try compiling. if it doesnt work try:
javac -cp . Program.java
and
java -cp . Program
NOTE: you can add other folders to the classpath by using a
semicolo ";" ....
java -cp .;Folder1;Folder2 Program
NOTE: the " . " means "this folder"
If this doesnt work read the BILLIONS of threads about this
subject all over these forums and the net.
Good Luck
oh - and for gods sake use TextPad and not NotePad.
TextPad has a "compile" button for Java.

Similar Messages

  • Easy question about Reformatting

    Hello all,
    I am trying to reformat my HD after I have deleted Windows XP off of a partition. The reason for this is an upgrade to Vista and a larger allotment of HD space. My question is:
    I am using Backup v3.1.1. (v369) and I have FULL backup files of my Home folder, and my Music folder (as backup for my backup) for all my iTunes libraries. These are located on a portable HD. Are these the correct files to have backed up in order to have my MAC the way it was before I started the process? If so, then once the reformatting is complete, how do I get it all back onto my MAC permanently? Will all my apps and tweaks work as before?
    I am sure this is a simple question, however, I have never had to do this with a MAC, and I want to make sure I have all bases covered before I begin this. Any other comments or advice would be greatly appreciated.
    Thanks All!

    You call this an easy question ???
    Just messin with ya
    Your home folder is the most important folder containing your music, documents, preferences etc. but a lot is also stored in the system folder and library folder outside your home folder, if you want to be ensured of an exact copy of your current system the best way to go at this is to clone your system partition.
    The app i use for this is carbonCopyCloner
    http://www.bombich.com/software/ccc.html
    To add to this.. i've heard there is software for the mac that allows you to make adjustments to the size of your partitions without having to format the drive, i don't know the names of these products but i do know that it's very risky to use them, if you decide to use an app like that make sure you have proper backups of everything just in case it goes wrong.
    Message was edited by: Pr0digy V.

  • Easy Question about resizing video

    I searched 'Resizing Video' and there was too many unrelated results to a really simple question.
    In my old program "Premiere', to resize and move a video around was very easy. You could adjust the scale and X-Y values numerically, or you could use a Free Transform like in Photoshop. Simply dragging bounding boxes for size and aspect and also dragging the clip to decide it's location.
    The only way I know how to do this in FCP is I double click a clip in the sequence, it loads into the viewer, I go to the Motion Tab and then I can adjust the Scale, which is cool. But then I'm left with the Distort section to adjust position (and aspect if need be). In the Distort section there are 8 numeric fields of info to figure out and fill out just to get one clip in a different position correctly.
    I'm thinking there must be another way to adjust the location (or aspect) of a video clip without spending a bit of time on exact coordinates, I want to eye-ball where I want the clip to go and simply move it there. Is the Distort feature the only way to do this? If not, which is the fastest way to move and change the dimension of a clip.
    Thanks for reading, I hope there is another way, I'm not use to these calculations and they're slowing me down.
    Monty

    I searched 'Resizing Video' and there was too many unrelated results to a really simple question.
    That's because it's not a simple question at all and yet every one of those threads was related to the OP's question. As you discovered, there are lots of ways to interpret "resize," during capture, editing, effects, output, viewing, encoding, printing. But the solution was even simpler than you thought. All you had to do was open the manual or the online help system. Start taking the manuals to the gym with you. FCP is not Premiere. You're going to hate FCP, you're going to love FCP but it will never behave like Premiere beyond the elements of the functional paradigm. Forget Premiere.
    bogiesan

  • Quick (hopefully easy) question about rotating video...

    I'm going to be shooting some video soon that I will later be editing with FCP. I'm going to shoot the video on a Canon Vixia HF10 (AVCHD) camcorder.
    In the situation I'll be shooting, with the mount I'll be using, it would be much easier for me to shoot this video with the camera fully upside-down.
    If I shoot the video fully upside down, can I easily rotate it 180 degrees in FCP with no loss of quality?
    Thanks!

    An interesting thing about video that is shot upside down is the ballistics of the camera movement can be weirdly disconcerting. For instance, if it's a helmet- or wing-style mount, pans and tilts just feel odd.
    As Eric suggests, flipping the image 180 degrees is easy but practice and evaluate.
    bogiesan

  • Quick Easy Question About N580GTX-M2D15D5 Bios

    Hey guys!!
    I just have a real quick and easy (i suppose) question!
    I had bios version KH0, and MSI live update found KH1, i downloaded and flashed successfully (DOS window said please restart and press any key to exit) so i did, restarted my computer, and MSI live update utlity and gpu-z and MSI afterburner are all reporting the same bios version i had with the KH0, version 70.10.17.00.01 & date November 09, 2010
    MSI live update is not picking up the update again, so my question is, how do i know if it flashed correctly since the bios date and version remained the same?
    Thanks !

    Quote
    I had bios version KH0, and MSI live update found KH1, i downloaded and flashed successfully (DOS window said please restart and press any key to exit) so i did, restarted my computer, and MSI live update utlity and gpu-z and MSI afterburner are all reporting the same bios version i had with the KH0, version 70.10.17.00.01 & date November 09, 2010
    Quote
    version 70.10.17.00.01
    that's suppose to be, this is the version of the both bioses
    Quote
    & date November 09, 2010
    this is GPU release date, not BIOS date
    Quote
    MSI live update is not picking up the update again, so my question is, how do i know if it flashed correctly
    Get this: https://forum-en.msi.com/index.php?action=dlattach;topic=147603.0;attach=7931
    extract it somewhere, then run info1 , and look for the last line
    Quote
    since the bios date and version remained the same?
    they are not the same, your looking the wrong stuffs

  • Really easy question about DVDs

    I am about to get a new 5g iPod, and I am excited about being able to watch videos on it. But I have a quick question, is it possible to rip DVDs(like you can with CDs) from iTunes?
    Thanks

    This article addresses your question:
    http://docs.info.apple.com/article.html?artnum=302758

  • Easy question about JScrollPane issue

    The problem is I do not understand why it is not possible, or what I am doing wrong to not be able to initialize a JScrollPane with a variable and call it later, real easy to see in the code below.
    NOTE! I CAN use scrollbars, but only without initializing first, am just trying to understand how to properly do this with initialization or if it is not possible.
    Thank you!!!!
    just look for the First 3 commented sections with stars ******
    import java.awt.Container;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class SquareIntegers extends JApplet {
         // set up GUI and calculate squares of integers from 1 to 10
         public void init() ///all variables below are LOCAL, because used only in "init()" if needed elsewhere make above in the CLASS
                             //OR SAVE VALUES between calls to the class's methods
                // get applet's content pane (GUI component display area)
              Container container = getContentPane();
              container.setLayout(new FlowLayout());
              //creaing a layout because I wanted to add a scroll pane
              //container.setLayout(new BorderLayout());
              // JTextArea to display results
              JTextArea outputArea = new JTextArea(8, 8);
              // JScrollPane myscrollbar = new JScrollPane( outputArea ); //********************this is line 27 why does this along with line 33 NOT work????????
              // attach outputArea to container
              container.add( outputArea);
              //container.add( myscrollbar); ******************************this is Line 33 why does this along with line 277 NOT work????????
              container.add(new JScrollPane( outputArea ));//***********this is Line 34, if I comment out 27/33, and just use this, scrollbars
                                                                     // work correctly, but I have heard/seems better to "initialize variables first"
              int result; // store result of call to method square
              String output = ""; // String containing results
              // loop 10 times
                   for ( int counter = 1; counter <= 10; counter++ ) {
                   // calculate square of counter and store in result
                   result = square( counter );           //***********************uses the CUSTOM method from line 44
                   // append result to String output
                   output += "The square of " + counter +
                   " is " + result + "\n";
                   } // end for structure
         outputArea.setText( output ); // place results in JTextArea
    } // end method init
         // square method definition...***** This is a CUSTOM method creation..... if "Math.sqrt" was used, we would not have to do this
         public int square( int y )
         return y * y;      // return square of y this is RETURNED to the statement in "init()" that originally invoked the
                             // "square()" method - in this case line 32, where RESULT invoked the METHOD, so "result" gets the value of RETURN
                             // if it were "public int square()" that means the method does NOT return a value
    The general format of a method definition is
    return-value-type method-name( parameter-list )
    declarations and statements
    including "return;" or "return EXPRESSION;"
         } // end method square ALL METHODS must always be created inside the CLASS definition, as this one is... notice the closing
              // CLASS bracket below
    } // end class SquareIntegers

    Thank you!!!
    I think I understand...... since the JScrollPane already assigned itself to the JTextArea....
    when "adding" to the parent container, the only necessary component to call was in fact the JScrollPane with the container.add( myscrollbar); I do not know if this is correct, but I thank you for your help, because this definitely confused me, back to studying :)
    I have it 100% operational, just posting this to say thank you that it worked, and it will help further my and possibly others understanding of this.

  • Easy question about install time

    Hello,
    I have been having a lot of problems with my MacBook and after posting on the forums it seems a re-install might help. This is my firt time doing a wipe/install so I backed up my files and booted from my Tiger install DVD and did a wipe/install and I am staring at in installing right now. It seems to be taking forever! It has been going for about 2 hours now and is about 1/3 of the way finished and says it has 3 hours 43 minutes to go. Is it supposed to take this long?

    Hi,
    I haven't installed Tiger on an Intel Mac but have installed Jaguar, Panther and Tiger a number of times on PPC Macs. It never took more than 30 minutes to complete.
    I would suggest you let the installation run its course and then see how the computer is working.
    It might be that your HD needed repairing... did you check it with disk utility before starting the installation ?
    One more thing... after the first boot (where you set up accounts,etc) you should boot from the install DVD check the disk with disk utility and repair if necessary.
    S

  • Easy Question about end jumps

    Here is my menu lay out. Three buttons.
    Play all (Want it to play enire movie)
    Play part one ( Play up to track 6 and return to menu)
    Play part two (Play from track 7 to end)
    Can someone please tell me how to do this correctly? What am I doing Wrong

    Hi Deon - it's hard to say what you are doing wrong if you don't tell us what you are doing!
    What I would do to set this up is place all the footage into a single track, set markers between each section and use stories to define which chapters play when each button is pressed. Your 'play all' button would point to the track itself. Your 'Play part 1' button would point to a story container, inside which I would place chapters 1 to 6. Finally, the remaining chapters would be in a second story and this would be the button target for 'Play part 2'.
    You do not need to have the assets in separate tracks at all - if you want to play a single clip it can be in a single story with just one chapter marker in - each story can have an end jump setting to return back to the menu...
    Hopefully this will help get you on the way, but if not please give as much info about what you have already done so we can start to troubleshoot it with you.

  • Easy Question about PreparedStatement

    Hi Everyone,
    I have a prepared statement. like this
    "INSERT INTO Accounts VALUES(" +
    "SeqAccountId.nextval" + ",?,?,?,?,?,?,?,?)";
    dbStatement = dbCon.prepareStatement(sqlStatement);
    dbStatement.clearParameters();
    dbStatement.setInt(1,paymentMethodId);
    dbStatement.setString(2,accountName);
    dbStatement.setInt(3,accountTypeId);
    dbStatement.setTimestamp(4,createDate);
    dbStatement.setTimestamp(5,expirationDate);
    dbStatement.setString(6,status);
    dbStatement.setInt(7,Modifiedby);
    dbStatement.setString(8,notes);
    If I were not to set the value for one of the question marks would it give me error or would it just insert a null value ?? ???
    Thanks
    Stephen

    Stephen,
    This will result in an SQL error of "not all variables bound" type.
    Regards,
    Neill Horton

  • Hopefully an easy question about arrays

    hi there
    is there any way of creating an array of objects that is of unspecified size at the time of creating and then add objects as and when they are read from a file?
    longer explanation:
    i am creating molecule visualization software. the molecule's structure is stored in a text file, ie each line has info on one atom ie 3d coords etc. i'm storing the molecule structure in an object (Molecule.java) which has an array (Structure[]) of atoms (Atom.java). obviously molecules can have any number of atoms in it and you don't know how many until you've gone through the whole file and counted. The only way i can think of doing it is to go through the whole file, coun the atoms, close the file, create the Molecule object with the structure array size of NoOfAtoms and then open the file again and add the atoms as i go through them again. however, i refuse to believe this is the most efficient way of doing it as i have to go throguh the same file twice which brings me back to my original question.
    as i said i'm hopeing there is a simple answer
    cheers

    Use a Collection . Use a Vector, ArrayList or even a Hashtable. You do not need to define the size of these objects and can add and remove Objects from them whenever you want

  • Question about javac -source -target

    Hello:
    I am using JDK 1.8.0-ea and I want to compile my sources for 1.7 (compatibility with previous VM: 1.7 is the latest official release)
    C:\Users\admin>javac -target 1.7 prg.java
    javac: target release 1.7 conflicts with default source release 1.8
    C:\Users\admin>javac -source 1.8 -target 1.7 prg.java
    javac: source release 1.8 requires target release 1.8
    Is there some way I could compile for previous VM or will 1.8 classes NOT be compatible  with previous VMs?

    Thanks: Actually the code was compiled for JDK7, (it can be compiled even with jdk6).
    Huh? I read your post to mean that you can NOT compile it for JDK7 using JDK8. But my point was that if you use JDK8-specific features then the code isn't backward compatible.
    The main problem is that when JRE 8 is available for public,  many systems will still have older JREs, thus JDK8 bytecode would not run in them.
    Although I can compile it with JDK7 tools, I thought that JDK8 could compile for backwards compatibility, if new features were not used in code.
    Normally new versions support some limited number of previous versions using the -target and -source parameters.
    You may have found a bug - you can report it using the 'Report Bugs' link on the JDK8 download page.
    https://jdk8.java.net/download.html

  • An easy question about Solaris

    Hi All,
    I'm new in Solaris. Last week I found a rediculous problem in my system.
    I created a new directory named "test" under "/", and changed to the empty directory by "cd /test". Then I type "touch *" and get a new file named "*"!!! After that, I create two other new files. When I wanted to delete the * file I typed "rm *". You can guess what happened. All files in the current directory was ereased! Maybe I'm wrong, but I think the OS should prevent user creating any file named "*".
    Will anyone kindly give me an advice about that? My email address is [email protected] Thanks a lot!!!

    Hi
    If you do a
    $touch *
    then you should not get a file named "*" , rather
    the command should say "No match" , as there are
    no files in the directory. If there are files in
    the directory, it should touch all the files.
    On the contrary if you do a touch "*" , that is you
    want to create a file named "*" , then you are held
    responsible for that, and you should remove it by
    using something like
    $ rm "*"
    Let me know if this helps you.
    Thanks,
    Manish
    SUN-DTS

  • Very easy question about variables

    Can I convert float-variable to String-variable?

    Hi, a very easy way to convert almost anything is
    called "typecasting". It might sound difficult, but
    it isn't.
    You use it like this example
    > String outcome;
    Double input;
    input = 3.54789654587;
    Output = ""+input;
    That's not casting. It's implicit formatting.
    What it does is making an empty string and pasting
    your number behind it. VERY easy! You can do this
    with allmost every type of variables.What it's doing is creating a StringBuffer, appending an empty string to it, then appending the result of calling toString on the Double, which is itself a String. (Though things change a bit in jdk1.5.) It works because StringBuffer.append has versions for each primitive type, and toString exists for all Objects.
    One problem is that it's not efficient -- you're doing a lot of work behind the scenes to do something that can be done much more simply. But the bigger problem is that it's using operators in a roundabout way and with implicit results. So it's sort of a hack. "+" is the append operator for Strings (well it actually comes down to an implicit method call, or several). Putting the double on the right side of that also causes an implicit format. So you're implicitly formatting a value, and then appending it to nothing, to get a result. You're not actually meaning to append, you're meaning to format, but you're using an append operator.
    The more straightforward way to do it is simply to explicitly format it, using the methods already shown on this thread, or using java.text.DecimalFormat.

  • A quick and easy question about my NEW Ipod Touch.

    Okay, I broke down and replaced my old ipod. This new one came with earphones, a cord to connect it to my computer and a little plastic piece that obviously fits on one end of the ipod. Here's my question: WHAT IS IT FOR?
    Thanks in advance!
    Annie

    It's a dock adaptor. There are some devices (eg. speaker systems) which have a slot that fits the 30-pin dock connector for iPods, but the slot is the same size as the iPod Classic, as it is the largest iPod that is compatible with such systems. The dock adaptor that came with your iPod is supposed to fit around the base of your iPod and prevent it from being bent forwards or backwards, as this can damage or even break the dock connector.

Maybe you are looking for

  • Lost ability to select multiple images easily in Organizer

    I have always been able to select a range of photos by clicking on the first and then Shift-clicking on the last photo in the range.  Everything in MS Windows and almost all Windows apps work this way. Suddenly, I can no longer even select an image b

  • Question re Acrobat 9 Pro Extended and distributing fillable PDFs

    I am using Acrobat 9 Pro and created a fillable PDF (with a great deal of help from George Johnson!!). I now find out that because of licensing constrictions I can only send and receive 500 fillable PDFs (or maybe it's a total of 500 sent and receive

  • Facebook (website) block while studying

    Hi, I'm studying for a degree and have discovered over last few assignments there's a lot of chatter on facebook about the answers and rumours etc. I don't want to reject these friends or close my account but I was wondering if there was a way I coul

  • Wireless USB Hub?

    Does anyone know if there are any wireless USB hubs available that are supported by Mac OS X? Even working with VMware Fusion would be helpful. I have one of the IOGEAR units but my iMac crashes when I plug the adapter into a USB port. Thanks, Keith

  • Change Delivery Note Status

    Hi, I have one problem that o need help. I need to change the status of the delivery note, field VBUK-FKSTK. i searched for some exits for the tive when the user push the button to register the goods exit but i did not find it. Can anyone help in thi