DiveLog.java , i can't run it

Hi,
I have problem running DiveLog.java
I was adviced to complie it in this way because to compile a packaged application i must include the classpath which points to, the directory where the files live.
The way I compile:
C:\jdk1.3.1\bin\>javac �classpath C:\jdk1.3.1\ DiveLog.java
The way I run it
C:\jdk1.3.1\bin\>java �classpath C:\jdk1.3.1\ divelog.DiveLog
This is the error I get if I run the program
Exception in thread "main" java.lang.NoClassDefFoundError: divelog/DiveLog
My DiveLog.java program is in the bin folder
I�m using windows 98
What is wrong?
Thank you for your kind help

hi lisa
i had the same problem a month ago trying to run DiveLog.java and the error message was the same.
I did the following to solve my problem, may be you can try if it's relevant to you:
I went and scrutinise my autoexec.bat file and found that some other programs had set some paths in the file. That's why Java was confused where the right path was. So, I removed those unnecessary paths, and left on Windows and Program Files paths in there.
After deleting the redundant paths, I also added the correct path in the autoexec.bat. I added C:\JAVA\BIN
In your case it would be C:\jdk1.3.1\BIN
You will encounter this problem if you had installed QuickTime in your machine.
Just scrutise the autoexec.bat and remove those redundant paths. If you are worried about making mistakes, what you can do is to make a copy of the existing autoexec.bat and call it autoexec-1.bat. If my method fail, you can always copy it back .
Good luck

