Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    I don't know if this will help at all...but sometime ago...I installed a printer driver for HP LaserJet 1010 on one of my PCs....and some how, it interfered with Sun JDK installation on that machine.

    I think the driver used a custom implementation of TomCat server, which caused the problems.

    It took me ages to figure out what went wrong...and ended up re-installing JDK and everything worked fine thereafter.

    I would try and re-install Sun JDK...in case you've installed a software application that implements its own JVM which might be causing all the problems.

  2. #17
    Regular Coder brad211987's Avatar
    Join Date
    Sep 2005
    Location
    Ohio
    Posts
    631
    Thanks
    10
    Thanked 50 Times in 50 Posts
    Thats what I was thinking with the versions....Many programs install their own JDK, but I don't see any in the path variable. Usually they put themselves in your windows path, which really throws things off.(Pointing at you Sybase!)

  3. Users who have thanked brad211987 for this post:

    sorbetti (09-06-2008)

  4. #18
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Here we go again. I reinstalled both JRE and JDK into folder C:\Java and changed the path to point the new installation, and still not working. This is indeed a very strange case. I have a feeling it has something to with Vista, but can not be sure. Test results below, everything looks like normal.


    C:\Java\jdk1.6.0_07\bin>javac
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are used
    -classpath <path> Specify where to find user class files and annotation processors
    -cp <path> Specify where to find user class files and annotation processors
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -proc:{none,only} Control whether annotation processing and/or compilation is done.
    -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
    -processorpath <path> Specify where to find annotation processors
    -d <directory> Specify where to place generated class files
    -s <directory> Specify where to place generated source files
    -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -Akey[=value] Options to pass to annotation processors
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system


    C:\>java -version
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)


    C:\>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\Sami\AppData\Roaming
    CLASS_PATH=.;
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=SAMI-PC
    ComSpec=C:\Windows\system32\cmd.exe
    configsetroot=C:\Windows\ConfigSetRoot
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\Sami
    LOCALAPPDATA=C:\Users\Sami\AppData\Local
    LOGONSERVER=\\SAMI-PC
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Java\jdk1.6.0_07\bin; C:\Program Files\Microsoft SQL Server\90\Tools
    \binn\; C:\Program Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32; C:\Program Files\SSH Communications Security\SS
    H Tectia\SSH Tectia AUX; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX\Support binaries; C:\Program Files\SSH
    Communications Security\SSH Tectia\SSH Tectia Broker; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Client; C:\Pro
    gram Files\jprofiler5\bin\windows;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0f0a
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    PUBLIC=C:\Users\Public
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\Sami\AppData\Local\Temp
    TMP=C:\Users\Sami\AppData\Local\Temp
    USERDOMAIN=Sami-PC
    USERNAME=Sami
    USERPROFILE=C:\Users\Sami
    VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
    windir=C:\Windows

  5. #19
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Oh, I just noticed the second page of this thread Maybe it indeed is some other program that is messing the Java installation, but that will definitely take ages to find it out as I have dozens of programs installed. Maybe I just have to stick with IDE's until that. But if you get an idea what might be the problem or if you notice something wrong with my settings, please let me know...

  6. #20
    Regular Coder brad211987's Avatar
    Join Date
    Sep 2005
    Location
    Ohio
    Posts
    631
    Thanks
    10
    Thanked 50 Times in 50 Posts
    It looks like its working fine now....

    The javac command gave you the usage instructions just as it should.

  7. #21
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    This is what is in my PATH now in Vista Ultimate. It seems work just fine.
    Code:
    &#37;SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_07\bin;
    You may have PATHs in yours.

    For future reference this tells you what you need to do. Its the same concept on Vista: http://java.sun.com/javase/6/webnote...ml#Environment

    Also as stated your installation appears to be working fine. Now you just need to use
    Code:
    javac yourfilename.java
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  8. Users who have thanked _Aerospace_Eng_ for this post:

    sorbetti (09-06-2008)

  9. #22
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by brad211987 View Post
    It looks like its working fine now....

    The javac command gave you the usage instructions just as it should.
    Not really! It works as it should only in Java installation directory. When I try to use javac in ANY other directory, I get an error message "javac is not recognized as an internal or external command etc". So the original problem still exists. It was just a test suggested by ess in the previous message to find out whether or not javac works at all...

  10. #23
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    Not sure if this is going to help you at all...but when I went through the beta testing of Windows Vista before it was released, I experienced the same problems that you've described above...where my JDK installation didn't work even when the path variable was set correctly.

    Not that I am implying that you don't have a legitimate copy...but wondered if you need to update Vista and apply all the latest patches such as Windows Vista SP1 etc.

    Furthermore, you need to ensure that you download and install the correct JDK for your system. In other words, if your system is x64 based, you should download and install the JDK x64 release and not the i586 release.
    Last edited by ess; 09-05-2008 at 06:49 PM.

  11. Users who have thanked ess for this post:

    sorbetti (09-06-2008)

  12. #24
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I am using Vista Ultimate SP1 and javac works in any directory I am in. Attached is a screenshot.

    ||||If you are getting paid to do a job, don't ask for help on it!||||

  13. #25
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I have a 32-bit system and the correct JDK is installed. I also have SP1 and all the latest updates installed, as I have Vista's autoupdate on. Like I mentioned earlier, in my XP machine everything works just fine, like in the previous message's screenshot. Like also mentioned before, this seems to be a very strange case, and only explanation I can figure out, is that some other program is messing up the JDK installation, since all the basic settings seems to be in order.

  14. #26
    New to the CF scene
    Join Date
    Sep 2008
    Location
    Fort Lauderdale, FL
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Followed Advice, but Still Not Working

    I have followed the above advice, but I can not get past

    javac Hello.java

    Code:
    C:\Users\moporho>javac Hello.java
    javac: file not found: Hello.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    
    C:\Users\moporho>java Hello.java
    Exception in thread "main" java.lang.NoClassDefFoundError: Hello/java
    Caused by: java.lang.ClassNotFoundException: Hello.java
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)


    Here is set

    Code:
    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
    
    C:\Users\moporho>java -version
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
    
    c:\>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\moporho\AppData\Roaming
    CLASSPATH=.;
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=MOPORHO-PC
    ComSpec=C:\Windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\moporho
    JAVA_HOME=C:\jdk1.6.0_07\bin;
    LOCALAPPDATA=C:\Users\moporho\AppData\Local
    LOGONSERVER=\\MOPORHO-PC
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Win
    dows;C:\Windows\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\ATI T
    echnologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Roxio Shared\DLLSh
    ared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program File
    s\QuickTime\QTSystem\;C:\jdk1.6.0_07\bin;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0f0b
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    PUBLIC=C:\Users\Public
    QTJAVA=C:\Program Files\Java\jre1.6.0\lib\ext\QTJava.zip
    RoxioCentral=C:\Program Files\Common Files\Roxio Shared\10.0\Roxio Central36\
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\moporho\AppData\Local\Temp
    TMP=C:\Users\moporho\AppData\Local\Temp
    USERDOMAIN=moporho-PC
    USERNAME=moporho
    USERPROFILE=C:\Users\moporho
    VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
    windir=C:\Windows
    Can someone please help as I am going crazy??

    Cheers,
    MoPoRho

  15. #27
    New to the CF scene
    Join Date
    Sep 2008
    Location
    Fort Lauderdale, FL
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried it over again and IT WORKED!!!! Thanks Ess!

  16. #28
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Just to say thanks. Had a simulator ok on XP that failed on Vista.
    OK now


    Quote Originally Posted by ess View Post
    Please follow these steps...

    1- Right Click on My Computer on your desktop and click on Properties
    2- Computer Properties Window will open....Click on Advanced System Settings
    3- Click ok when the stupid administrator window appears (Personally I have disabled them...as I find them annoying and pointless)
    4- Click on Environment Variables
    5- Under the Systems Variables, click the NEW button to create a new Variable
    6- Enter the following inside the dialog
    Variable Name: JAVA_HOME
    Variable Value: FOLDER_CONTAINING_JAVA_INSTALLATION for example C:\Program Files\Java\jdk1.6.0_02
    7- Inside the Systems Variables, locate the Path entry. Select it...then click on the edit button
    8- At the end of the PATH, enter a semi column if there is NOT one there already
    9- At the end of the PATH variable, enter %JAVA_HOME%\bin;

    Click on Apply and ok buttons to close all opened dialogs

    Start a new (if you have one opened already...it won't work) prompt or MS Dos command prompt and type the following

    Code:
    java -version
    You should see details of the installed version of Java etc. once you hit the RETURN key

    Within the command prompt, type the following

    Code:
    notepad Hello.java
    Paste the following inside it

    Code:
    public class Hello { 
       public static void main(String [] args) { 
          System.out.println("Hello World ;)");
       }
    }
    save the file and exit notepad

    at the command prompt type the following

    Code:
    javac Hello.java
    If no errors are generated, type the following

    Code:
    java Hello
    Cheers
    ~E

  17. #29
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    To prevent Necro-posting I am locking this thread, however it will be added to the Sticky as threads that are interesting / frequently asked.
    "To iterate is human, to recurse divine." -L. Peter Deutsch


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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