Publishing .jar file

hi,
i am using oracle lite 10gR3 with 10g database.i have downloaded a client before publishing new application files which includes a .jar file which has to be downloaded in the bin folder.i did the following steps
i have copied the .jar file into the below location
Olite10g_1\mobile_oc4j\j2ee\mobileserver\applications\mobileserver\setup \common\win32
i have edited the bos.inf file and added the following entry
<item>
<src>/common/win32/poi-3.6-20091214.jar</src>
<des>$APP_DIR$\bin\poi-3.6-20091214.jar</des>
</item>
now i am not getting the .jar file when i perform sync but when i do fresh client setup and datadownload the .jar file is getting downloaded into the bin folder. Is there anyway to get the .jar file during sync process.

Does the jar need to be in your bin directory? You could use the packaging wizard.
You can create a patch. See the patch files for Oracles Patches and they provide the clues. (i.e. version # in the patch inf has to be greater then the version # in the polite.ini on the client)

Similar Messages

  • Application works in jdeveloper but not as standalone jar file

    Hi All
    We have developed an application using BI Publisher APIs,it works as expected through JDevelper,however when I try to deploy it to a jar file a run it through command line it gives me No class found exception for
    javax/xml/rpc/Service class factory.. thinking that the class is not present.I have extracted the jar file but could find the class file in the expected directory........anyhelp would greatly be appreciated.
    Regards
    Venkatesh

    Hi Venkatesh,
    Few questions.
    1. What is your JDeveloper version? (Always better to post your JDev version along with the question, which would help us to help you better).
    2. Did you try adding webserviceclient.jar to the classpath? (Search in your JDev installation directory for the location of this jar file).
    -Arun

  • Images not getting Loaded while running Java Application through jar file

    Hello Friends,
    I have a problem while starting my application.I have written my application using pure java.There is no JSP or anything just pure swings.Mine is a standalone appplication.So i used to run it using a batch file.And when i used to start my application it used to not show me the images.so what i did was i mentioned the starting directory in the properties of the batch file (ie in the start in column field).But that was when i was using weblogic server.And i have lot of people working on the same application.so i used ZAC publisher in weblogic and along with that i used to publish the batch file also.so the users dint have any problem.But now what is my problem is i m trying to use JAVA Webstart instead of weblogic ZAC.Now in webstart what happens is that i have to run the appliaction thru jar file.so where do i mention the class path so that the images get loaded.As of now the imaes are not getting loaded.i feel this is a class path problem.but where do i mention it that is my problem.It would be really helpfule if someone could help me out.
    thanx and regards,
    [email protected]

    try out this
    ImageIcon img1=new ImageIcon(this.getClass().getResource(imagename));
    for exmaple
    Imageicon img1=new ImageIcon(this.getClass().getResource("name1.jpg"));
    dont 4get to include the image files in the jar file

  • Loadjava resolves jar file but classes are not showing up in user_objects

    Hello, oracle noob here,
    I'm loading a vendor's jar file in oracle with loadjava with the -v -f -r flags and the classes I need and I see them either getting resolved or skipped:
    c:\loadjava -r -f -v -genmissing -u "uid/pwd@mydbatrain" ekahau-engine-sdk.jar
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0 Thinking everything went well I ran my routine to call EConnection but I get a NoClassDefFoundError on that call, which tells me that the aurora JVM can't find the class.
    After chasing my tail with the server's CLASSPATH, it dawns on me that it should already be in the user_objects table since loadjava should have put it in there.
    But when I query user_objects to see if EConnection is in there,
    SQL> column object_name format a30
    SQL> column object_type format a20
    SQL> select object_name,object_type, status from user_objects where object_name like '%ekahau%';
    OBJECT_NAME OBJECT_TYPE STATUS
    com/ekahau/common/sdk/EMsg JAVA CLASS VALID
    com/ekahau/common/sdk/IMsg JAVA CLASS VALID
    com/ekahau/engine/sdk/Asset JAVA CLASS VALID
    com/ekahau/engine/sdk/Device JAVA CLASS VALID
    com/ekahau/engine/sdk/Event JAVA CLASS VALID
    com/ekahau/engine/sdk/Location JAVA CLASS VALID
    com/ekahau/engine/sdk/Model JAVA CLASS VALID
    com/ekahau/engine/sdk/ModelMap JAVA CLASS VALID
    com/ekahau/engine/sdk/TagMenu JAVA CLASS VALID
    9 rows selected.
    SQL> It's not there along with 104 other class I thought it loaded
    I picked up the idea of running java inside oracle from an OCP and I can run a simple isolated java program myself and even make database calls.
    But it seems I didn't get all the knowledge i need when it comes to loadjava and getting a jar files classes into user_objects to be useful.
    Can anyone help an oracle noob with loadjava?

    Thank you, Gary.
    I updated the post with the version info. I did not explicitly install this JDBC driver, so whatever the OSD came with?  Unless it is using whatever is installed on my machine, in which case would be the thin driver.
    I did check out that post, and I appreciate you sharing it. I did click the 'include synonyms' filter, but behavior remained unchanged.
    I would prefer to use OSD, and that is what our dev team was expecting to use, but we just can't see the information.  We are using an ID that does not 'own' those tables, per se.  But, why would DBVisualizer show these tables, when OSD does not?

  • Protecting the jar files from being web access

    I have a jnlp file which is put under tomcat webapps folder, say (\webapps\TEST\launch.jnlp), with the jar and lib files put in the subfolder (\webapps\TEST\folder1\*.jar AND \webapps\TEST\folder1\lib\*.jar).
    My question is how can i prevent user from direct access to the jar files via typing http://www.someip.com/TEST/folder1/main.jar ? I tried the following methods but it seemed not working:
    1. Change the folder permisson in \webapps\TEST\*.*, but when user type the above hyperlink they can still get the jar file
    2. put the jar and related files under \WEB-INF\, but now this time running the launch.jnlp, it returns an error saying that it can't access/find the WEB-INF.
    Is there any method? Or should I say, when you published jnlp to web, the related jar files are forced to be accessed by everyone.

    Sounds easy to me: encrypt your xml, then instead of just storing your key as plain bytes do some reversable operations on it (xor masks, reversions, whatever you like), just do them in many different points (and classes) of your code, have some parts done by methods that actually check application is running under JWS with proper codebase, scramble it all, and suddently the whole stealing operation won't be worth the effort. Obviously you should have many private (and package protected) methods, seal packages and so on. Maybe, somehow, you can even use reflection to identify calling classes (not sure, never looked for anything similar).
    What else? write down some c++ code into your own dll/JNI library and make it do something too, so they'll even need to decompile the dll. If you know first execution is always online you can send another xor key and store it with persistence service or write it down to windows registry. You can keep making it harder as much as you like, even just with silly code like
    Math.ceil((new GregorianCalendar.getField(Calendar.YEAR)%2000)/1000)*((int)('c'-'a'))just to retrieve the number 2. If you distribute such code through many lines and methods, once you scramble it, most people will give up.
    Bye.

  • Classpath and 3rd party jar files

    We have been searching for a long time and have not been able to find an answer to our question. Do you think that you could help us out?
    We need to include 3rd party jar files in our application. Where in the deployment classpath directory structure can we place these. This does not seem to happen when we publish.
    We also need to give our clients the ability to modify our configuration. Currently we do this with an xml file, which we place under server/config in our JBoss directory. We also need to find a home for out log4J configuration file.
    Where does this type of thing exist in the SAP world?

    We have had problems with 3rd party jar files also. We ended up including them in the WEB-INF/lib directory of our WAR file and packaging/deploying them everytime.
    If you are looking for your project on your server, it is deployed to a directory similar to this:
    /usr/sap/J01/JC00/j2ee/cluster/server0/apps
    Hope this helps.
    Chris

  • No media in JAR files ????????

    But what the heck were you thinking ?
    [http://javafx.com/docs/articles/porting-guide-javafx1-3.jsp]
    MP3
    MP3 files can no longer be loaded directly from .jar files. See JavaFX FAQ Section 5.3 for more information. [http://javafx.com/faq/#5.3]
    *5.3 Can I include media in my JAR file?*
    No. Distributing media in JAR files is not efficient and is therefore not supported at this time. However, explorations of this capability for small media files (such as short audio/video clips) might lead to this support in the future.
    Media files tend to be large, so you'll want to carefully consider how to distribute media content to your audience. You don't want users to wait for long periods of time while downloading files, for instance, which would certainly be the outcome for media packaged in the JAR. Also, as media files are already compressed, packaging them in additional compressed formats like .zip or .tar files can actually result in increasing the file size.
    You are strongly urged to leverage the streaming capability in JavaFX technology. Because JavaFX Media supports streaming audio/video, you can achieve very short download times (for just the application) and take advantage of the streaming capability to play media content. The streaming capability will result in much higher performance and improved usability of your applications.I think somehow you forgot to realize that the entire planet IS NOT connected 100% of time to fast speed internet and that we cannot afford to have our application stream media on the fly every time or on the first launch (and find a hack to store them locally).
    We've already having as much trouble as possible trying to figure out how to deploy/distribute a real desktop or pure-offline JavaFX app with the runtime distribution issue (of which nothing was fixed in 1.3) without additionnal "stay online all the time" burden.
    Additionnaly as this seems to only apply to the classes from the JavaFX API, it seems nothing prevents us from embedding the media in the JAR and using some Java+classpath code to extract them locally.
    So in the end it looks more like some legal mumbo-jumbo side-effects put in place to prevent the Java store from beeing sued because some people put illegal video and musics in their apps stored over there that the very idiotic published explaination which is basically just BS (sorry).

    +1
    Not allowing to embed resources (MP3 are resources like icons or images or text files) is stupid and handicapping, particularly for small sound effect files we use in games.
    Another step away from using JavaFX on (unconnected) desktop... :-(

  • Loadjava to load jar file.

    hi all,
    i created a jar file 'hello.jar' with the contents as 'hello/HelloName.class'
    here, hello is the package and HelloName.class is a Java Class.
    the jar i created with un-compression mode. so the Class file size is same in jar file and out side of jar.
    i tried to load the jar using, loadjava, here is the syntax.
    bash-3.00$ loadjava -u user/password -v /export/home/oracle/javaSrc/hello.jar
    arguments: '-u' 'spboardv2/***' '-v' '/export/home/oracle/javaSrc/hello.jar'
    creating : class hello/HelloName
    loading : class hello/HelloName
    Classes Loaded: 1
    Resources Loaded: 0
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    it seems no errors.
    when i checked in USER_OBJECTS table,
    i found the record 'hello/HelloName' as OBJECT_NAME but the STATUS is 'INVALID'.
    Please help me how to get this.
    thanks in advance.
    regards
    pavan.

    Hi,
    got the solution for this.
    in loadjava options, there is an option '-r' or '-resolve'.
    if we used this option for loading .java file, the source will get compiled and Class file will be resolved and stored in Oracle.
    if we used this option for .class file or for .jar file, the class file will be resolved and stored in Oracle.
    loadjava -u scott/tiger -r path/Hello.class
    loadjava -u scott/tiger -r path/hello.jar
    Here, resolving means, it will check each and Class file(s), for all imports. If all other Classes exists in CLASSPATH, it will load the class and the STATUS is VALID. if it failed to load any imports, the status is INVALID and means, need to set CLASSPATH.
    now, i'm struggling how to set CLASSPATH for loadjava.
    regards
    pavan.

  • Protecting your jar file from been extracted

    Please i noticed that the java jar file of a software can easily be extracted to review the class files with winrar which allows just anyone to have access to your class file and decompile to get source codes, allowing pirating of the software. How can I lock the jar file to prevent extraction of my class files.

    1. why are you mocking others instead of answering the question ? some one wants to protect his jar file. the solution is simple.
    2. you can use google to search, here is result :
    http://stackoverflow.com/questions/1280702/protecting-java-jar-files-for-distribution
    http://stackoverflow.com/questions/9633455/how-to-protect-a-jar-file-from-being-decompiled
    http://www.thegeekstuff.com/2008/06/protect-your-java-code-from-reverse-engineering/
    http://answers.google.com/answers/threadview/id/431511.html
    http://stackoverflow.com/questions/1879061/how-to-protect-java-codes-against-decompiler
    http://viralpatel.net/blogs/2009/07/protect-java-code-decompilation-using-java-obfuscator.html
    http://www.coderanch.com/t/430716/java/java/Protect-class-file-not-decompile
    http://stackoverflow.com/questions/7324708/are-jar-file-insecure-what-can-done-apart-from-code-obfuscation
    http://stackoverflow.com/questions/3647255/how-do-i-copy-protect-my-java-application
    http://www.javaworld.com/javaworld/javatips/jw-javatip22.html
    http://stackoverflow.com/questions/12088/do-you-obfuscate-your-commercial-java-code
    3. it is true if you can use basic methods that EJP mentioned, there would be no need for obfuscators, nor native library use.
    but there are many situations that you can't do any of those methods.
    4. EJP claims that he probably is the one "who have had perhaps 40 times as long as you've had to think about it."
    here is the problem that made me use both obfuscation and native library :
    My company released a simple java library that scanned a document (directly from scanner or camera device).
    the documents were exam papers.
    Use some OCR techniques to convert image to text so some other application could calculate the score using it's api.
    For marketing purposes, the company needed to publish a 7-day trial version of this library.
    So, as you can see I'm eager to hear what you want to suggest.

  • Now what? Help with .jar files

    Hey. I just finished a program. I want to share it with my friends or anyone else. I can create a .jar file but I have no idea what to do next. Is there an easy way to "publish" your programs (like create a .exe file?). Any help or ideas would be appreciated. Thanks, Merlot14

    java -jar MyFile.jarwill work if you've set your manifest correctly. If you're distributing only to Windows users, you could include a shortcut, I believe. Similarly, for distribution to Linux/OS X users, you could include a shell script.

  • Deploying jar file in Oracle 9i lite SDK

    Hi,
    I have packaged my application into a jar file. How can I deploy it in my development environment. I want to use it with Oracle 9i Lite webtogo SDK.
    Thanx,
    JE

    JE
    I am not sure why do you want to deploy in SDK after publishing and synchronising the same, if I understand your question correctly.
    Let me tell you how we are doing.
    1) create the jar files(application) using wtgpack.exe and publish it.
    2) This jar may not contain the java business objects etc other than database objects, some files.
    3) Synchronize the database. Get the Lite database(ODB file).
    4) if you have any stored procedures(upload it now by running batch files or by any means)
    5) Deploy your Java objects(Java beans,JSPs,servlets etc) in your app server(Tomcat or OC4J). Run the application as we do against Oracle enterprise.
    Yugandhar

  • Artifact harvest failed due to: Unexpected error import: Invalid jar file

    Hi,
    i am trying to submit the .biz and .proxy file to OER using Eclipse,
    but i am getting the following error,
    can anybody help me on it,
    what i am missing ?
    8332 [Main Thread] INFO com.bea.alsb.harvester.plugin.reader.OSBReader - OSB Config Jar Import / Validation starting.
    <Mar 13, 2012 10:28:16 AM IST> <Warning> <ConfigFwk> <BEA-000000> <Setting transaction '6' as rollback only. Rollback reason:
    java.io.IOException: Invalid jar file
    at com.bea.wli.config.importexport.ConfigJar$LogicalJarForm.<init>(ConfigJar.java:1341)
    at com.bea.wli.config.task.impl.UploadJarTask._execute(UploadJarTask.java:46)
    at com.bea.wli.config.task.impl.SessionedTask$1.execute(SessionedTask.java:233)
    at com.bea.wli.config.transaction.TransactionalTask._doExecute(TransactionalTask.java:217)
    at com.bea.wli.config.transaction.TransactionalTask._doExecuteWithRetry(TransactionalTask.java:162)
    at com.bea.wli.config.transaction.TransactionalTask.doExecute(TransactionalTask.java:142)
    at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:236)
    at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:191)
    at com.bea.wli.config.task.impl.UploadJarTask.uploadJar(UploadJarTask.java:36)
    at com.bea.wli.config.mbeans.Config.uploadJarFile(Config.java:442)
    at com.bea.alsb.harvester.utils.ConfigJarUtils.importConfigJar(ConfigJarUtils.java:79)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.readQuery(OSBReader.java:196)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.readQueries(OSBReader.java:112)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.read(OSBReader.java:87)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.flashline.util.classloader.ContextClassLoaderHandler.invoke(ContextClassLoaderHandler.java:39)
    at $Proxy0.read(Unknown Source)
    at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:630)
    at com.oracle.oer.sync.framework.Introspector.<init>(Introspector.java:204)
    at com.oracle.oer.sync.framework.Introspector.main(Introspector.java:430)
    8426 [Main Thread] ERROR com.oracle.oer.sync.framework.MetadataManager - Artifact harvest failed due to: Unexpected error import: Invalid jar file
    com.oracle.oer.sync.framework.MetadataIntrospectionException: Unexpected error import: Invalid jar file
    at com.bea.alsb.harvester.utils.ConfigJarUtils.importConfigJar(ConfigJarUtils.java:97)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.readQuery(OSBReader.java:194)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.readQueries(OSBReader.java:112)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.read(OSBReader.java:87)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.flashline.util.classloader.ContextClassLoaderHandler.invoke(ContextClassLoaderHandler.java:39)
    at $Proxy0.read(Unknown Source)
    at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:630)
    at com.oracle.oer.sync.framework.Introspector.<init>(Introspector.java:204)
    at com.oracle.oer.sync.framework.Introspector.main(Introspector.java:430)
    Caused by: java.io.IOException: Invalid jar file
    at com.bea.wli.config.importexport.ConfigJar$LogicalJarForm.<init>(ConfigJar.java:1341)
    at com.bea.wli.config.task.impl.UploadJarTask._execute(UploadJarTask.java:46)
    at com.bea.wli.config.task.impl.SessionedTask$1.execute(SessionedTask.java:233)
    at com.bea.wli.config.transaction.TransactionalTask._doExecute(TransactionalTask.java:217)
    at com.bea.wli.config.transaction.TransactionalTask._doExecuteWithRetry(TransactionalTask.java:162)
    at com.bea.wli.config.transaction.TransactionalTask.doExecute(TransactionalTask.java:142)
    at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:236)
    at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:191)
    at com.bea.wli.config.task.impl.UploadJarTask.uploadJar(UploadJarTask.java:36)
    at com.bea.wli.config.mbeans.Config.uploadJarFile(Config.java:442)
    at com.bea.alsb.harvester.utils.ConfigJarUtils.importConfigJar(ConfigJarUtils.java:79)
    at com.bea.alsb.harvester.plugin.reader.OSBReader.readQuery(OSBReader.java:196)
    ... 11 more
    Please help...
    Regards,
    yogesh

    Hi Yogesh - when you say "i don't think the file is corrupt, because it works fine in eclipse", do you mean, you are actually able to publish them to a server and test those out?
    Dont know your exact scenario, but when you say that you took the sbconfig from another machine and used it on your local system, cant we just go ahead with that? I mean, clean up your code base, and then import this latest "working" sbconfig and start afresh?
    -Swagat

  • Problem while importing the ejbean jar file as model

    hi
    i created one sample ejb appication and jar the same and then trying to import the same as model(using option like Import JavaBean Model) in my webdynpro,but is giving error there are no java beans to import.
    is it possible to import ejbbean like normal javabean?
    if yes,why the above problem is coming?
    can anyone give the solution?
    thanks in advance
    Vasu

    Satish,
    thank you for reply.
    this way i already implemented and it was worked fine.
    we can not suggest to publish our own ejb component as webservice right?
    and i am thinking one more way of doing that is, we can implement one value bean(normal java bean to communicate ejb component internally)and import that jar as our model class in webdynpro.
    is this scenario will work?
    if this works,then how to make jar file which is maintain the both javabean and ejbcomponent as one thorugh NWStudio.
    Thanks
    Vasu

  • Need to download JAR files from more than ONE HTTP-server ?

    Hello,
    We have a need to download JAR files for an application, from more than ONE HTTP-server, i.e. any specified HTTP-server in an extremely secure network.
    Does a solution exist for this requirement ? Is it possible to design a solution our selfes for this problem ?
    Best Regards
    Peter

    We have a need to download JAR files for an
    application, from more than ONE
    HTTP-server, That can be done using the extension element
    from within the resources element of the main JNLP.
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources
    The extension element should refer to another JNLP
    (on the other site) that refers to the Jars. The jar files
    in any such (foreign) JNLP need to be signed, and the
    JNLP files should declare itself as a <component-desc>.
    For any level of detail on using extensions/components,
    download the spec. mentioned in the second paragraph
    of that section linked above. Unfortunately I can find no
    web browsable form of the information.
    Here is an example though..
    http://www.javasaver.com/testjs/jws/04/glclock.jnlp
    This (sandboxed) screenaver demo comes off my
    javasaver site. It refers to the JOGL API via an
    extension element in the JNLP, that points directly
    to the JOGL site. You might notice the security
    warning that is produced mentions..
    Name:      JOGL
    Publisher: sun microsystems, inc
    Source:    https://jogl.dev.java.net
    ..i.e. any specified HTTP-server in an
    extremely secure network. I do not know about an extremely secure network,
    but if it is OK to launch a normal JNLP for an
    application with a 'main()' from the server, I guess
    it should be OK to launch extensions off it - you
    might need to set up some tests.

  • Creating an executable jar-file including a custom package

    I am trying to learn how to create executable jar-files. I have managed this with a single class. However having a class which is an extention of another class which in turn belongs to custom package, I can't make it work.Running the program normally is not a problem. I don't think the problem is the actual code, but I will include it here anyway. I create the jar-file using:
    jar -cmf Direkt2b.txt Direkt2b.jar *.class
    where Direkt2b.txt is just:
    Main-Class: Diriekt2b
    Only the main class-file is included this way. Copying the other file to the same directory before creation doesn't help either. There is no error messages, the jar-file just refuses to run no matter what.
    The main-class:
    import java.awt.*;
    import extra.*;
    class Direkt2b extends ExtendedFrame {
         Font f;
         Direkt2b() {
              f = new Font("SansSerif", Font.BOLD, 24);
              setBackground(Color.yellow);
              setSize(400,150);
         public void paint(Graphics g) {
              g.setFont(f);
              g.setColor(Color.blue);
              g.drawString("V?lkommen till Java Direkt", 45, 100);
         public static void main (String[] arg) {
              Direkt2b d2 = new Direkt2b();
              d2.setVisible(true);
    The help-class:
    package extra;
    import java.awt.*;
    import java.awt.event.*;
    public class ExtendedFrame extends Frame {
         private static boolean first = true;
         private boolean isFirst = first;
         public ExtendedFrame() {
              addWindowListener(theListener);
              first=false;
         WindowAdapter theListener = new WindowAdapter () {
              public void windowClosing(WindowEvent e) {
              dispose();
              if (isFirst)
                   System.exit(0);
    }

    My problem wasn't really getting more than one class in a jar-file,
    but rather that my jar-file with multiple classes wouldn't execute.
    Reading the original post I realized that maybe I was unclear about that.
    However I have solved the problem now so for anybody reading this
    thread in the future I will tell you how.
    The general setting is this: You have a bunch of self-made help-classes
    organized in some classdirectory somewhere in the filesystem. You use these
    in your programming from time to time. You have set a classpath-varible
    in your OS such that Java could find your help-classes.
    Now you want to create executable jar-files so that you could publish your work.
    My problem was that while I added all needed classes in a jar-file, the main-class
    couldn't find the others because they were referenced incorrectly. The solution I
    came up with may not be elegant, but it works. I copied the main-class and all directories
    (only one in my case) just as they appear in the classpath-directory, to the same temporary
    directory. Then I created the jar-file from there, using: jar -cmfv Direkt2b.txt Direkt2b.jar Direkt2b.class extra/*.class
    I suspected that incorrect referencing was the problem and I tried several variations on the theme above
    before giving up and writing the first post. Part the problem was that I didn't get any error messages,
    just an annoying error-sound double-clicking the jar-file. I learned later that you could run jar-files from
    the command -prompt using: java -jar myjarfile.jar. This way you get a more useful response.
    I guess there is a way to include the classpath instead somehow, but I will use my method for now.
    I hope this was helpful to somebody.

Maybe you are looking for