HELP - 'Can't find class' error

I have just bought a new computer with Windows XP and downloaded and installed the new versions of the jdk, jre, etc.
I have written the Hello World program to check that everything works. It compiles fine, but when I try to run I get an error - Can't find class helloworld - and then it exits.
I know that the path variable is set correctly and I used to have to set the classpath as well, but have been told that this is not necessary.
I really need to get this working as have some important programming to do.
Thanks for any help,
Olly

Try this;-
prompt>set CLASSPATH=
.......> return key
prompt>java helloWorld
Hello World!
prompt>
AMAZING!
This works fine. Thanx.
Is there any way to set it so that I dont have to do
the set classpath stuff each time I run a program
though?
CheersWell, set a system variable
CLASSPATH=.;<java_home>\jre\lib\rt.jar
regardws, Thomas

Similar Messages

  • "can't find class" error

    i have win xp as my OS and jdk1.1.8 installed. I have my class path set correctly. I have changed the environment variable to c:\jdk1.1.8\bin
    When I compile my java programs using javac at the command prompt, the program compiles successfully and the class file is made but when I run it I get the erro "can't find class filename"
    I there some other way to set the class path in XP .
    I don't understand where I am going wrong.
    Please help...

    to run a java file you would type c:\jdk1.1.8\bin\java ClassName
    leave it at that, i think the error your getting is caused when you type the .class extention ie. c:\jdk1.1.8\bin\java ClassName.class

  • Can't find class error on Tru64 UNIX

    I have written a class, TextProcessor, and I can compile and run it without any problems on my Win2K box. I ftp the source to works Tru64 box and compile the class just fine. When I issue the command "java TextProcessor" I get the msg "Can't find class TextProcessor". I immediately thought I had a classpath issue. I messed around with setting my classpath but without luck.
    I then wrote a new class on the Unix box using vi called Hello.java. I compile the Hello class without a problem. I issue the command "java Hello" and get "Hello!", just like I am supposed to get.
    The 2 classes reside in the same directory, TextProcessor does not have any package statements. I am totaly confused.
    Environment information:
    Tru64 UNIX version 5 or so.
    JDK 1.1.8 (not my choice and I have no control over the JDK)
    JRE 1.2.2 is also installed.
    Please help!
    Thanks

    Maybe.....
    Make sure that you have the permissions necesary to read,write and execute the file from your own account.
    If you canno't find any class maybe is because you cannot read.
    What account are you used to pute the file from Win?
    you can try this...
    chmod 777 TextProcessor.java
    chmod 777 TextProcessor.class
    But......????? uhmmmmmm??
    I'm not sure, because If you can compile then you can read the file, but it's depends you umask ......
    it's only a suggest

  • Re: School Project Help, can't find symbol error.

    double tentaBill = iWhat's i?

    It's in computeTentativBil method, i'm trying to return a value to main and "i" and set it to tentaBill, then pass tentabill to the next method.
      public static double computeTentativeBill(Order theOrder)
             double totalExtreme;
             double totalModerate;
             double totalMinor;
             double i;
             double extremeCost = 999.99;
             double moderateCost = 499.99;
             double minorCost = 99.99;
             totalExtreme = (theOrder.extreme * extremeCost);
             totalModerate = (theOrder.moderate * moderateCost);
             totalMinor = (theOrder.minor * minorCost);
             i = ((totalExtreme + totalModerate) + totalMinor);
                          // Welcome User To Program
             System.out.println("Your Tentative Bill before Taxes is " +i);     
             return (i);           
         

  • Can't find class when executing javabean test

    Hi,
    I've installed Sunone 6.0
    JSP is installed
    JDK is installed
    I've written and compiled a simple javabeans program
    and it generates class correctly.
    When I try to execute I get "Can't find class" error.
    Where does the class need to reside after compiling?
    Is my PATH hosed?
    Thanks for any pointer
    Willie

    hi
    did you get a chance to read this doc:
    http://docs.sun.com/source/817-6251/pwajsp.html

  • ERROR: Can't find class Startadmin

    Hello,
    why do I get this error message:
    Can't find class Startadmin
    I want to start my class Startadmin.java with "java Startadmin"!
    The file is in the current path, so I tried "java -classpath .: Startadmin" too, but I sill get this error!
    What can I do?

    Can you please post the solution, I'm having similar problem.
    I set the classpath before compiling the program
    export CLASSPATH=/usr/java/lib/classes.zip:/oracle/product/8.1.6/demo/lib/classes111.zip
    When I try to run the program at the command prompt
    $ java JdbcTest
    I am getting error message "Can't find class JdbcTest"
    When tried
    $ java -classpath . JdbcTest
    I was getting different error message
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JdbcTest.main(Compiled Code)
    Any help is appreiated
    Thanks
    SJ

  • Error: Can't find Class

    Hi there,
    I have added an external library (jtom) to my project. I get this runtime error when running my midlet:
    Error: Can't find Class jtom.service.JTOMException.
    When I extract the contents of the library(jtom), I can see that the class (jtom.service.JTOMException) exists. I can also see this class in myProject>>Build>>compiled folder.
    I'm using Netbeans Mobility 5.5
    Please Assist,
    Pheks

    Can you please post the solution, I'm having similar problem.
    I set the classpath before compiling the program
    export CLASSPATH=/usr/java/lib/classes.zip:/oracle/product/8.1.6/demo/lib/classes111.zip
    When I try to run the program at the command prompt
    $ java JdbcTest
    I am getting error message "Can't find class JdbcTest"
    When tried
    $ java -classpath . JdbcTest
    I was getting different error message
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JdbcTest.main(Compiled Code)
    Any help is appreiated
    Thanks
    SJ

  • Distiller "can't find font" error with MS-Gothic and ArialUnicodeMS

    Hi. I'm tried to verify that Distiller (both 9 and XI) and PDF Generator (11.0 SP1) are able to generate PDFs from Postscript files using a variety of fonts. Almost every font that I tried works perfectly fine, but MS-Gothic and ArialUnicodeMS both fail with "can't find font" errors. I've verified font configurations in both Distiller and PDF Generator, and lots of other fonts work fine. I've also verified that the two fonts are installed, enabled, and can be used in other applications (e.g., MS Word). In fact, I can generate PDFs from MS Word documents on the same server that use both of those fonts. I suspect the errors are misleading in that those apps can find the fonts, but are unable to open or use them for some reason. I've been able to replicate this behavior both on Windows Server and Mac OS X.
    Has anyone seen behavior like this? Any suggestions on how to get more information out of these Adobe apps to get a better idea what the real error is?
    JJR

    Addirional note: This is a java class within a JavaFX application if that is relevant.
    It does seem to be relevant - if I create the same class as part of a Java application rether than a JavaFX application it compiles without error. Is the imported java.awt.GraphicsEnvironment different in the tow cases??
    Edited by: Sidereal on Aug 28, 2009 11:19 AM

  • Can't find class org/apache/jk/apr/AprImpl

    Hi
    I have Tomcat 4.1.29 and Apache Web Server 2.0.48 installed.
    I have used this tutorial since I'm a newbie :(
    http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
    My problem is when I try to regroup them, I obtained this error error.log.
    error] Can't find class org/apache/jk/apr/AprImpl
    java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         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)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         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 my confid file (workers.properties) :
    [logger]
    level=DEBUG
    [config:]
    #file=C:/Apache2/conf/workers2.properties
    file=C:/Apache2/conf/workers2.properties
    debug=0
    debugEnv=0
    [uriMap:]
    info=Maps the requests. Options: debug
    debug=0
    # Alternate file logger
    #[logger.file:0]
    #level=DEBUG
    #file=C:/Apache2/logs/jk2.log
    [shm:]
    info=Scoreboard. Required for reconfiguration and status with multiprocess servers
    file=C:/Apache2/logs/jk2.shm
    size=1000000
    debug=0
    disabled=0
    [workerEnv:]
    info=Global server options
    timing=1
    debug=0
    # Default Native Logger (apache2 or win32 )
    # can be overriden to a file logger, useful
    # when tracing win32 related issues
    #logger=logger.file:0
    [lb:lb]
    info=Default load balancer.
    debug=0
    #[lb:lb_1]
    #info=A second load balancer.
    #debug=0
    [channel.socket:localhost:8009]
    info=Ajp13 forwarding over socket
    debug=0
    tomcatId=localhost:8009
    #[channel.socket:localhost:8019]
    #info=A second tomcat instance.
    #debug=0
    #tomcatId=localhost:8019
    #lb_factor=1
    #group=lb
    #group=lb_1
    #disabled=0
    #[channel.un:/opt/33/work/jk2.socket]
    #info=A second channel connecting to localhost:8019 via unix socket
    #tomcatId=localhost:8019
    #lb_factor=1
    #debug=0
    [channel.jni:jni]
    info=The jni channel, used if tomcat is started inprocess
    [status:]
    info=Status worker, displays runtime informations
    [vm:]
    info=Parameters used to load a JVM in the server process
    #JVM=C:\jdk\jre\bin\hotspot\jvm.dll
    OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar
    OPT=-Dtomcat.home=${TOMCAT_HOME}
    OPT=-Dcatalina.home=${TOMCAT_HOME}
    OPT=-Xmx128M
    #OPT=-Djava.compiler=NONE
    disabled=0
    [worker.jni:onStartup]
    info=Command to be executed by the VM on startup. This one will start tomcat.
    class=org/apache/jk/apr/TomcatStarter
    ARG=start
    disabled=0
    stdout=C:/Apache2/logs/stdout.log
    stderr=C:/Apache2/logs/stderr.log
    [worker.jni:onShutdown]
    info=Command to be executed by the VM on shutdown. This one will stop tomcat.
    class=org/apache/jk/apr/TomcatStarter
    ARG=stop
    disabled=0
    [uri:/jkstatus/*]
    info=Display status information and checks the config file for changes.
    group=status:
    #[uri:127.0.0.1:8003]
    #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
    #alias=myVirtualHost:8003
    #[uri:127.0.0.1:8003/ex]
    #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 )
    #context=/ex
    #group=lb_1
    [uri:/examples]
    info=Example webapp in the default context.
    context=/examples
    debug=0
    #[uri:/examples1/*]
    #info=A second webapp, this time going to the second tomcat only.
    #group=lb_1
    #debug=0
    [uri:/examples/servlets/*]
    info=Prefix mapping
    [uri:/examples/*.jsp]
    info=Extension mapping
    [uri:/examples/*]
    info=Map the whole webapp
    [uri:/examples/servlets/HelloW]
    info=Exampel with debug enabled.
    debug=10
    Thank you for your time !
    Max

    Btw: I get the warning starting IIS - It seems to me that IIS tries to load Tomcat on-the-fly. The Tomcat load the fails and IIS continues to load successfully.
    The beginning of the IIS Event log outputs this:
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (340)]: vm.detach() ok
    Apache Jakarta Connector2, Warning, Error: [jk_worker_jni.c (308)]: Can't find class org/apache/jk/apr/AprImpl
    Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (297)]: Loaded org/apache/jk/apr/TomcatStarter
    Apache Jakarta Connector2, None, Debug: [jk_vm_default.c (302)]: vm.attach() allready attached
    Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (252)]: jni.validate() class= org/apache/jk/apr/TomcatStarter
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (607)]: vm.open2() done
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (500)]: vm.init(): Jni lib: C:\wwwapps\j2sdk1.4.2_01\jre\bin\client\jvm.dll
    /watson

  • How can i find my errors during project validation before burning my project

    How Can I find the errors during the project validation before burning the project??

    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • HT3775 I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you.The document "IMAG0026.AVI" could not be opened. A required codec isn't available.

    I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you. This is for Quicktime Player.
    "The document “IMAG0026.AVI” could not be opened. A required codec isn't available."

    Try Perian.
    http://perian.org/

  • How can u find SRM error message texts?

    hi friends
    How can u find SRM error message texts?
    thanks
    regards
    chinna

    Hi,
    There are several ways.
    1. Go to BBP_PD and open the document. Select the link "Check again" in the bottom area.
    2. Go to SE17 and serch it from table T100.
    3. Go to SE91.
    Regards,
    Masa

  • Where can i find class files in server

    Hi Gurus,where can i find class files in server.
    Kranthi

    Hi,
    Class files:
    Common\JAVA_TOP
    Pages:
    Appl\mds
    Regards
    Meher Irk

  • Can't find DAE error message -9065

    IEverytime I launch Logic i get the "can't find DAE error -9065" message. any tips?
    Thanks
    matt

    If you don't even have Digi HW, somehow somebody installed and drove with it. So you're better off removing the driver because it's only going to cause problems. You can launch Logic with control held to bypass the audio engine from loading when you launch, to disable it.

  • Can you find this error

    I am sure this is something really small I am over looking but i can't find the error
            for (int i=0; i<monthName.length; i++) {
                if(input == monthName) {
    Month monthName[i] = new Month(monthName[i], numberOfDays[i]);
    monthName[i].display();
    error message says i need another "]"

    try this...
    Month[] = new Month[monthName.length];
    for (int i=0; i<monthName.length; i++) {
    if(input == monthName) {
    monthName[i] = new
    nthName[i] = new Month(monthName[i],
    numberOfDays[i]);
    monthName[i].display();
    sorry ment to say this...
    Month[] months = new Month[monthName.length];
    for (int i=0; i<monthName.length; i++) {
    if(input == monthName) {
    months[i] = new Month(monthName[i], numberOfDays[i]);
    monthName[i].display();

Maybe you are looking for

  • Powerbook 17" display glitch with 10.5.5

    Since updating to 10.5.5, I have a 2" wide vertical white stripe on the far left of the display that appears at startup and gradually corrects itself over about 30 seconds. I have read about the possibility of drivers for my graphics card (ATI Radeon

  • Small pictures on sites no longer appear. Tried IE and they were there.

    On Amazon the small pictures on some pages don't show. The titles are there but no pictures I know it's something to do with Mozilla because I tried the same pages on Amazon using IE and the pictures appeared. I didn't change anything it just suddenl

  • RWB status 'delivering' and SQL process hangs

    I am sending an IDOC to SQL Server thro XI using JDBC adapter. I am triggering a stored procedure to update SQL tables. The RWB status says 'delivering', sxmb_moni says 'successful' and all the steps are success in audit log. The status 'delivering'

  • Suppress default namespace in extract() function

    How can I avoid that Oracle includes the target namespace of my schema as the default namespace when using the EXTRACT function? E.g., select xmlelement("XmlData", xmlagg(extract(tx.transmission, '/Transmission/Item'))) from transmissions tx returns

  • Issue Configuring Push Notifications Proxying for OWA for Devices

    I have been attempting to configure Push Notifications per http://technet.microsoft.com/library/jj151815.aspx#bkmk_installmodule When running the second PowerShell script I get the error  "New-MsolServicePrincipalCredential : Invalid value for parame