Can't run java or javac from dos prompt

I just installed j2sdk1.4.1 on win98SE. I have a problem where I can't seem to be able to compile or run an application from the dos prompt. I can do both in Visualage for Java or in JGrasp but not at the DOS Prompt. I have set the PATH statement to PATH=c:\j2dsk1.4.1\bin and the classpath=c:\j2sdk1.4.1\lib. The following is a typical error message:
javac RunApplet.java
RunApplet.java:8: cannot resolve symbol
symbol : class MyApplet
location: class RunApplet
MyApplet myApplet = new MyApplet():
RunApplet..java:8: cannot resolve symbol
symbol : class MyApplet
location: class RunApplet
MyApplet myApplet = new MyApplet()
2 errors
java RunApplet.class
Exception in thread "main" java.lang.NoClassDefFoundError: RunApplet/class
It seems like the system can't locate the class files?
Also is there away to use more than the standard 8.3 charecter set in the DOS prompt window?
TIA

javac RunApplet.java
RunApplet.java:8: cannot resolve symbol
symbol : class MyApplet
location: class RunApplet
MyApplet myApplet = new MyApplet():
RunApplet..java:8: cannot resolve symbol
symbol : class MyApplet
location: class RunApplet
MyApplet myApplet = new MyApplet()
2 errorsMost likely a Classpath problem. I suggest changing your classpath to:
classpath=.;c:\j2sdk1.4.1\lib
java RunApplet.class
Exception in thread "main"
java.lang.NoClassDefFoundError: RunApplet/class2 problems. As ChuckBing says, the command needs to be "java RunApplet" with no .class. The argument to the java command is the class name, not a file name. The second problem - if you do not have a successful compilation, there won't be any .class file to run.