Similar Messages

  • 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

  • How can i run a java class file from shell?

    Hi all,
    I've a .class file named "File" that contains Main method, it is in the package "File2".
    How can I run it by shell command?
    PS: "java -cp . file" doesn't work it launch->
    Exception in thread "main" java.lang.NoClassDefFoundError: File2/File (wrong name: File2/File)
    Thanks in advance.

    Just to understand: is File2 ar jar archive or not? If it is a jar archive, have you tried open File2.jar? If File2 is a directory within the current directory, have you tried java -cp . File2/File? I just tested with a set of classes and it works... Let me be precise:
    * Let us imagine you are working in a directory whole path is PathToDir/
    * in this directory you have the classes put in a directory called File2
    * in order to launch File.class then you would have to invoke :
    cd PathToDir/ (just to be sure)
    java -cp . File2/File
    *if you were to do the following then you would have the problem you describe
    cd PathToDir/File2/
    java -cp . File

  • How can I run a java-application on starting of Windows 2000

    How can I run a java-application without any user on starting of Windows 2000?
    For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
    How can I do that?

    Hi, you have to put it in a Windows service.
    To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
    For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
    Regards,
    Ivan.

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends:
    I met a problem when I want to use a Java program to run other java processes by Runtime.exec command,
    How can I run Runtime.exec command in Java To invoke several other java processes??
    see code below,
    I want to use HelloHappyCall to call both HappyHoliday.java and HellowWorld.java,
    [1]. main program,
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloHappyCall
         public static void main(String[] args){
              try
                   Runtime.getRuntime().exec("java  -version");
                   Runtime.getRuntime().exec("cmd /c java  HelloWorld "); // here start will create a new process..
                   System.out.println("Never mind abt the bach file execution...");
              catch(Exception ex)
                   System.out.println("Exception occured: " + ex);
    } [2]. sub 1 program
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloWorld
         public static void main(String[] args){
         System.out.println("Hellow World");
    } [3]. Sub 2 program:
    package abc;
    import java.util.*;
    import java.io.*;
    class HappyHoliday
         public static void main(String[] args){
         System.out.println("Happy Holiday!!");
    } When I run, I got following:
    Never mind abt the bach file execution...
    I cannot see both Java version and Hellow World print, what is wrong??
    I use eclipse3.2
    Thanks a lot..

    sunnymanman wrote:
    Thanks,
    But How can I see both programs printout
    "Happy Holiday"
    and
    "Hello World"
    ??First of all, you're not even calling the Happy Holiday one. If you want it to do something, you have to invoke it.
    And by the way, in your comments, you mention that in one case, a new process is created. Actually, new processes are created each time you call Runtime.exec.
    Anyway, if you want the output from the processes, you read it using getInputStream from the Process class. In fact, you really should read that stream anyway (read that URL I sent you to find out why).
    If you want to print that output to the screen, then do so as you'd print anything to the screen.
    in notepad HelloWorld.java, I can see it is opened,
    but in Java, not.I have no idea what you're saying here. It's not relevant whether a source code file is opened in Notepad, when running a program.

  • Can I run both legacy Java and the latest version on my Macbook

    My CS4 Indesign now says I need the legacy Java version to run it. I upgraded to Yosemite and use CC 2014 Photoshop, but don't want to upgrade my Indesign as I don't use it much, but I do want it available. Can I run two versions of Java on the same machine?

    I'm pretty sure that that's not possible.
    CS4 is not guaranteed to work under Mavericks or Yosemite so you're on your own.

  • Can't get java runtime, and applets, running inside Firefox 11.

    I have gone to my Windows 7 control panel and enabled java for the mozilla family,
    which implies the web browser I use, Firefox 11 at the moment.
    I have gone to Firefox/Tools/Add-Ons/Plugins and have enabled the
    Java Deployment Kit 6.0.250.3
    However, when I go to the Oracle Java test page
    http://www.java.com/en/download/testjava.jsp
    It can't detect java working in my web browser.
    The install missing plugins button appears in the top right,
    and while it downloads java, it consistently fails here stating
    that I have the option to install manualy (which I have successfully done already).
    I have the java 6 download manager working, however I can't run applets embedded in the web browser.
    Please, how do I get my java working in firefox for my applets?

    Zachary1234 wrote:
    Yes, 32 bit java and a 32 bit web browser seem to be the only working answer for applets,
    even in windows 7 (and adherence to the firefox browser).No, its not. Its exactly as I said, not what you make of it. If you have a 64 bits firefox, install a 64 bits runtime.
    Let me put it differently: applets work just fine on my 64 bits Windows 7 under a 64 bits Firefox 11 with a 64 bits runtime.

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • Can we run EXE file/ Another Java Program from Java Application? How?

    Can we run EXE file and another java program from java application?
    Thanks in advance

    Example running adobe acrobat
    String command = "C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe /t "+selectedDocument+" \\\\CONTROL\\HP LaserJet 4L";
    Runtime rn = Runtime.getRuntime();
    Process process = rn.exec(command);
    process.waitFor();rykk

  • 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

  • Can not run the java

    It is very annoying when I type java at the prompt. It gives the following error.
    Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
    Initially, a variable, qtjava was pointing to this path.
    There was an entry i classpath for qtjava and there was a variable qtjava as well. I removed both of these. There is not qtjava in the list of set now but still when I type java, it displays the above error.
    how this is being invoked when I try to run java?
    Can any one give me some idea why this is hapening? and how to remove? the new java\jdk\bin is in the path? does it have to be in classpath ?
    thanks
    kiran
    Edited by: xmlcrazy on Aug 23, 2009 2:07 PM

    Thank you very much for your reply and link. There was an entry in registry. I am not sure how and why. Once I clean that and reboot the laptop, it is working now.
    I have a few more questions. I am kind of new to java. In fact I have worked a bit in the past but have left for long. So, I am now trying to revive and plannign to go in it as java technology alludes me always. It is not affected due to econymy or other technology.
    I am trying to test generics. When I tried to compile the following code
    import java.util.*;
    public class ArrayListGenericDemo {
    public static void main(String[] args) {
    ArrayList<String> data = new ArrayList<String>();
    data.add("hello");
    data.add("goodbye");
    // data.add(new Date()); This won't compile!
    Iterator<String> it = data.iterator();
    while (it.hasNext()) {
    String s = it.next();
    System.out.println(s);
    I got this error. Why generics does not work in eclipse?
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         The type ArrayList is not generic; it cannot be parameterized with arguments <String>
         Syntax error, parameterized types are only available if source level is 5.0
         The type ArrayList is not generic; it cannot be parameterized with arguments <String>
         Syntax error, parameterized types are only available if source level is 5.0
         The type Iterator is not generic; it cannot be parameterized with arguments <String>
         Syntax error, parameterized types are only available if source level is 5.0
         at ArrayListGenericDemo.main(ArrayListGenericDemo.java:5)
    any suggestion would be highly appreciated

  • Can I run a Java based app on an IPAD2 like JMRI Decoder-Pro?

    I have an IPAD2 64GB Wi-Fi+3G. Can I run a JAVA based application known as JMRI Decoder-Pro? It is a Model Railroad suite of control applications that are JAVA based which provide online Train and alyout control via IPHONEs, Droids, Macs etc.

    Hi,
    I don't have an iPad.
    You have posted in the iChat Forum Community.
    iChat does not run on an iPad.
    (ergo: I know nothing).
    Try posting here  (top level of iPad's area)
    8:53 PM      Thursday; June 16, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • 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

  • Can i run java program in the same way of .exe program?

    I am beginner in java and i'd like to know that java program can run in the same of .exe program(double click program icon) , instead of typing "java [class name]" or
    choose execute botton from forteCE.
    Thank you for your help
    [email protected]

    You can write a .bat script which launches the java command for you:
    @echo off
    java <your prog name here>
    Then move your .bat file icon wherever you want...
    bye
    Michele
    Tip: if you don't want to see the black VM window, try javaw instead of java.

Maybe you are looking for

  • Deleted Items Stay in Edit mode?

    When Adding Items to a portal, for instance an Image... and then I want to delete that image... I can delete it so the image no longer shows on the finished page, but the Item still shows in the Edit mode. How do I delete the Item so it no longer sho

  • Backing up two hard drives

    I was using Time Machine to back up the hard drive on my desk top and to back up an external hard drive that contains all of my video work. I erased the hard drive containing the backups and excluded all other hard drives except for the hard drive on

  • Noscript tag - exclusion

    Hello, is it possible to exclude <noscript> tag from generated adf page? Firefox has a problem with it in print preview.

  • DLSW and 4510

    Hi, We are trying to configure dlsw on a Cat4510R switch that is connected to 2 routers for redundancy. DLSW is not supported on the 4500 switches. What is the best way to configure DLSW in this situation?  Looking for configuration assistance. Thank

  • No Image diplay on screen in Safari 4???

    Everytime I load Safari 4, the browser will not display any images. Only text. It load movie files. i cannot figure out why this is happening. Very odd! Would any one have suggestions on how to fix this???