Results 1 to 11 of 11

Thread: java error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    java error

    Code:
    cd C:\Documents and Settings\admin\My Documents\ImageManipulation\
    javac  ImageManipulation.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    
    Compilation exited abnormally with code 1 at Thu Feb 09 21:39:38
    what does that mean guys,
    does it mean its installed wrong?

    and another thing.. when i richt click on java files off the web (where you 'save target as') the files keep saving as HTML files, and not JAVA files, so when i open the files in the editor (I use xemacs editor) it shows the whole webpage html stuff in it too

    please help guys, im not sure whats wrong

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: java error

    Have you added the path of the java bin directory to the path enviromental variable of your system? That will make the commands like java, javac recognisable no matter what path you're in the command prompt.


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: java error

    For The first problem:
    Check that you have JDK installed on your computer and that "CLASS_PATH" in System Environment Variabels is set correctly to the Java JDK Bin Directory

    For the second problem:
    This is caused by your browser, check for updates
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: java error

    yep I did all that.. here is what it told me to do in the cd instruction..

    Code:
    Installing j2sdk (JAVA).
    NOTE: Installing Java is a pre-requiste for installing other applications and should be done first.
    
    1. Double click on j2sdk-1_5_0_05-windows-i586.exe 
    2. Accept the term and conditions, click next. 
    3. Click "Next>" several times. 
    4. On your desktop there is an icon called "MyComputer", right click on it. 
    Select "Properties". 
    Then the "Advanced" tab. 
    Select "Environment Variables". 
    Under "System Variables" select "Path". 
    Now click on "Edit". 
    Under "Variable Value" add to the end of the text ;C:\j2sdk1.4.2_05\bin 
    **Note the semi-colon is important, make sure the path is correct to the java installation bin directory if you changed the installation directory.**
    5. Now click on "OK" several times and then reboot the machine. 
    6. Next double click on java3d-1_3_1-windows-i586-directx-sdk.exe to install Java 3D and click on next several times to install.
    The new path now looks like this..

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2_05\bin

    i did all the reeboting and stuff, and still no luck..

    One thing i did notice though is that the java stuff is in Program Files in the C:\

    and its telling me to add in ;C:\j2sdk1.4.2_05\bin to the end of the path

  5. #5
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: java error

    Quote Originally Posted by Pouncer
    yep I did all that.. here is what it told me to do in the cd instruction..

    Code:
    Installing j2sdk (JAVA).
    NOTE: Installing Java is a pre-requiste for installing other applications and should be done first.
    
    1. Double click on j2sdk-1_5_0_05-windows-i586.exe 
    2. Accept the term and conditions, click next. 
    3. Click "Next>" several times. 
    4. On your desktop there is an icon called "MyComputer", right click on it. 
    Select "Properties". 
    Then the "Advanced" tab. 
    Select "Environment Variables". 
    Under "System Variables" select "Path". 
    Now click on "Edit". 
    Under "Variable Value" add to the end of the text ;C:\j2sdk1.4.2_05\bin 
    **Note the semi-colon is important, make sure the path is correct to the java installation bin directory if you changed the installation directory.**
    5. Now click on "OK" several times and then reboot the machine. 
    6. Next double click on java3d-1_3_1-windows-i586-directx-sdk.exe to install Java 3D and click on next several times to install.
    The new path now looks like this..

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2_05\bin

    i did all the reeboting and stuff, and still no luck..

    One thing i did notice though is that the java stuff is in Program Files in the C:\

    and its telling me to add in ;C:\j2sdk1.4.2_05\bin to the end of the path
    Then correct it by Adding the "\program files\" after "C:"
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: java error

    ok thanks, changed it to this..

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.5.0_05\bin

    still no luck

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: java error

    actually never mind, i tested a small program and it worked..

    Code:
    import javax.swing.*;
    import java.awt.*;
    
    public final class SimpleGui extends JFrame {
    
        private JLabel helloL;
        
        public SimpleGui() {
    	setTitle("Simple Gui Example");
    	setSize(1200,800);
    	setDefaultCloseOperation(EXIT_ON_CLOSE);
    
    	Container cp = getContentPane();
    	cp.setLayout(null);
    
    	helloL  = new JLabel("Hello");
    	helloL.setBounds(200,0,400,400);
    	cp.add(helloL);
    
        } // IFrame constructor
    
        public static void main(String[] args) {
    	SimpleGui i= new SimpleGui();
    	i.setVisible(true);
        }
    
    } // IFrame
    compiled and i ran it successfully. thanks guys.

    now for problem2, ComputerJY, do you know where i check for browser updates from mate?

  8. #8
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: java error

    What is your browser?
    Last edited by ComputerJy; Feb 9th, 2006 at 05:23 PM.
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: java error

    microsoft internet explorer 6.0

  10. #10
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: java error

    I hate saying IE doesn't cause this problem
    but the problem isn't in "IE"
    it's probably in the website you are downloading the java files
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: java error

    yeah you're right, it is the website lol, sorry.

    thanks for your help guys, brilliant and swift help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width