Similar Messages

  • Error when running mortgage calc program from DOS prompt

    I have a GUI Mortgage Calculator program. It probably isn't the most efficient use of code, but it gets the job done. I am running java SDK 1.6.0_06. This is a class assignment. We are to compile the code and post the .class file for our team members to run. I am trying to get the .class file to run after I compile it with javac. I used jCreator LE to create it... it compiles and runs there just fine. The program will compile at the DOS prompt, but will not run properly. The following is the error I get (any help would be appreciated):
    Exception in thread "mani" java.lang.NoClassDefFoundError: manchorMortgage3
    Caused by: java.lang.ClassNotFoundException: manchorMortgage3
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader1.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)
    Below is my code:
    * manchorMortgage3.java
    * Created on July 10, 2008
    * This program calculates and displays the mortgage amount
    * from user input of the amount of the mortgage and the user's
    * selection from a menu of available mortgage loans.
    import java.math.*; //*loan calculator
    import java.text.*; //*formats numbers
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class manchorMortgage3 extends javax.swing.JFrame {
        /** Creates new form manchorMortgage3 */
             public manchorMortgage3() {
             initComponents();
             setLocation(300,200);
        /** This method is called from within the constructor to
         * initialize the form.
        // Begin Initialize Components
        private void initComponents() {
            mortgageAmount = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            termAndInterest = new javax.swing.JLabel();
            jRadioButton1 = new javax.swing.JRadioButton();
            jRadioButton2 = new javax.swing.JRadioButton();
            jRadioButton3 = new javax.swing.JRadioButton();
            calcButton = new javax.swing.JButton();
            enterAmount = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            jButton2 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Manchor - Mortgage Calculator - Week 3");
            mortgageAmount.setText("Enter the Mortgage Amount:");
            termAndInterest.setText("Select Your Term and Interest Rate:");
            jRadioButton1.setText("7 years at 5.35%");
            jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton1ActionPerformed(evt);
            jRadioButton2.setText("15 years at 5.5%");
            jRadioButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton2.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton2ActionPerformed(evt);
            jRadioButton3.setText("30 years at 5.75%");
            jRadioButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton3.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton3ActionPerformed(evt);
            calcButton.setText("Calculate");
            calcButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    calcButtonActionPerformed(evt);
            jTextArea1.setColumns(20);
            jTextArea1.setEditable(false);
            jTextArea1.setRows(5);
            jScrollPane1.setViewportView(jTextArea1);
            jButton2.setText("Quit");
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(26, 26, 26)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(enterAmount)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)
                                .addComponent(calcButton)
                                .addGap(75, 75, 75))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButton3)
                                    .addComponent(jRadioButton2)
                                    .addComponent(jRadioButton1)
                                    .addComponent(termAndInterest)
                                    .addComponent(mortgageAmount)
                                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addContainerGap(224, Short.MAX_VALUE)))))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(277, Short.MAX_VALUE)
                    .addComponent(jButton2)
                    .addGap(70, 70, 70))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(31, 31, 31)
                    .addComponent(mortgageAmount)
                    .addGap(14, 14, 14)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(20, 20, 20)
                    .addComponent(termAndInterest)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jRadioButton1)
                    .addGap(15, 15, 15)
                    .addComponent(jRadioButton2)
                    .addGap(19, 19, 19)
                    .addComponent(jRadioButton3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(calcButton)
                        .addComponent(enterAmount))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addComponent(jButton2)
                    .addGap(20, 20, 20))
            pack();
        }// End initialize components
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//event_jButton2ActionPerformed
            System.exit(1);
        }//event_jButton2ActionPerformed
        static NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US);
        static NumberFormat np = NumberFormat.getPercentInstance();
        static NumberFormat ni = NumberFormat.getIntegerInstance();
        static BufferedReader br;
        private void calcButtonActionPerformed(java.awt.event.ActionEvent evt) {//event_calcButtonActionPerformed
            enterAmount.setText(null);
            jTextArea1.setText(null);
            double monthlyPayment;
            double interest;
            double amount ;       
            int years ;
            double monthlyInterest, monthlyPrinciple, principleBalance;
            int paymentsRemaining, lineCount;
            np.setMinimumFractionDigits(2);
        br = new BufferedReader(new InputStreamReader(System.in));
      lineCount = 0;
            try
                    amount=Double.parseDouble(jTextField1.getText());
            catch (Exception e)
                enterAmount.setText("Please Enter Mortgage Amount");
                return;
            if(jRadioButton1.isSelected())
                interest=0.0535;
                years=7;
            else if(jRadioButton2.isSelected())
                interest=0.055;
                years=15;
            else if(jRadioButton3.isSelected())
                interest=0.0575;
                years=30;
            else
                enterAmount.setText("Please Select Your Term and Interest Rate");
                return;
        jTextArea1.append(" For a mortgage of " + nf.format(amount)+"\n"+" With a Term of " + ni.format(years) + " years"+"\n"+" And an Interest rate of " + np.format(interest)+"\n"+" The Payment Amount is " + nf.format(getMortgagePmt(amount, years, interest)) + " per month."+"\n"+"\n");
        principleBalance = amount - ((getMortgagePmt(amount, years, interest)) - (amount*(interest/12)));
        paymentsRemaining = 0;
        do
            monthlyInterest = principleBalance * (interest/12);//*Current monthly interest
             monthlyPrinciple = (getMortgagePmt(amount, years, interest)) - monthlyInterest;//*Principal payment each month minus interest
            paymentsRemaining = paymentsRemaining + 1;
            principleBalance = principleBalance - monthlyPrinciple;//*New balance of loan
            jTextArea1.append(" Principal on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(monthlyPrinciple)+"\n");
                    jTextArea1.append(" Interest on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(monthlyInterest)+"\n");
                    jTextArea1.append(" New loan balance on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(principleBalance)+"\n"+"\n"+"\n");
         while (principleBalance > 1);
        }//Begin event_jRadioBtton1Action Performed
        public static double getMortgagePmt(double balance, double term, double rate)
                double monthlyRate = rate / 12;
                double monthlyPayment = (balance * monthlyRate)/(1-Math.pow(1+monthlyRate, - term * 12));
                return monthlyPayment;
        private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//Begin event_jRadioButton3ActionPerformed
             if(jRadioButton2.isSelected())
                jRadioButton2.setSelected(false);
             if(jRadioButton1.isSelected())
                jRadioButton1.setSelected(false);
        }//End event_jRadioButton3ActionPerformed
        private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//Begin event_jRadioButton2ActionPerformed
             if(jRadioButton1.isSelected())
                jRadioButton1.setSelected(false);
             if(jRadioButton3.isSelected())
                jRadioButton3.setSelected(false);
        }//End event_jRadioButton2ActionPerformed
        private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
            if(jRadioButton2.isSelected())
                jRadioButton2.setSelected(false);
            if(jRadioButton3.isSelected())
                jRadioButton3.setSelected(false);
        }//End event_jRadioButton1ActionPerformed
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new manchorMortgage3().setVisible(true);
        // Begin variables declaration
        private javax.swing.JButton calcButton;
        private javax.swing.JButton jButton2;
        private javax.swing.JLabel mortgageAmount;
        private javax.swing.JLabel termAndInterest;
        private javax.swing.JLabel enterAmount;
        private javax.swing.JRadioButton jRadioButton1;
        private javax.swing.JRadioButton jRadioButton2;
        private javax.swing.JRadioButton jRadioButton3;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        private javax.swing.JTextField jTextField1;
        // End  variables declaration
    }

    The class is not in your classpath. Likely you blew away your classpath with some silly environment variable.
    If you are in the directory where your class file is then execute
    java -cp . manchorMortgage3and it will work. (Note the -cp . which tells java to include the current directory in the runtime classpath)

  • Can't run java .class programs from Windows command line!

    I have tried to get a program that I wrote with the JDK to run from the Windows command line, but it is not working. I typed:
    java HelloWorld
    Where my .class was HelloWorld.class, a compiled java program. I spelled the name correctly (and I am in the correct directory), yet I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    I think something is screwy with windows, but that's just me. Any ideas??

    Likely a CLASSPATH issue - try
    java -classpath . HelloWorldGood Luck
    Lee

  • How can I run a BW Function from EXCEL-IN-PLACE (BPS)??? Please give any ex

    How can I run a BW Function from EXCEL-IN-PLACE (BPS)using VBA??? Please give any example.
    I would like to run my function module ZMY from EXCEL-IN-PLACE using VBA and get a result.

    if you are using excel in place in the web application environment I doubt you can, you've never really had any macro functionalty there.
    If you are in the gui environemnt (Planning folders) it will depend on how you want to invoke the module...

  • HT4437 can i run my apple TV from an iPad2 with a PC as the iTunes server ... would like to do away with Apple TV remote ... thank you

    can i run my apple TV from an iPad2 with a PC as the iTunes server ... would like to do away with Apple TV remote ... thank you
    JJ

    As I was saying earlier that is not possible because the Apple TV has no accessible storage and streaming from your iMac is done via home sharing on your local network.
    iTunes purchases can be accessed via the cloud on Apple TV. If you have iTunes Match you can access your full music libary from the cloud.
    Using the iPad to watch your films would require syncing them and then connecting the iPad to a TV.

  • Can we run java programms on Windows XP?

    Hi experts..
    I installed JDK on Microsoft Windows XP Home Edition..but i am unable to run java programmes.
    can i run java programmes on Windows XP?? if so how??
    i will be very thankful..if any one solve this problem..

    Yes, you can. There's a bunch of things you need to do (mostly setting the path environment variable). You should look at the documentation that came with the JDK, and check out the many forum responses to problems in setting up the JDK on Win 2K and Win XP.
    HTH

  • Can't run Java on windows xp home

    I have just downloaded jdk 5 on my windows xp home, and set PATH and CLASSPATH. But i still can't run java commands on cmd.
    Please help.

    when in the cmd prompt and you type "java" do you get the following?
    C:\>java
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar 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 <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A ; separated list of directories, JAR archives,
                      and ZIP archives to search for class files.
        -D<name>=<value>
                      set a system property
        -verbose[:class|gc|jni]
                      enable verbose output
        -version      print product version and exit
        -version:<value>
                      require the specified version to run
        -showversion  print product version and continue
        -jre-restrict-search | -jre-no-restrict-search
                      include/exclude user private JREs in the version search
        -? -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 assertionsif not, please follow the instructions on this website on setting up the latest jdk.
    http://www.discussjava.com/joomla/index.php?option=com_jd-wiki&Itemid=68&id=index:setting_up_the_1.5_jdk
    let me know if it is any help.
    null

  • Error when I execute an application with the java command in a DOS prompt

    Hi:
    I have a trouble. I edit the most simple program in Java: hello.java
    In DOS prompt, I compile the program. The result is the file hello.class
    c:\> javac hello.java
    However, I try to execute this program with the command java
    c:\> java hello
    and the DOS prompt send me an error like this: Java.exe has a problem and must be closed.
    I press the option "Don't send". After this, the DOS prompt returns empty and it doesnt execute the application:
    c:\>
    By the way, in an IDE editor like Gel, the file hello.java is compiled and executed correctly without problems.
    I edited other simple Java files, I compiled them succesfully and I can't run them in a DOS pormpt. The result is the same dialog box: "Java.exe has a problem and must be closed".
    The question is: Why don't these programs run in a DOS prompt?
    My Operating System is Microsoft Windows XP and the Java compiler version is: 1.6.0_13
    Thanks in advanced.

    Hi again:
    What happens when you type "java -version"?
    Answer:
    java version "1.2"
    Classic VM (build JDK-1.2-V, native threads)
    What is the value of your %PATH%?
    Answer:
    Path=E:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\Archivos comunes\Adaptec Shared\System;C:\Archivos de programa\Executive Software\DiskeeperLite\;C:\Archivos de programa\QuickTime\QTSystem\;C:\Archivos de programa\Java\jdk1.6.0_13\bin;C:\Archivos de programa\Microsoft SQL Server\80\Tools\Binn\;e:\Microsoft SQL Server\90\Tools\binn\;C:\BITWARE\;C:\Archivos de programa\Archivos comunes\Ahead\Lib\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    Have you considered running Linux?
    Answer: No, because Linux is more complex.
    Additional information:
    My Operating System is: Microsoft Windows XP Profesional Version 2002, Service Pack 3, running on an Intel Pentium 4, CPU 2.4 Ghz, RAM: 2.23 Gb

  • Converting multiple bmp files to PDF using acrobat 7.0 from DOS prompt

    Hi,
    I have a requirement to convert multiple BMP files in a folder to one PDF.
    I can use multiple file conversion option in acrobat to combine and convert them to one PDF .. but I have 2000 such folder to conver to PDF.
    PDF should be name after the folder name.
    Is there a to automate this in acrobat.. or can we run this conversion from DOS prompt using commands.. so that I can create a bat file and have them converted. Pls let me know.
    Thanks
    Pugazh

    I have not tried BMP files, but do JPeg, GIF, TIFF, and PNG files regularly. I simply open Acrobat, then select the graphics files in explorer and drag & drop to Acrobat. I then organize the graphics if needed (using the pages tab) and save to a PDF.

  • Error while running a ODI scenario from command prompt

    Hi,
    I'm trying to run a ODI scenario from command prompt. I've edited the tnsnames.ora and odiparam.bat file with exact host and port details. Even though I'm facing the below error.
    command:startcmd.bat OdiStartScen -SCEN_NAME=INT.CUSTOMER_STG -SCEN_VERSION=001 -CONTEXT=ICM -AGENT_CODE=KANBAN
    Error: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:orcl
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:280)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.i.run(i.java)
    Please help in resolving the error...
    Thanks in advance.
    Edited by: 894841 on Dec 22, 2011 11:15 PM

    Hi,
    Are you able to start the Standalone Agent(KANBAN) and test it in the Topology?
    Check the value of the ODI_MASTER_URL variable in odiparams file(at the path <ODI_HOME>\oracledi\agent\bin) of the agent.
    Specify the full the JDBC URL properly not like localhost(until the DB is on same machine as your ODI).

  • How to run non-customised report from command prompt to gen trace file?

    Hi
    how to run non-customised report from command prompt to gen trace file?
    EBS R12 RUP6.
    RHEL5
    rgrds

    Hi,
    See (Note: 285497.1 - Rwrun.sh Does Not Generate Trace Output Using TRACEOPTS in Command Line) and/or (Note: 737445.1 - R12 Concurrent Requests Run Forever; rwrun Errors REP-50125) for the command you need to use.
    Thanks,
    Hussein

  • Running java command from DOS prompt

    Hi,
    When I run java from the DOS prompt (NT) in any other location than the JDK bin directory, I get the following error:
    Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
    My understanding is to be able to run this from anywhere you need to add the tools.jar file to the CLASSPATH, which I have done.
    There is no entry in the Registry for Software\JavaSoft...etc, has anyone any idea what my problem is and how I can solve it?
    Thanks in advance

    Hi,
    I am running Java 2 SDK, Standard Edition Version 1.2.2 running on NT. It was installed as part of Oracles JDeveloper IDE and is running on NT.
    All I want to be able to do is run java from the command line e.g. 'java myclass', to run a standalone Java program. I can run 'javac myclass.java' to compile the program without any problems, but my understanding is that to do this all I need is to have the '.../java1.2/bin' directory included in the 'PATH' variable, whereas to run the java runtime you need to include the tools.jar in the CLASSPATH variable.
    As I said previously I can run the 'java myclass' command from the '../java1.2/bin' directory, just not from anywhere else. As for whats in the code, does not matter you should be able to type just java on the command line and it will come back with an error prompting for the class name. Here is an example of what happens:
    I:\>java
    Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
    However if I change to the correct directory, I get:
    D:\oracle\JDev32\java1.2\bin>java
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -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
    -? -help print this help message
    -X print help on non-standard options
    The contents of my PATH and CLASSPATH variable are shown below, Thanks again.
    I:\>PATH
    PATH=D:\oracle\BIN;D:\oracle\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\Oracle\jre\1.1.7\b
    in;D:\oracle\ora8i\bin;C:\DMINT40\Win32\Bin;C:\WINNT\system32;C:\WINNT;C:\Program Files\Symantec\pcA
    nywhere;d:\oracle\jdev32\java1.2\bin;d:\downloads\oraxml\bin;d:\oracle\jdev32\java1.2\lib\tools.jar
    I:\>echo %CLASSPATH%
    d:\oracle\jdev32\java1.2\lib\tools.jar;d:\oracle\apache\apache\htdocs\web-inf\classes;d:\oracle\apac
    he\jserv\servlets

  • Win2000 NoClassDefFoundError running java.exe from DOS prompt

    I am using Windows 2000 with J2SE v 1.3.1_02 and have a problem when I run java.exe from the command line for classes that are defined to be in a package. I can both compile and run this program from the TextPad editor but when I run it from a DOS prompt I get the error "Exception in thread "main" java.lang.NoClassDefFoundError: MyClass"
    My CLASSPATH is set to D:\
    The files MyClass.java and MyClass.class are in the directory D:\MyProject
    here is the source:
    package MyProject;
    public class MyClass
         public static void main(String[] args)
              System.out.println("MyClass main");
    Note that if I comment out the package statement and add "." to CLASSPATH then it runs from the DOS prompt. Why does the program run from inside TextPad but not from the DOS prompt? Seems to be some type of bug in java.exe on Windows 2000 when the keyword package is used.

    It turns out that if you use the main method in a class that declares the package statement you need to use the fully qualified name to run the program. Using this statement works for this problem:
    java MyProject/MyClass
    the forward slash is required even though is a Windows system.

  • Can we run java bean from forms client server??

    Hi,
    The OLTP application we are planning to build has lot of gui e.g
    tabs, drag and drop etc. Our aim is to make it web enabled but
    the network bandwidth available is small 16 - 64K . So even
    thoughwe plan toi use applet , we seriuosly doubt how good it
    will perform on such low network bandwidth. [The system will
    have 100 users]
    Q1. What will be a reasonable bandwidth to run an oltp
    application (say maintenance )
    Hence we are thinking of developing with developer 6i and
    deploying our application in client server mode, which can
    easily be web enabled in future. But we also have to integrate
    visual interfaces like gantt chart, which are not available with
    forms. We plan to use third party java component (e.g ILOG
    jviews), so that in future we can easily web enable the entire
    application.
    Q2. Can we run forms with java bean in client server mode? If
    not, what are the products to be installed on each machine to
    run it without using 9ias?
    best regards

    Yes. We can run sql loader from client machine.
    C:\Karthik>sqlldr user/pass@database data='test.csv' control='test.ctl' log='test.log' bad='test.bad'
    You can go through the following link for better understanding.
    http://www.oreilly.com/catalog/orsqlloader/chapter/ch01.html

  • How can I make Terminal run Java 7 downloaded from the Oracle Website?

    I've downloaded Java 7 from the Oracle website, and I want the Terminal application to run that Java 7 download. I try to run Java programs that require Java 7, but it runs with the Apple Internal Java 6 release. How can I make it so my MacBook Pro runs the download of Java that I downloaded? I know this sounds stupid, but am I routing my machine to run the internal Java 6 version? I have seen many videos in which people with the same software version as me run Java like this with no problem. Could you please let me know why this is happening and how I can fix it? I really want to be able to use the Java 7, particularly because I'm always getting this "Unsupported Major Minor Version 51.0" from many applications that are Terminal based.
    Thanks!

    I think I've answered your question. The Oracle JRE is a web plugin. The JDK is a development kit for applications with embedded Java. Neither one replaces the Apple-distributed Java frameworks for running standalone applications without embedded Java. Any other questions you have should be answered by the Oracle documentation.

Maybe you are looking for