Error running applet within a jar

I compile the jar files together with the smack.jar and smackx.jar and then signed the applet
try to run with this code for my HTML file
<html>
<head>
<meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta HTTP-EQUIV="Expires" CONTENT="-1">
<title> Applet Test</title>
</head>
<applet code="chat\chat\ChatApplet" archive="chat.jar" width=600 height=400>
</applet>
</html>it prompts me to run the application, I select 'Yes' and it give me this load of error
Java Plug-in 1.6.0_06
Using JRE version 1.6.0_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\blah
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
java.lang.NoClassDefFoundError: chat/chat/ChatApplet (wrong name: chat/ChatApplet)
     at java.lang.ClassLoader.defineClass1(Native Method)
     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.access$000(Unknown Source)
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadCode(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)

java.lang.NoClassDefFoundError: chat/chat/ChatApplet (wrong name: chat/ChatApplet)The above says you use chat/chat/ChatApplet but it should be chat/ChatApplet.

Similar Messages

  • Error running applet, java.lang.UnsatisfiedLinkError: enableModeless

    hi guys
    I write an applet with JDevloper 3.1 using Oracle's B4J to connect to oracle 8.1.5. In Jdev all works fine. After deploying with the wizard to a webserver und running the applet using JRE 1.2.2 i got the following exception:
    Opening http://test.woow.at/awork/oracle/dacf/control/ResTable_de_DE.class no proxy
    Opening http://test.woow.at/awork/oracle/dacf/control/ResTable_de_DE.properties no proxy
    Opening http://test.woow.at/awork/oracle/dacf/control/ResTable_de.class no proxy
    Opening http://test.woow.at/awork/oracle/dacf/control/ResTable_de.properties.class no proxy
    Opening http://test.woow.at/awork/borland/jbuilder/addin/VersionedAddin.class no proxy
    java.lang.UnsatisfiedLinkError: enableModeless
    at sun.beans.ole.OleEmbeddedFrame.modalityPushed(Unknown Source)
    at sun.beans.ole.ModalityListenerImpl.modalityPushed(Unknown Source)
    at sun.awt.windows.WToolkit$ModalityListenerList.modalityPushed(Unkown Source)
    at sun.awt.windows.ModalityEvent.dispatch(Unkown Source)
    at sun.awt.windows.WToolkit.notifyModalityChange(Unkown Source)
    at sun.awt.windows.WDialogPeer.show(Unkown Source)
    at sun.awt.Dialog.conditionalShow(Unkown Source)
    at sun.awt.Dialog.show(Unkown Source)
    at oracle.dacf.control.swing.LoginDlg.show(LoginDlg.java:503)
    at oracle.dacf.control.swing.LoginDlg.showDialog(LoginDlg.java:488)
    at package6.Applet1.init(Applet.java:290)
    at sun.applet.AppletPanel.run(Unkown Source)
    at java,lang.Thread.run(Unkown Source)
    any idea, thanx a lot
    Armin

    Armin,
    I haven't seen this one before.
    Is your browser set to run with German locale?
    Here is my standard reply for problems with applet deployment in 3.1. It is probably the case that some classes available in the JDeveloper environment were not deployed to your web server environment.
    Applet Deployment for JDev 3.1
    Deployment issues for client and server:
    1. Make sure you have the JDK 1.2 plugin installed on the client.
    2. If your webserver and database are not on the same machine, you will have to configure your applet
    differently, or install the Net8 Connection Manager. See the Oracle JDBC Developer's Guide for more
    information (exact location of applet info depends on which version of the DB).
    Creating your Applet within JDeveloper:
    1. Create a new workspace.
    2. Create a new Business Components project. You will define your data model and business logic in this
    project. This is effectively your middle tier, but can be deployed to any tier you choose. In this
    project you will use the Business Components wizard to create:
    a. entity objects for each of the tables/views you want to develop against
    b. view objects (and optionally view links, associations) for each of the entity objects or
    combination of entity objects
    c. application module(s) to represent your data model(s)
    3. Save and build your business components project.
    4. Create a new empty project to contain your applet code.
    5. Launch the Infobus DataForm wizard to create your DAC applet. Choose the app module you created in
    step 2 as a data source. (Alternately, you can create the applet from scratch using the controls and
    binding your sessioninfo object to your app module).
    Deployment Steps within JDeveloper:
    1. Deploy your business components project.
    a. decide how you will deploy your app module (local, visibroker, etc.)
    b. if you decide to deploy in local mode, use the Deployment Profile Wizard and choose 'Simple
    Archive', including all of the business components project's XML and .JAVA files in the archive.
    c. if you will deploy to visibroker, see the online help for deploying your business components,
    and see the Release Notes for additional changes you need to make to your applet project.
    2. (if deploying BC4J project in local mode) Create a library using the archive you generated in Step
    1. Add this library to your applet project from the Project Properties Libraries tab.
    3. Clear out a directory on your local machine where the deployment wizard can copy everything you
    need to deploy.
    4. Deploy your applet project.
    a. Run the JDeveloper Deployment Profile Wizard and choose the Web Application to Web Server option
    on Page 1.
    b. On page 2, select all of the .class files in your project that make up the applet.
    c. Select all the libraries listed and shuttle them to the selected list. The contents of these
    libraries will automatically be added to your applet's HTML file during deployment
    d. Give the .jar file a name, and run the deployment to generate that jar file.
    e. select the location of the 'clean' directory you created in step 3.
    Deploying to your WebServer:
    1. Copy everything that the deployment process placed in your 'clean' directory to your WebServer.
    If you deployed your BC4J project locally, you will need to deploy the archive file containing your
    business components to the webserver along with all of the other archives.
    2. If you want to put the dependency archives in a different location from the applet's HTML file
    under the webserver root, then you need to set the CODEBASE tag in the HTML file to the (relative)
    location of the archives.
    Troubleshooting:
    1. Try both Netscape and IE. Different Browsers sometimes give different errors and one might be more
    helpful/indicative of the problem's source.
    2. Use the Java Console to get a more detailed stack trace. For Netscape, choose
    Communicator->Tools->Java Console.
    References w/in Oracle -
    JDBC Developer's Guide
    Net8 Admin Guide
    Referenc es outside Oracle -
    Borland JBuilder doc: http://www.borland.com/techpubs/jbuilder/jbuilder3-s/pg/applets.html
    JavaSoft Plugin Download: http://java.sun.com/products/plugin/
    JavaSoft Applets Resources Page: http://www.javasoft.com/applets/index.html
    null

  • Error running Applet

    I am getting an error
    Can't find resource for bundles sun.applet.resources.MsgAppletViewer,
    key appletpanel.badattribute.exception
    while running applet.
    How can I solve it?

    Some thing is amok here.
    Your AppModule is beginning to be created.
    Some property values are being determined -
    I think your property file is missing -
    property values are defaulted. (0/null/...)
    Your applet seems to be crashing with the
    null property values recieved.
    I think you are missing one of your deployment files.
    Are you sure you can 'Test' the application module in it's own project (Right click on <Name>Module in your project and select Test.
    I hope this helps,
    -John
    null

  • NoClassDefFound when running applet from a jar

    I have a project defined in Oracle JDeveloper 3.2 which runs fine with the appletviewer. However, when I create
    a JAR of the project (including all the libraries), Netscape gives me this error.
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleConnection
    at java.lang.ClassLoader.resolveClass(Compiled Code)
    at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled Code)
    at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at Silly.myApplet.dbConnection(Compiled Code)
    at Silly.myApplet.doSqlQuery(Compiled Code)
    at Silly.myApplet.jbInit(Compiled Code)
    at Silly.myApplet.init(Compiled Code)
    * at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    The class oracle/jdbc/driver/OracleConnection is in the JAR, as are the two called classes it claims not to find in these errors:
    # Verifier error oracle/jdbc/dbaccess/DBError.throwBatchUpdateException(Ljava/lang/String;Ljava/lang/String;II[I)V: Cannot find class java/sql/BatchUpdateException# Verifier error oracle/jdbc/driver/OracleConnection.initialize(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Loracle/jdbc/dbaccess/DBAccess;Ljava/util/Hashtable;)V: Cannot find class java/util/Map
    I would appreciate any help.
    TIA.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleConnectionI can think of a handful of reasons why you are getting that error message. But, let's see your html file, just that portion that deal with the <APPLET>, <OBJECT> and <EMBED> tags. I'm particularly interested in how you specify the jar file(s). Are you doing it this way:
    <APPLET CODE="myApp" CODEBASE="." ARCHIVE="myApp.jar,Oracle.jar" WIDTH=100 HEIGHT=100></APPLET>
    I am assuming that oracle libraries are in a jar file, are you putting that jar file inside of your jar file -- that would never work. If that's what you did, you must either extract the contents of libraries jar and then jar them together with your class files or keep the jar separate and use a manifest to specify the CLASSPATH.
    V.V.

  • How to run applet within packages in tomcat

    I have servlet packages and applet packages in my application. I can successfully called my servlet packages by using:
    http://localhost/servlet/mypackage1.mypackage2.myServlet
    However, I can't call my applet packages by using:
    http://localhost/myapplet.html
    <Applet
    CODE = "myApplet.class"
    BASECODE = "mypackage1.mypackage2/"
    </Applet>
    I am currently using tomcat default web services directory structure as follows:
    webapps\ROOT\WEB-INF\classes\mypackage1\mypackage2\myServlet.class
    webapps\ROOT\mypackage1\mypackage2\myApplet.class
    I received the following error:
    noClassDefFoundError:myApplet (wrongname: mypackage1\mypackage2\myApplet)
    Thanks in advance for any helps.

    This doesn't have anything do with servlets. Your
    problem, as you said, is how to write the HTML to run
    an applet. Whatever is trying to load that HTML
    doesn't know anything about your servlets and doesn't
    care. I think it is complaining because you did or
    didn't put your applet in the (badly-named) package
    mypackage1.mypackage2.The package names I used was just an example. My real package names were really long and 10 levels deep so I didn't want to use it. I finally figured out how to tell the browser to find my applet class package. Using my original example (with the bad package names):
    <Applet
    CODE = "mypackage1.mypackage2/myApplet.class"
    </Applet>
    I removed the codebase and just put the package class file in the root directory.
    I am sure there are more than one way to make this thing work but this is how I got my to work. Thanks.

  • Why does running an applet within a portlet not work?

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

  • Loading applet for a jar within an ear

    Hi,
    Apologies if my question sounds ignorant, this is the first time i'm playing with applets.
    I'm trying to load an applet from a JAR (applet.jar) which contains all the files specific to the applet. The applet.jar resides within an ear (application.ear) which is deployed on JBoss.
    The applet related stuff is in the package com.dms.applet (which makes up the applet.jar)
    My index.html resides in a war file (webapp.war), which essentially contains a bunch of servlets. Index.html is a two frame page, which tries to load the applet in one frame and a servlet in another (servlets work fine).
    My <APPLET> tag for the frame in which the applet is displayed (is another html file - applet.html) looks something like this:
    <html><body>
    <APPLET
         code="com.dms.applet.NavigationApplet.class"
         codebase=./"
         archive="applet.jar, application.ear"
         width=200
         height=500
    >
    </APPLET></body></html>
    however, the applet always fails to load, i get the following exception when i open the java console:
    java.lang.ClassNotFoundException:
    com.dms.applet.NavigationApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    load: class com.dms.applet.NavigationApplet.class not found.
    java.lang.ClassNotFoundException:
    com.dms.applet.NavigationApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    It seems evident that the applet class loader can't find my applet.class and hence can't load it. I guess that its something wrong with my <APPLET> tag, but can't quite seem to get my finger on it. Do i need to explicitly tell the class loader to look for it in the applet.jar which is in the applicatin.ear?
    Any help would be very much appreciated.
    Thanks in advance
    EnterpriseJavaBones

    Hi,
    I managed to fix this problem. For those who mite come across the same issue in the future, this is how i did it.
    I put the applets code in the war file under an applet dir. That the the index.html is in the root (of the war dir) and the applets code is in a /applet dir.
    Hence the codebase simply reads, codebase="applet/"
    Cheers
    EnterpriseJavaBones

  • Runtime error in Applet only appears when running through IDE applet viewer

    Java 5.0
    Netbeans 4.1
    Linux (Suse 9.3)
    I only started getting this error when I set the data loading and initialization classes into a separate thread. (the data loading and init is currently just using dummy test data within the class, nothing is loaded from external files as of yet)
    Exception in thread "J3D-MasterControl" java.lang.NullPointerException
            at javax.media.j3d.SoundScheduler.activate(SoundScheduler.java:714)
            at javax.media.j3d.MasterControl.viewActivate(MasterControl.java:2539)
            at javax.media.j3d.MasterControl.handlePendingRequest(MasterControl.java:3032)
            at javax.media.j3d.MasterControl.doWork(MasterControl.java:2956)
            at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)This error only comes up about 50% of the time, and only when I run it within the IDE applet viewer. I've never gotten this error when I run it from a web browser (tested with IE, Firefox and Opera).
    Is this an error I should be worried about, since it only comes up within the IDE?

    Chana_R wrote:
    Thanks for the reply. I am new to this topic area (though pretty good a programming in general...), so forgive me the query below is offbase.
    The applet is unsigned. For what it is worth, the applet code and the database are stored on the same machine. However, I can see where a client running the applet is a remote user and so the system may view this as a different source of code (IP/DNS).User has nothing to do with it.
    >
    I am currently to the point I can run the applet on my own server's browser, but cannot access the applet via a remote browser. I get an java.lang.NullPointerException
         at JdbcTest.init(JdbcTest.java:40)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Would this be typical of the problem you describe?
    No. You will get an exception for the problem I discussed. The problem you have suggests either something else is wrong or you are eating an exception and then attempting to continue.
    And secondly, what is a reasonably safe (and yet free!) method to deal with this? Is there a way to handle through java.policy or should I sign the applet? I've never worked with signed applets...but I can certainly start reading up on the topic...Signing the applet is easier in terms of distribution. Policy change is quicker if you are just messing around or if you have a very limited distribution target.

  • Applet inside a JAR: Cannot access other classes within the JAR

    Hello,
    Description
    Web app + applet (packaged in a JAR)
    I have followed this tutorial
    JAR contents
    package mypackage
    SimpleApplet.class
    SimpleObj.class
    _"SimpleApplet" uses "SimpleObj"_
    package mypackage;
    public class SimpleApplet extends JApplet {
        @Override
        public void init() {
            SimpleObj obj = new SimpleObj();
    HTML code
    <applet archive="SimpleApplet.jar" codebase="." code="mypackage.SimpleApplet.class" width="800" height="600" />
    SimpleObj cannot be found (Java Console)
    java.lang.NoClassDefFoundError: mypackage/SimpleObj
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(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)
    Caused by: java.lang.ClassNotFoundException: mypackage.SimpleObj
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 8 more
    Caused by: java.io.IOException: open HTTP connection failed:*http://localhost:8080/SimpleApp/mypackage/SimpleObj.class*
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 12 more
    Exception: java.lang.NoClassDefFoundError: mypackage/SimpleObj
    It looks like JRE does not search for the SimpleObj class inside the JAR, but tries to get it from the server...
    Any ideas?
    Thanks in advance,
    Gerard
    Edited by: gsoldevila on Dec 10, 2008 2:05 AM

    misread, deleted
    Edited by: atmguy on Dec 10, 2008 1:12 PM

  • Applet won't run if put in JAR file

    Hello, I've searched a lot and couldn't find an answer to my problem -
    I want to put my applet into a jar file. and run it, of course.
    I have a jar file that contains "b.class", "temp.class" both of them in directory "package_name", which is their package's name in eclipse. (this jar I obtained by using export from eclipse).
    and - I have my index.html file -
    <APPLET
    CODE="b.class"
    ARCHIVE "jar_file.jar"
    WIDTH="100%" HEIGHT="90"
    </APPLET>
    both the index.html and the jar file in the same directory.
    and the applet wont run!
    what am I doing wrong? somehow I think that the problem is because the classes reside in another directory in the jar file,
    but I already tried everything - with no success :(
    Kogan.

    OK the problem solved -here is highlighted what I was missing -
    <APPLET
    CODE=package_name.b.class ( I was missing the "package_name")
    codebase = "."
    ARCHIVE "jar_file.jar"
    WIDTH="100%" HEIGHT="90"
    </APPLET>
    Edited by: Kogan on Nov 3, 2008 6:51 AM
    Edited by: Kogan on Nov 3, 2008 6:52 AM

  • Run from within JAR

    I have a java program which runs an external executable. I would like to include this executable in my jar file and have my program be able to find it. Basically I want to be able to say: java -jar MyProgram.jar and not have to have the external executable outside of the jar.
    I've tried just putting the exe in the jar, but that doens't seem to be doing the trick. Any ideas?
    Thanks.

    runs an external executableI assume that you are using Runtime exec() to run the program.
    Does your OS know how to find and execute a program that is within a jar file? If it has a syntax for that, then use that syntax. Otherwise you need to have the executable where the OS can find it. On some PATH.

  • Run a jar-File and modify a file within this jar-File

    I am running the jar-File, which contains my compiled java files etc.
    The program has a config part, which is saved in xml file.
    This xml file is in the same directory like the class files.
    All theses files are zipped as jar-File.
    Well, I am running the jar file.
    - But how do I open and save the xml file ?
    - Is that possible ?
    - How difficult ist that ?

    I tried to do this some time ago and found out the hard way that you can't, just as DrClap just told you. I would have taken his work for it anyway, but for what it's worth, I thought I'd mention that you're not alone. In my case I wanted to be cute and keep my properties all together within the .jar; thought it'd be cleaner that way. Ended up just creating the more typical class_name-props file in my home directory. Is this what you had in mind?
    ~Bill

  • Making mysql jar run within my jar

    I have a programme which uses a mysql driver
    Now I cannot use it outside of eclipse.
    My jar looks like this
    /META_INF/MANIFEST.MF
    /com/bis/converter (Package)
    /lib/mysql.jar
    my Manifest looks like this:
    Manifest-Version: 1.0
    Name: com/bis/converter
    Main-Class: com.bis.converter.CsvPresentationWindow
    Class-Path: ./lib/mysql.jar
    what am I doing wrong. He just says class not found exception with the driver

    Ok I got it,
    first I thought, that the lib folder needs to be within the jar file!
    Now I have the lib-Folder outside the jar within my execution folder and it works!

  • Problem while I try to run Applet using Appletviewer

    Hi,
    I have developed a simple Applet using JDeveloper 1.1, here I am
    using a Dataset, a QueryDataSet and a grid.
    When I run the Applet within JDeveloper it runs just fine, but
    when I use the Appletviewer, the Applet starts of well but gives
    the following error:
    "borland.jbcl.dataset.DataSetException: Operation cannot be
    performed on an open DataSet"
    Please let me know what I am doing wrong.
    Thanks,
    Prag.
    null

    This may be a problem with JDK inconsistency problem. Make sure
    your appletviewer IS Java 1.1 compliant. Also, have you properly
    deployed your applet to a jar file?
    Here are the instructions for deploying a database applet:
    Hope this helps..
    -Chris
    Task 7: Deployment
    The following requirements apply when deploying a database
    applet:
    The database must be on the same server as the Web Server (or use
    a connection manager).
    Must have a JDK 1.1 compatible browser, such as Netscape 4.0.4 or
    Internet Explorer 4.0.
    Creating the Java Archive (.jar) file
    Select File|New
    Click the Deployment tab
    Double-click the Simple Archive Profile icon.
    The Simple Archive Profile wizard (SAP wizard) is displayed.
    On the Welcome page, click Next.
    On page one of the SAP wizard, enter or browse to set the Archive
    Path. Set the name of the jar to db_applet.jar.
    Click Next.
    Page two displays the names of all files in your project. Accept
    the default value of deploying all of the files and click Next.
    On page three, Dependencies, shift-click each item in the list
    "List items that you do not want to appear in the archive to
    select them all.
    Click Remove.
    In most cases, developers prefer to ship only their own classes
    in the .jar file, with separate .jars that store common files
    used by all of their Java programs. For the sake of simplicity,
    you are going to create a .jar file that includes all of the
    classes necessary to run your applet. By removing all of the
    libraries, you indicate that no classes should be omitted from
    your deployed .jar file.
    Click Finish.
    Deploying the applet
    Using a file manager, copy the db_applet.jar file you have just
    created to the Web Server.
    Copy the tutorial.EmpApplet.html file to the same directory as
    your .jar file.
    The tutorial.EmpApplet.html file can be found in the project
    directory (by default, the \myprojects directory under the
    JDeveloper root directory) or you can extract the file from the
    .jar using any PK-ZIP compatible file compression utility.
    Using any text editor, modify the <APPLET> tag in the
    tutorial.EmpApplet.html file to include an ARCHIVE tag that
    references your .jar file. Your <APPLET> tag should include this
    information:
    <APPLET CODEBASE = "." CODE = "tutorial.EmpApplet.class"
    NAME = "TestApplet" WIDTH = 400 HEIGHT = 300 HSPACE
    = 0 VSPACE = 0 ALIGN = middle ARCHIVE =
    "db_applet.jar">
    To test the applet, open the tutorial.EmpApplet.html file through
    a web server using a Java 1.1 enabled browser.
    Congratulations! You have completed your first database applet.
    You created a program that queries data from Oracle tables,
    displays the data in data-aware controls, allows for viewing and
    editing, displays status messages to a StatusBar, and includes a
    NavigatorControl component.
    Prag Ratra (guest) wrote:
    : Hi,
    : I have developed a simple Applet using JDeveloper 1.1, here I
    am
    : using a Dataset, a QueryDataSet and a grid.
    : When I run the Applet within JDeveloper it runs just fine, but
    : when I use the Appletviewer, the Applet starts of well but
    gives
    : the following error:
    : "borland.jbcl.dataset.DataSetException: Operation cannot be
    : performed on an open DataSet"
    : Please let me know what I am doing wrong.
    : Thanks,
    : Prag.
    null

  • 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

Maybe you are looking for

  • Problem using c:forEach

    I'm having a problem using c:forEach. Eclipse is telling me the problem is with the items parameter, and for the life of me, I cannot see why, since I could swear forEach uses an items parameter. Here is my code and the exception report. Can anyone p

  • HT4623 how to update itunes version on iphone5?

    I recently updated the OS in my iphone5 to 6.1.4. So now when i tried to transfer music from my macbook pro to iphone5, it said iphone should have itunes version of 10.7.1 or higher for the sync. When i tried to update itunes software, by checking if

  • On the apple icon when I click on preferences nothing comes up, what can I do?

    can no longer get Preferences to come up when I am on the Apple Icon but it does show up under the Safari icon what is going on and now I can not dwn load or burn picture to a dvd what am I doing wrong???

  • Unwanted Line Breaks in PL/SQL CODE after 'CREATE OR REPLACE' statements

    Does anybody know how to keep SQL Developer from automatically editing PL/SQL code and adding line breaks after 'CREATE OR REPLACE' statements? It keeps taking: CREATE OR REPLACE PACKAGE DEVELOPER AUTHID DEFINER And turns it into: create or replace p

  • Standard text in Routings - Word documents

    Hi all I want to attach word documents to Standard Routers. I checked the standard text CA10 but did not find a way to upload word documents. I saw an option only for uploading 'ASCII', RTF or RTF files. Is there a way I can attach word documents to