Can't use "java" command

I just can't use the java command...
The paths have been set and everything should work...
If I just type "java" (without the "") I get:
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
And if I type "java Oper" (It compiled normally and worked on my school computer) it gives me this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Oper
It works everywhere but on my computer...
Oh, and I have Java Builder 3 University Edition installed. When I use that to compile + run my program, it works perfectely... I just can't use "java" in command prompt. I have a Windows ME.
Another note, this may be related: I can't use certain Java applets on my computer, like the IRC applets for example. I tried it on both Netscape 7.01 and Internet Explorer 6.0.2800.1106. It displays the same kind of error, the Exception in thread "..." java.lang.NoClassDefFoundError: ... .
And I've already tried uninstalling + reinstalling. Any other suggestions?

start -> run -> cmd
(if it doesn't open command prompt, then try command instead of cmd)
once you have reached command prompt, then you change to some empty directory where you would like to create java or class files. (use cd command for that)
once you have reached that directory, type: notepad Hello.java
(it should open notepad, and it should prompt you a question if you want to create file Hello.java (since it didn't excist) ... click yes)
in notepad type the following:class Hello {
public static void main(String[] args) {
  System.out.println("Hello");
}once you have written that into notepad, then click File and choose Save from there.
now you may close your notepad.
now go back to that command prompt and type in command dir Hello.*
it should lis you all Hello.* files, and Hello.java should be one of these.
now, when you have seen that in your current directory a Hello.java does excist, you may type javac Hello.java
if it does compile whitout any errors then everything is OK so far.
type again dir Hello.*
now you should see two files, Hello.java and Hello.class
if you now saw that Hello.class was in the current directory, you may type the following command: java Hello
it should display a String "Hello" on your screen.
if it doesn't work, then you have problem with java not working from commandline (some classpaths are wrong or unset or smthng similar)
if you suspect that something doesn't work, then always test it with simplest task.

Similar Messages

  • Help! Can't use java command to execute application

    I can compile using the javac command and that works fine. But then it can't seem to find the class that was just created.
    I get this message:
    "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
    Please help!!!
    Thanks!

    The file is saved as the class name.
    Here's what happens:
    C:\jdk1.2.2\bin>javac HelloWorld.java
    C:\jdk1.2.2\bin>java HelloWorld
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Here's the code that I'm trying to get to run:
    The HelloWorld application program
    public class HelloWorld
         public static void main(String argv[])
              System.out.println("Hello World!");
    }

  • Can i use java mail APIs to read Unix mail

    hi
    can i use java mail APIs to read Unix mail?
    Unix has "mail" command which can be used to access mails on the Unix system.
    is it possible to execute mail & access unix mails remotely using POP/IMAP
    thanks in advance

    There are JavaMail providers that allow you to access the Unix mail spool files directly. Alternatively the standard JavaMail API can access a POP or IMAP server, if one is installed.

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • Can I use short commands in CCNA exam

    Can I use short commands in CCNA exam
    for example
    “conf t” instead of “configure terminal”

    Sim questions are always answered by configuring
    something!
    The Exam Engine grades the running config, not the
    startup config
    Before exam day …
    Practice as much as you can (real gear, simulators, sample
    tests, read every configuration in books, repeat labs while in
    class, etc.)
    Use multiple sources for practice/review of configurations
    Exam day …
    Do what you can—partial credit!!!
    Start with “show running-config”
    There are no style points!
    You can use the short version of commands on the exam.

  • HT1338 I need to bulk upload to Auctiva (auction software) but Java was disabled on my computer. I have 10.5.8 so does this mean that I can't use Java? If not, then is there a workaround to be able to use the bulk uploader from Auctiva?

    I need to bulk upload images from iPhoto to Auctiva (auction software) that will then be posted to eBay; however Java was disabled on my computer some time ago due to "known issues."  I have 10.5.8 so does this mean that I can't use Java? If not, then is there a workaround to be able to use the bulk uploader from Auctiva? As it stands now, I have to upload photos individually which is super time consuming.

    You can re-enable it for special purposes, opposite of disabling it...
    Disable Java in your Browser settings, not JavaScript.
    http://support.apple.com/kb/HT5241?viewlocale=en_US
    http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
    http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • Can I use Java Creator 2 with old JRE/JDK 1.4.2_07??

    I am planning to install new Java Creator 2 but I am having JRE and JDK 1.4.2_07 and I am using mysql 3.23.55 and I want to integrate it.
    Currently my OS is Windows XP SP2 platform with processor Intel Centrino 1.4 and RAM 256 MB... I know the ram is not sufficient and i am planning to upgrade it.. but the problem is can i still remain to use the old JRE and JDK 1.4.2_07 and i am also using mysql 3.23.55... all the driver and engine are out to date but can i still use it and integrate it with java creator 2?
    The questions are:
    1) Can I use Java creator 2 with those old engine?
    2) What java compiler or development tools i can use to develop java standalone application?
    Thank you

    When the jar file is expanded within Eclipse, it shows that the mail.jar file is built with 1.5.0; I think? Here is the header contents of the MANIFEST.MF file, note "Created by."
    Manifest-Version: 1.0
    Implementation-Version: 1.4
    Specification-Title: JavaMail(TM) API Design Specification
    Specification-Version: 1.3
    Implementation-Title: javax.mail
    Extension-Name: javax.mail
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Implementation-Vendor-Id: com.sun
    Implementation-Vendor: Sun Microsystems, Inc.
    Specification-Vendor: Sun Microsystems, Inc.
    SCCS-ID: @(#)javamail.mf     1.6 05/12/09
    This is causing problems, because anytime I try to use this file, I get signing errors. I have several Web Services built by BAE and Plumtree that are running on 1.4.2; and therefore I am stuck with 1.4.2. I did try to remove the SUN_MICR.* files, thinkning it would resolve the signing issues, but then that caused other problems. I can provide you with code that demonstrates the problem.
    Is there a place where I can get a mail 1.4 jar file built with 1.4.2? that would most likely solve my problems.

  • PI7.11 Can I use Java proxy on  Advanced Adapter Engine ??

    To:PI Specialists
    Now I m planning to use Java Proxy on PI7.11.
    and I want to know Java Proxy can act on AAE as local processing.
    I wonder that Java Proxy do not connect  to adapter engine but  to integration engine.
    If it connect to integration engine I ll not to use Java Proxy on AAE...
    Please teach me about Java proxy will do on AAE....
    Naoki Kurihara

    Now I find out we can't use Java Proxy on AAE....
    Please check this pdf page 12.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70066f78-7794-2c10-2e8c-cb967cef407b?quicklink=index&overridelayout=true

  • How can I use srvctl command line for change "Failover type" and "F method"

    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.

    user10674190 wrote:
    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.srvctl modify service -d database_name -s orcldb -q TRUE -m BASIC -P BASIC -e SELECT -z 180 -w 5 -j LONG
    Also see
    11gR2(11.2) RAC TAF Configuration for Admin and Policy Managed Databases [ID 1312749.1]

  • Can I use Java Card Development Kit 2.2.1 on Windows XP?

    Can I use Java Card Development Kit 2.2.1 on Windows XP?
    If no, which kit supports XP?

    It is not as strait forward as per say.
    I would like to share some tips that I have learnt duirng my recent experience with Java Card Development Kit 2.1.2 ( It presumed that JAVA SDK and JCDK is properly installed:
    Additonal installation
    - you need to download Java Communicatons API version 2.o for Windows at http://java.sun.com/products/javacomm/downloads/index.html
    - unzip the downloaded file javacom20-win20.zip
    - copy comm.jar and javax.com.properties to %JAVA_HOME%\lib
    - copy win32com.dll to %JAVA_HOME%\bin
    Configuration of Environment
    - Activate System under Control Panel
    - Click Environment Variable button under Advance Tab.
    - Check that JAVA_HOME and JC21_HOME are there under User Variables for user123
    - Create a new enviroment by clicking New button under User Variables and Enter "CLASSPATH" for Variable Name and ".;c:\j2sdk1.4.1_04\lib\comm.jar for Variable Value ( the ".;" is important for the entry and varies according to your JAVA_HOME)
    Modifying %JC21_HOME%\samples\build_samples.bat
    - Next you need to modify the compiler option in build_samples.bat
    - Use editor to look for the portion "Compile Sample" and add "- target 1.1" to every statements here. A sample is listed below:
    %JAVA_HOME%\bin\javac -target 1.1 %JCFLAGS% src\com\sun\javacard\samples\HelloWorld\*.java
    You may proceed to test the demo codes as instrucrted in the User Guide.
    I hope the above will help those who are keen to have a head start in Java Card Developemnet.

  • Can i use java

    hi, I am assigned to choose a programming language and tool to develope a financial accounting software that is mult-platfom graphical user interface and it is going to be only distributed on the Internet. can I use java? which technology? and how much does it cost the jave development software for software company? is it better than visual studio .net? in what way? please help...

    Not only you can, but you should use Java. It is a more mature plateform than .Net. There are a lot af API that does whatever you want to do : GUI, Networking, Web applications, IO, 2D Graphics, 3D graphics etc. It is a very elegant and object-oriented language. Plus there is a big community of Java developpers that can help ( This forum for instance) you and a lot of open source code you can choose from.
    You can either use applets, embedded in an HTML page or, use Java Web Start to distribute and run your Java application.
    Moreover, there are dozens of Java Editors ( Borland JBuilder, Netbeans, IntelliJ IDEA, etc.) and some of them are free.
    Hope this helps !

  • Can I use Java 5 syntax?

    The last time I tried to create a portlet, I think I had to use J2SE 1.4 which was a big turnoff. Can I use Java SE 5/6 syntax when coding my portlet? Can I use JPA? If I'm writing JSF portlets, can I use facelets with it?
    Thanks,
    Ryan

    Yes you can Java 5 syntax while coding the portlet. You can also use JPA. I have not come across any issues regarding facelets usage in jsf portlets. Let me know if you face any issues.
    Regards,
    Deepak

  • CAN I USE JAVA CARD TECHNOLOGY TO BUILD BIOMETRIC COLLEGE ATTENDANCE SYSTEM

    HELLO everybody,
    I am new in Java card technology.Please any one can guide me.Can i use Java Card Technology to build biometrics college attendance system.If i can so which device should i need to buy or eBooks..
    PLEASE I NEED HELP..
    Thanks for your time ..
    I am looking forward to hearing from everyone..
    Thanks
    Durjan Hussain
    SCJP1.4,SCWCD

    Thanks AlexRashevsky for your good comments,
    I want to build Student Biometrics Attendance system.I want to use biometrics reader.Please i need guide for which biometrics device can i use to build the system.If you can give me your contact number that could be great with country code.Because i am doing this Project for my M.Sc dissertation and also for real client.
    I am looking forward to hear from you.
    Thanks.

  • Can i Use java Class

    Can any help, can i use java class in
    froms 6 or any one have designed form
    of progress bar please help me

    Thanks for your reply...
    Actually the task is quite simple... It requires me to do a better interface for a tomcat server folders...
    For example, users are free to access
    http://apache.oss.eznetsols.org/jakarta/tomcat-5/v5.0.12-beta/
    to download the tomcat... However, its index may not nice and easy for browing.. Therefore, the task requires a new dynamic page to access this server folder, and get all file names under this folder, anlaysis whether it is file or directory..and finally get its path....
    It is quite easy to do a JSP page, but I don't know whether it is possible to do by using JavaScript .... Although JS is running in client side, the user/client also can access the tomcat folder, why not JavaScript?
    Thanks a lot!
    SD

Maybe you are looking for