Class not found in applet using 2 jar files

I have an applet which has been working for years as a stand alone or connecting directly to a derby database on my home server. I have just changed it to connect to MySQL on my ISP server via AJAX and PHP.
I am now getting a class not found error in my browser, probably because I'm stuffing up the class path.
The HTML I am using to call the applet is:
<applet code="AMJApp.class"
codebase="http://www.interactived.com/JMTalpha"
archive="AMJ014.jar,plugin.jar"
width="500"height="500"
MAYSCRIPT style="border-width:0;"
name="jsap" id="jsap"></applet>The AMJ014.jar contains the applet and supporting class files.
The error message is strange to me because it refers to a class I noticed on another web page but which has nothing to do with my applet. Anyway, the message in full is:
load: class NervousText.class not found.
java.lang.ClassNotFoundException: NervousText.class
     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: NervousText.class
java.lang.UnsupportedClassVersionError: AMJApp : Unsupported major.minor version 51.0
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClassCond(Unknown Source)
     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.defineClass(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Exception: java.lang.UnsupportedClassVersionError: AMJApp : Unsupported major.minor version 51.0

Thanks again.
The page code is:
<html>
<head>
  <title>Applet to JavaScript to PHP</title>
</head>
<body>
<script type="text/javascript">
function updateWebPage(myArg)
document.getElementById("txt1").innerHTML=myArg;
if (myArg=="")
  document.getElementById("cbxItem").innerHTML="";
  return;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange=function()
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    document.getElementById("cbxItem").innerHTML=xmlhttp.responseText;
xmlhttp.open("GET","putitem.php?id="+myArg,true);
xmlhttp.send();
</script>
<form>
<table border=1 align='center' cellpadding=0 cellspacing=0 >
<tr><td style='text-align:center; background-color:#C0C0C0'>Compiled Java Applet</td></tr>
<tr><td><applet code="AMJApp.class" codebase="http://www.interactived.com/JMTalpha" archive="AMJ014.jar" width="500"height="500" MAYSCRIPT style="border-width:0;" name="jsap" id="jsap"></applet> </td></tr>
<tr><td style='text-align:center; background-color:#C0C0C0'>HTML Textbox filled by JavaScript</td></tr>
<tr><td><textarea style='width:500px; height:50px' name='txt1' id='txt1'>Query goes here</textarea></td></tr>
<tr><td style='text-align:center; background-color:#C0C0C0'>HTML diagnostic messages rendered by PHP script</td></tr>
<tr><td><div id="cbxItem">PHP info will populate this space</div></td></tr>
</table>
</form>
</body>
</html>The URL of the problem page is:
http://www.interactived.com/JMTalpha/AMJTest.htm
The code in the page is based on the following test page, which works:
http://www.interactived.com/test5Applet.htm
And the Applet, before I made any changes can be seen at this address:
http://www.interactived.com/jartest0906.htm
Thanks again for you interest.
Edited by: 886473 on 21-Sep-2011 00:47

Similar Messages

  • Class not found error while executing jar file

    I have written a java code in which i am connecting to database....when i run the class file using......java class_filename it works........
    but when i run the jar file using .......java -jar jar_name ...yi gives me the error as 'Class not found'......
    can anybody help me please......
    Thanks and Regards,
    Siddhesh

    that class is part of jar file.....in classpath i have included zip files for jdbc ...to get databse connection.....and the jar being executed ................still it gives the error ClassDefnotfound which i think is due to database connection problem.....the exception is raised while.....
    Class.ForName("Driver_name").newInstance();/ This driver is present in zip files that i have added in classpath....
    above statement doesn,t giv error while i execute the class file............but exception while executing jar file only..
    Thnaks and regards,
    siddhesh

  • Class Not Found Exception - applet won't run anywhere outside of IDE

    I have an applet that runs perfectly in the netbeans IDE, but won't run from command prompt (I'm using windows) or from a browser. I've been banging my head against the wall for a few days on this one. Here's the HTML I'm using:
    <applet width="400" height="525" code="musicapplet.class" archive="crypticgraffiti.jar">
    <param name="bgcolor" value="ffffff"> <param name="fontcolor" value="000000">
    </param> </param> Your browser is not Java enabled. </applet>
    Here is the structure of the jar file's contents:
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/crypticgraffiti/
    com/crypticgraffiti/music/musicapplet
    com/crypticgraffiti/music/GetNotes.class
    com/crypticgraffiti/music/InstList.class
    com/crypticgraffiti/music/Mode.class
    com/crypticgraffiti/music/MusicCreator.class
    com/crypticgraffiti/music/OctaveTransformer.class
    com/crypticgraffiti/music/Phrase.class
    musicapplet/MusicApplet$playerThread.class
    musicapplet/MusicApplet.class
    (Musicapplet.class is the main class)
    When I attempt to run from command prompt, I get:
    "Error: Could not find or load main class crypticgraffiti.MusicApplet"
    When I attempt to load via html:
    "basic: load: class musicapplet.class not found.
    load: class musicapplet.class not found.
    java.lang.ClassNotFoundException: musicapplet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ClassNotFoundException: musicapplet.class
    security: Accessing keys and certificate in Mozilla user profile: null"
    I have tried every possible variation for the 'code' element of the applet tag (package.mainclass.class, mainclass, mainclass.class, etc). I have also tried compiling with JDK 1.6 and this didn't change anything. I've tried clearing out the cache of temporary files using the java control panel settings, and have verified that my browser can run other applets using JRE 6 and 7.
    I've tried some different ways of distributing the applet, also: putting all the class files in the folder with the html file, putting the classes in a source folder in the same folder as the html file, and finally putting a jar in the same folder as the html file (which really seems the simplest).
    Any help at all would be most appreciated! This applet is a very cool and original music creating app that draws heavily on the JFugue API. It's a shame that I can't get it online for people to play with!

    Cryptic Graffiti wrote:
    Here is the structure of the jar file's contents:
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/crypticgraffiti/
    com/crypticgraffiti/music/musicapplet
    com/crypticgraffiti/music/GetNotes.class
    com/crypticgraffiti/music/InstList.class
    com/crypticgraffiti/music/Mode.class
    com/crypticgraffiti/music/MusicCreator.class
    com/crypticgraffiti/music/OctaveTransformer.class
    com/crypticgraffiti/music/Phrase.class
    musicapplet/MusicApplet$playerThread.class
    musicapplet/MusicApplet.class
    (Musicapplet.class is the main class)
    Please note that class names are case sensitive so "MusicApplet" is not same as "Musicapplet" or "musicapplet". Your applet tag should have fully qualified class name (without quotes) and should look like this:
    <applet width=400 height=525 code=musicapplet.MusicApplet archive="crypticgraffiti.jar">
    </applet>
    The JAR should be in the same directory as your HTML file. While launching from command line, you can also check if your JAR file is getting included in classpath.
    Thanks,
    Nitin

  • Class not found with APPLET

    Hi all,
    I know many have posted about the different version of java plugin will cause some strange behavior of an applet in loading. In my case, it can't load at all. (with plugin version 1.4.1)
    SO anyone find the final solution?
    thanks in advance

    Sorry, not here to offer a solution but to report a similar problem. But in my case, the version is 1.3.0_03 and the error message is "PrintApplet.class not found." which appeared at the foot of the browser. (using WINDOWS 98; I/E 5.5) Can anyone help?

  • Class Not Found Error when using Junit

    Hi
    I am using Junit4.1, Eclipse 3.2.1
    I am getting this error
    Class not found
    start.test.TestPdfGenerationService
    java.lang.ClassNotFoundException: start.test.TestPdfGenerationService
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:683)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:425)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    what would the possible reason for that and how can i come out of it..

    the reason: the class is not in the classpath. Or the project's runtime classpath.
    Make sure it's added to the build path and if necessary exported all the way to your JUnit project.

  • Get list of classes present in an applet's Jar file?

    I have an applet for drawing diagrams, which is bundled in a jarfile together with classes for each type of element in the drawing (e.g. a class for drawing 2-input NAND gates, a class for J-K flip-flops, and so on). When I add a new type of drawing element I have to modify the applet to add the new class to the applet's "Insert" menu to allow the element to be inserted. What I want to do is to search the jarfile containing the applet for any classes derived from DrawingElement and add them automatically to the Insert menu when the applet is inited. I presume this would require using getClass().getClassLoader() to get the class loader that read the JAR file, but from there it would seem I need to know the name of the resource to load. Is there a way of browsing the list of resources in the JAR file?

    AndrewThompson64 wrote:
    That 'modify the applet' is not strictly necessary. The list of menu items and classes might be passed to the applet as applet parameters, or as a property file or XML (or whatever) that defines the available elements.I could do this -- I'm just trying to avoid getting the list out of step with the contents (or if you prefer, I'm just being lazy!).
    Is there a way of browsing the list of resources in the JAR file?Yes and no. You might try this general strategy (untested).
    1) Gain an URL to a resource in the Jar in which the plug-ins exist.
    2) Parse that URL for everything before the '!' symbol to get an URL for the Jar itself.
    3) Get an InputStream from the Jar via URL.openStream().
    4) Get a ZipInputStream by wrapping the InputStream.
    5) Iterate the ZipEntry(s) to identify classes in the correct package, and store them in a collection of some type.
    6) Iterate the collection and check each one for extending DrawingElement, using reflection.
    I am guessing step 6 will require the applet to be trusted.Sounds plausible, and I'll give it a whirl. However, I hadn't thought about the "trusted" bit of this; maybe I can just create new instances and cast to DrawingElement, ignoring any that throw exceptions. I'll have to give it a go and see what happens.
    BTW - once you have the right classes, how do you get the screen name of them? Is the name defined in one of the attributes of a DrawingElement? What prevents name clashes?Plan A: I have a getIdentification() method that returns a string identifying the element, but I have to keep this unique the hard way (by hand).
    Plan B: use the class name with some prettification (e.g. have a class _2_input_NAND_gate which gets displayed as "2 input NAND gate") so that the compiler does the work of keeping it unique. Not sure I like this, though.
    Many thanks for your help.

  • Class not found error while using ikvm error code IKVMC0100: class "javax.b

    hi iam writing a java application which uses bluetoth i.e. javax.bluetooth;
    now i need to create exe for c# i.e. my GUI is C# and business logic is java,
    so these are steps i have followed
    * created a java project (iam using netbeans 6.1)
    * after build i used command prompt and travesed to dist of my project location which contains jar
    * here i typed ikvmc my.jar
    but now it says the following it also contains others but one of such is
    Warning IKVMC0100: class "javax.bluetooth.LocalDevice" not found
    it also creates exe but if use that in my c# then raises the exception...
    so please help me.. what is the solution for this....

    If you have the SDKPanel sample, you have a Flex sample and debugging information. Please let me know (off-forum) what you're buildng, and we'll make sure your dev environment is configured correctly.

  • Class not found error when using javah

    Im just trying to create a simple hello world program using jni however I already got stuck trying to create the c header file when I run the javah program. It keeps telling that the class is not found but the class is in the local directory. Should a classpath be set or are there other things that I am missing?

    You should have a classpath pointing to the local directory.

  • Class Not Found Error while using dcm 9.0.3 jar

    I am getting the following exception while trying to stop an application deployed in oracle 10g app server using dcm utility.Can anyone please help me how to resolve this because it is very urgent for my work to progress
    Thanks in Advance
    04/10/18 07:34:37 A problem has occurred accessing the Oracle9iAS
    infrastructure
    database.
    Base Exception:
    java.lang.NoClassDefFoundError:oracle/ias/repository/SchemaManager
    04/10/18 07:34:37 Please, refer to the base exception for resolution, or
    call Or
    acle support.

    Hi Sujith,
    You should post that question here: Oracle Application Server - General
    - Don

  • Performance issue if we use jar file instead of classes

    Hi,
    My application uses tomcat as web server.
    If i use calsses in webapps -> WEB-INF -> classes folder, i place classes in that ,
    In other case i use jar file and place that file in WEB-INF -> lib folder in the webapps directory.
    There is huge performance difference.
    While using classes performance is great while using jar file performance is very disappointed.
    I am using a file for encryption /decryption also.

    I can't really believe that classes vs jars makes a difference, but whatever.

  • "Java Class not found in classpath" Error in DESIGNER

    Hello All,
    I'm trying to connect in Designer using a JDBC connection to MS SQL Server 2008.  As per the instructions, I updated my jdbc.sbo file with the path to the existing two JAR files.  However, I still get the following error when I try and connect in Designer:  "Java Class not found in classpath : C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc\Drivers\sqlsrv".  Of course, this error includes the drive path with the location to my JAR files.  Any help in resolving this nagging issue is very GREATLY appreciated.  Also, if anyone needs it I can post a copy of the jdbc.sbo file to this thread.
    Thank you,
    Pankaj

    Stratos,
    Your suggestion didn't help.  I tried to connect after restarting my machine and I still get the error.  And, I've also tried adding a connection to MS SQL Server 2005 using this JDBC driver, and that didn't help either.  Any other suggestions?  Would it help to see my "jdbc.sbo" file?  Thanks again for your and everyone else's help, and I look forward to your reply.
    Regards,
    Pankaj

  • Using .jar files

    I was able to use .jar files in Java programs that I write on my computer. I could write a program that used an import statement to bring in classes contained in a .jar file.
    One day, I was trying to incorporate a jar file folder directly into my windows operating system by using the environmental variable called CLASSPATH. Unfortunately, I made the mistake of screwing up my PATH variable. I fixed my PATH variable back up by adding the directory to the bin folder inside of the Java folder as is described commonly by the documentation for installing the Java SE on windows computer.
    Since that day, I have not been able to use .jar files using an import statement. My computer is unable to find the .jar files even if I specify the exact directory. Even the IDE(netbeans) that I use is unable to find and use .jar files. I have found that I can open up .jar files and pull the contents that I need out of said .jar files, but I have a project that does not allow me to open up the .jar files and extract the needed classes.
    I have googled this problem so much that I have read hundreds of posts about .jar files, and I cant find anyone in a situation that is similar to mine. If I take my files to another computer with Java SE installed, then my source code can access the .jar files just fine. For some reason, my work computer seems to hate using .jar files. I have no idea what could be the problem. There is no information in the java documentation on troubleshooting with this problem, and the most confusing part is that it worked perfectly fine until That one day
    Does anyone have any ideas?
    Specific technical details:
    I need to pull the Stopwatch.class file from a stdlib.jar file. In the past I had done this by using an import statement inside of my program:
    "import stdlib.Stopwatch; "
    Using this command to compile:
    "javac -cp .;(directory path to .jar file); source.java"
    This used to work. Now when using the javac command I get error messages
    1. Error points directly to import statement. Arrow directed at the period after stdlib.
    "cannot find symbol"
    2. Error message pointing to all instances of the class that I was attempting to import into my program.
    Thanks for reading
    Edited by: 955611 on Aug 28, 2012 7:22 PM

    I read your post. I want to compile this project by using the "-classpath" option in the javac command. After screwing up important system variables once, I do not want to continually have to play with system variable in order to compile projects. To quote from the website that you linked:
    Using the JDK tools' -classpath option
    The JDK tools java, jdb, javac, and javah have a -classpath option which replaces the path or paths specified by the CLASSPATH environment variable while the tool runs. This is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.
    The runtime tool java has a -cp option, as well. This option is an abbreviation for -classpath.
    For very special cases, both java and javac have options that let you change the path they use to find their own class libraries. The vast majority of users will never to need to use those options, however.
    Clearly, the "-classpath" option in the javac is intended to replace the need to play with important system variables. I guess my post boils down to the question of "Why doesn't this command work for me?". I followed your suggestion by removing the bin directories and adding the stdlib.jar directory directly into the system variable itself. Here is the following output from my command prompt:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Lelo>E:
    E:\>cd Programs\Java
    E:\Programs\Java>javac testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>echo %CLASSPATH%
    C:\Program Files\Java\jre6\lib\ext\QTJava.zip;E:\Programs\Java\stdlib.jar;
    E:\Programs\Java>javac -classpath .;E:\Programs\Java\stdlib.jar; testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>
    I still received the same errors. It seems that even adding the directories into the system variable will not work for me.

  • Class not found: DirectLogic

    I am trying to open an *.lks file developed with 4.0.1
    in Lookout version 5.0 and I am getting the following
    errors from the Compiler.
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(3): error: Syntax error
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(106): error: Class not found: DirectLogic
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(145): error: Class not found: DirectLogic
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(157): error: Class not found: DirectLogic
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(159): error: Class not found: D
    irectLogic
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(106): error: Object is not defined: DLChemical
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(145): error: Object is not defined: DLCitty
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(157): error: Object is not defined: DLControl
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(159): error: Object is not defined: DLPump
    C:\Program Files\National Instruments\Lookout 5.0\thomaswtp010811.lks(0): error: Invalid object pathname: 0
    Does anyone have any ideas as to what may be the problem?
    Regards
    Steve

    FYI, the post can be found a this link:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000007B620000&ECategory=Lookout
    Regards,
    Cyril Bouton
    Applications Engineer
    National Instruments
    Cyril Bouton
    Active LabVIEW Developper

  • "class not found error" and applets ...

    To run an applet inside an html page using the embedded oc4j i have to copy the library containing the applet to the same directory as the html page. Otherwise i get a class not found error....Is there a better way of doing this?
    thanks in advance for any advise
    owen

    Hi,
    you should be able to reference the JAR file from teh HTML tag. If not then this sounds like a bug that should be filed
    Frank

  • Error while using .jar file instead of class file.

    Hello friends,
    I created a java class which are referred and called from other jsp\xml and java files. I compiled this java class and everything is working properly. However, I do not want to use class files but want to use jar files instead. So, I created a jar file of this class file by using the command "jar -cvf jarfilename.jar".I kept the jar file in its respective folder .Also, I removed the class file from its path, just to see that the jar file will work automatically.
    Unfortunately, I am getting an error:
    java.lang.RuntimeException: Component.createComponent(...) Component class not found: <java class path>. I also tried giving the path of this jar file in the classpath. This also does not seem working.
    How to solve this problem?
    Thanks,
    Ranjith M.V
    Edited by: RanjithM.V on May 11, 2008 10:34 PM

    You probably populated the jar file incorrectly.
    A common mistake is to include the path that you had on the classpath, in the jar file.
    So a person will have a classpath like this: /foo/
    And a class in a package bar, like this:
    package bar;So that other classes would include the file like this:
    import bar.TheClass;And the class file is on the filesystem like this:
    .../foo/bar/TheClass.classThen they'll create the jar file including the foo directory, so if they list the jar's contents, they'll see the above (/foo/bar/TheClass.class). But this is wrong. It should start off so that the jar entries start with the top-level package names (like /bar/TheClass.class).
    Maybe you've done that.

Maybe you are looking for