CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    May 2012

    how to run a java program..when the program using jar


    i successfully compiled the java program with
    javac -classpath "D:\Libraries\SQLite_DAL.jar" JavaApplication_KMF_Test.java

    if i am using like

    C:\Users\Srihari\Documents\NetBeansProjects\JavaApplication_KMF_Test\src>java -c
    lasspath D:\Libraries\SQLite_DAL.jar JavaApplication_KMF_Test
    Exception in thread "main" java.lang.NoClassDefFoundError: JavaApplication_KMF_T
    Caused by: java.lang.ClassNotFoundException: JavaApplication_KMF_Test
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: JavaApplication_KMF_Test.  Program will exit.
    but i don't know how to run the program in windows command prompt....

    my program uses sqlitejdbc-v056.jar(driver) and SQLite_DAL.jar(it returns connectionstring .. etc..)... then how to run program...

    sqlitejdbc-v056.jar(driver) and SQLite_DAL.jar(it returns connectionstring .. etc..) both are in same directory "D:\Libraries\"

    and JavaApplication_KMF_Test.class is in "C:\Users\Srihari\Documents\NetBeansProjects\JavaApplication_KMF_Test\src\JavaApplication_KMF_Test.class"
    Last edited by miriyalasrihari; May 17th, 2012 at 07:39 AM.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.