One-jar on Linux?

Hello.
I am able to package my java app with a few dependent jars, icons, etc and create a one-jar .jar file. I can click on this file as if it was an executable and it runs nicely.
I tried to copy this to a Linux box however it does not run.
In linux from a shell I enter java myOne_jar.jar.
I get an error message NoClassDefFoundError.
I also tried java -jar myOne_jar.jar and this produced the following:
ctbtxfer:/opt/DEN # java -jar myOne_jar.jar
Cannot open configuration.ini/n
Cannot open userconfiguration.ini/n
Exception in thread "main" java.lang.reflect.InvocationTargetException
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 com.simontuffs.onejar.Boot.run(Boot.java:243)
at com.simontuffs.onejar.Boot.main(Boot.java:89)
Caused by: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
The same JRE 1.6 is installed on both and by doing a java -version I can see the 1.6 version displayed.
Any Suggestions?

There is a chance the file names etc may not be
system independent and I am investigating this now.
Not sure if this is the problem since it runs when
not packed in the onejar.Well, these messages that the program prints do suggest that something is wrong with the file names:Cannot open configuration.ini/n
Cannot open userconfiguration.ini/nThe program not being able to find the configuration files can be what triggers the bug, but that would be only a symptom of the bug. The root cause of the crash is insufficient error checking.
It looks like the program assumes the files were there and could be read, and then tries to access objects that should have been constructed when the file was being read but weren't. This line of the stack trace certainly suggests that:Caused by: java.lang.NumberFormatException: null

Similar Messages

  • How do I link the javadoc for one jar to another?

    I'm starting to work on the javadocs for my project. It consists of three JAR files. The problem is I haven't figured out is how to link the javadoc for one JAR to that for another jar. So if JAR A declares class X and JAR B has class Y extend class X, they need to be linked. But the javadoc output only has plain text there. What am I doing wrong? Something like @see com.u3e.tests.tools.X is output as text, not a link. I have the same problem for any @see pointing to part of the JDK. @see java.lang.Object is text.
    My project is NetBeans IDE based.  Do I need to manually specify something on the command line?  I see the -sourcepath and -classpath command line options, but don't know if those would help or not.  Ideally, there would be a place directly in the Documentation portion of the properties for each JAR to list that, but I don't see it.  The various JARs are listed under the libraries section as needed to satisfy dependencies.

    The best way IMO is to sync each iPad with your computer. Having all your stuff backed up on a computer is a good idea anyway. Just read how many folks here are trying to recover lost stuff that could easily be copied back from either backup or iTunes on the computer.
    Sync both iPads to the computer. Transfer all photos to the same computer. Then sync again selecting which items you want on each iPad.

  • Shell script to start, stop and restart a JAR under linux

    Hi everyone,
    Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can also indicate a method or parameter? Thanks!
    this JAR inculdes a class with main method like this:
    public class Client(){
    public Client(String name){
    public void stopClient(){
    public static void main(String[] args){
    new Client("/tmp/text.log");
    }

    Does anyone have idea to write a shell script to
    start, stop and restart a JAR under linux? That part isn't really clear.
    Start would be java -jar myjar.jar.
    Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
    Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to package other jar files into one jar?

    How to package other jar files into one jar? How can i get the class in the inner jar file?

    Generally not a good idea. The Java runtime won't be able to load classes from those "inner" jars, you'd have to write your own classloader to do that. It's not a brilliant idea, generally, anyway, since the point of having lots of jars is to keep your application modular. Bundling them all together like that means you have to re-deploy the whole thing to fix, for instance, one small bug in one small library
    If you really want to do this, there's an Eclipse plugin called FatJar, but I urge you to consider whether you really want to do it first.

  • How to Include more than one jar files

    My application uses more than one jar files. And all the jar files i am using are signed. when i include the jar files, i am including them in the resources section of the ".jnlp" file . The section of code looks like this:
    <resources>
    <jar href="utestfw.jar" main="true" download="eager"/>
    <jar href="crimson.jar"/>
    <jar href="jaxp.jar"/>
    </resources>
    <application-desc main-class="utestfw.ObjectBrowser"/>
    The deployment of the application is successful. The jar file - "utestfw.jar" contains the application main class when the application is launched it works, but when i choose the feature which involves the classes of either "crimson.jar" or "jaxp.jar" , the application terminates and the webstart console and the application is closed automatically. Am i wrong in adding the jar files? what is the way to add more than one jar files to the ".jnlp" file.
    Can anyone please help me?
    -Aparna

    I'll post u the jnlp file which i am using. To sign all the jars i've used the same alias ( a self signed certificate using keytool and jarsigner).Here is the jnlp file:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="0.2 1.0"
    codebase="http://127.0.0.1:8080/healthdec"
    href="testTool.jnlp">
    <information>
    <title>Unit Test Manager </title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <description>A minimalist drawing application along the lines of Illustrator</description>
    <icon href="images/testing.gif"/>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.3+ 1.2+"/>
    <jar href="utestfw.jar" main="true" download="eager"/>
    <jar href="crimson.jar" main="false" download="eager"/>
    <jar href="jaxp.jar" main="false" download="eager"/>
    </resources>
    <application-desc main-class="utestfw.ObjectBrowser"/>
    <security>
    <all-permissions/>
    </security>
    </jnlp>
    Can u please look at the above code and suggest me where i am wrong. Thanks.
    -Regards
    Aparna

  • Creating one jar archive out of several jar archives

    I have a problem with jar files. What i am trying to do is:
    Build one jar archive out of several jar archives. But i always get a ZipException. I opened a JarOutputStream and tried to write JarEntry objects to the stream by using the putNextEntry() method.
    here my code:
    // finalJar is the file to with i want to write
    // final Manifest is the manifest for that jar archive
    try {
    fout = new FileOutputStream (finalJar);
    jout = new JarOutputStream(fout,finalManifest);
    } catch (IOException io) { // log }
    // curJar ... is the current jar archive as JarFile Object
    Enumeration entries = curJar.entries();
    while (entries.hasMoreElements()) {
    JarEntry curEntry = (JarEntry) entries.nextElement();
    try {
    jout.putNextEntry(curEntry);
    } catch (ZipException ze) { // log}
    I get this error: (for every entry the same error !)
    java.util.zip.ZipException: invalid entry size (expected 6010 but got 0 bytes)
    at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:188)
    at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:116)
    at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:90)
    at GenerateData.createFinalJARArchive(GenerateData.java:361)
    at GenerateData.run(GenerateData.java:87)
    at GenerateData.main(GenerateData.java:72)
    I hope you can help me
    Thanks in advance
    Stefan Siegl

    while((c=in.read())>=0) jout.write(c);I guess you mean with '>' the bigger as '>' char
    .right ?Yes, the "greater than" sign.
    Just a standard stream copying procedure.
    >
    I use your code and set the compression to compressed
    jout.setMethod(ZipOutputStream.DEFLATED);
    jout.setLevel(8);
    jout.putNextEntry(curEntry);
    what i get is this exception:
    java.util.zip.ZipException: invalid entry compressed
    size (expected 787 but got 786 bytes)
    at
    java.util.zip.ZipOutputStream.closeEntry(ZipOutputStrea
    .java:193)
    at
    at
    at
    t
    GenerateData.createFinalJARArchive(GenerateData.java:51
    at GenerateData.run(GenerateData.java:89)
    at GenerateData.main(GenerateData.java:73)
    So there is one byte missing! But i dont know where
    ?!It seems one can't reuse the entry.
    Try to create a new one:
    //jout.putNextEntry(curEntry);
    jout.putNextEntry(new ZipEntry(curEntry.getName()));And I think it's a bad idea to try to change
    the compression level between the entries.
    At list untill you haven't got it working somehow.
    >
    But i finally want to do is to store the entries (and
    the data) uncompressed but if i read byte by byte
    there would not a uncompression, would it ?No. You read the data uncompressed.
    here I also got an exception, indicating that the read
    size was invalid.
    Exception when doing it like this:
    jout.setMethod(ZipOutputStream.STORED);
    jout.setLevel(0);The setLevel(0) is redundant here.
    jout.putNextEntry(curEntry);
    is:
    java.util.zip.ZipException: invalid entry compressed
    size (expected 2805 but got
    6015 bytes)
    at
    at
    at
    t
    java.util.zip.ZipOutputStream.closeEntry(ZipOutputStrea
    .java:193)
    at
    at
    at
    t
    GenerateData.createFinalJARArchive(GenerateData.java:51
    at GenerateData.run(GenerateData.java:89)
    at GenerateData.main(GenerateData.java:73)
    I hope someone can help me with that
    Regards
    Stefan Siegl
    So my variant is:
    jout.setMethod(ZipOutputStream.STORED);
    while (entries.hasMoreElements()) {  
       JarEntry e=(JarEntry) entries.nextElement();  
       //write the appropriate entry to jout
       jout.putNextEntry(new ZipEntry(curEntry.getName()));
       //copy the actual data to jout  
       InputStream currIn=curJar.getInputStream(e);  
       int c;  
       while((c=in.read())>=0) jout.write(c);  
       currIn.close();
    }Hope we finally took over.

  • Need help compiling external jar files into my one jar file from cmd line

    Here is my problem, let me see if I can explain it right:
    I am making a jar file on my development computer that will run my java project. In this java project, it references a couple Java3D jar files. On my development computer, I create the jar file and it runs correctly, but when I move that jar file over to the test computer, the parts of the application needing those Java3D jars are not found in my jar I created. I isolated the problem and it is because those Java3D jar files I needed are not on my test machine. But that is the way I need it to be. I need it so that when I compile all my code on the development machine, I need it to also compile those two Java3D files into my one jar that I move to the test machine. You get what I'm saying? I must do all the compiling from the command line and have only one jar file to put on the test machine that contains all my compiled code and the two Java3D files needed to run some of the applications in the project.
    Here a brief sample of what I'm doing:
    To compile my java files in my project, I simply to this for all my files:
    javac file.java
    javac file2.java... and so on for all my java files.
    Then I create my jar file:
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all my class files.
    Also when compiling my jar file, I do this thinking that it would include the two Java3D jars into my one jar file:
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    My manifest file looks something like this:
    Manifest-Version: 1.0
    Main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar
    Do I have to have that Class-Path in there pointing to those jar files? Those jar files will not exist on my test machine because the directory structure will not be the same. I've tried a manifest without specifying my Class-Path to those jar files, but I get the same problem when I run my application on the part that needs the Java3D files.
    The error I am getting is that there is a RasterTextLabel class inside one of those Java3D jar files that my application cannot access because those jar files are not on my test machine.
    So basically what I really need to know is how I get those two Java3D jar files compiled into my one jar file that I move to a test machine and run with the following command:
    java -jar MyJar.jar
    Can anyone help me??
    Thanks.

    Here what you need is to have all the files present in a single jar file, and the classpath is set properly to the required jar files.
    Do the following in steps:
    1)
    Create a custom manifest file,say mymanifest.mf, with the following contenets, put it in current directory:
    Manifest-Version: 1.0
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar <press ENTER key>
    2)
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all class files.
    3)
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    (Make sure that j3d-org-images.jar and j3d-org.jar are present in a subdirectory called 'jars')
    Now you would be able to run,
    java -jar myjar.jar

  • Pass a object from one jar to another jar file

    I have a common jar file which will communicate to the server for data validation purpose.But after validation it has to invoke different different jar file based on its response from the server.So, I might have a object which has to pass from the common jar file to a specific jar file.So, I like to know what will be the best procedure to achieve it.
    Please help me out.

    arpitak wrote:
    Yes,jar file holds class files.one of class files wants to trigger a method of a class file which resides in different jar file.this is the situation I tried to describe.Let consider there are three jar files like JAR A,JAR B ,JAR C.Here JAR A is a common jar where other two jar could be used as a plug in. So based on the condition any one of them (JARS) will be triggered by the common jar(JAR A).this is the situation.The class file of JAR A will trigger some method or main method of the JAR B/JAR C.So,here how could I pass a object from one jar to another is my main question.
    Is it clear now?
    I need a solution for this very urgently.Are you looking for a plug-in framework? That is, dynamically discovering and loading plugins. I am not experienced in developing or using plugins. However Googling "java plugin" brings up JPF.
    If you just have multiple jars that have different classes, the JVM will load the appropriate classes if it can find the jars through the standard classloader on the classpath or through a customer classloader.

  • How to combine Jars or Include dependent Jars into One Jar

    Hello,
    I have build a small utility using few libraries now i want to make a bundle or jar of this utility. I don't want to let use includes the jars individuals. I want to make a single jar using all the jars so user needs to include only one jar.
    So i need to include the dependent Jar files into a single jar.
    I got few solutions using Google.
    Like:
    adding a Class-Path: myjar.jar to MANIFESTfile.
    simply update the jar with jar using commnad jar uf main.jar myjar.jar_
    but these are not working. when i use the Class-Path option the Tree of main jar looks like
    main.jar
        <default-package>
             myjar.jar
        META-INF
             MANIFEST.MF
    How can i combine the Jars into a single Jar? Please help.

    It is to tell the JVM where to look for additional classesDoes it mean if i includes dependent jars to main jar and if i specify the path then JVM find that jars to specified pathThat's what 'telling the JVM where to look for additional classes' means, isn't it? I don't know what else it would mean.
    and don't need to include it separately?You only have to specify the Class-path in the manifest, and run the JAR file with java -jar. In fact if you specify a classpath on the command line with java -jar it will be ignored.
    All this is in the documentation.

  • One-JAR usage

    Looking all over for a way to jar jarfiles inside one jarfile (nested jarfiles). Uncovered the following:
    [One-JAR|http://one-jar.sourceforge.net/] ( [See link|http://forums.sun.com/thread.jspa?threadID=5344801&tstart=50] )
    And [Zamboch - URL access to nested .jar files|http://zamboch.blogspot.com/2009/03/url-access-to-nested-jar-files.html]
    I decided to try the former. However the instructions (or lack thereof) for use left me bewildered. Has anyone successfully utilized this product? If so, can anyone offer help with settup and usage?
    ~Bill

    If I am not wrong, and looking at the page, http://one-jar.sourceforge.net/index.php?page=ant&file=simple it seems they have defined the ant-task to build the jar file.
    That means what you should do is
    1) Download their stuff.
    2) Add their jars in the class-path. set up the class path for ant and one-jar.
    3) Use ant to invoke target one jar
            <one-jar destfile="hello.jar" manifest="hello.mf">
                <main>
                    <!-- Construct main.jar from classes and source code -->
                    <fileset dir="${classes.dir}/src"/>
                </main>
                <lib>
                    <fileset file="${build.dir}/lib.jar" />
                </lib>
            </one-jar>This will create a jar file called hello.jar file which will be used.
    And I also guess reading the page that that your hello.jar file will not refer to the main class of your application but in the manifest.mf, the main class of your application will be referred under attribute . One-Jar-Main-Class:
    What they do is load their own class first, which loads their own class loader. Their classloader, loads all the supporting jar files placed in lib folder (defined in manifest.mf as lib
    | | commons-logging.jar
    | /com.simontuffs.onejar
    | | Boot.class
    | | etc.
    )

  • Have one instance on linux running one database.can i create more databases to sam

    i have one instance on linux running one database.can i create more databases to same instance and they all remain up .

    you can create more than one database (Instance) on the same machine, start up all of them, in the connect string write the Instance name you want to work with.
    null

  • A Game in one jar file

    I've wiritten a very simple game using jogl, and I won't to put all the files in one jar (resources, jogl classes, my classes, jogl natives), so there's no playing with jre needed for the user. My game loads classes and resources correctly from the jar, but the jre doesn't see the natives? Is there a solution?
    Thanks in advance!

    Java 3d api?
    java.sun.com/products/java-media/3D/
    btw. Powered by sun doesn't mean anything. If it is
    not part of java SE or EE or other certifiable path
    then its not going to be supported by 3rd party java
    vendors, it doesn't matter if its done by sun, sun
    isn't java. The whole point of java is write once run
    ANYWHERE, not just on a few platforms, with wierd
    JNI's that support a peculiar (though in OpenGL case
    very good) hardware standard.java3d also uses native librarys (it runs on OpenGL or DirectX), so you face the same problem as with JOGL, you need to install it or load the native dynamic libs.
    Java3D is a higher level API using a Scenegraph concept (OpenInventor). Due to this it's slower than the low level API JOGL which is just a java binding to access OpenGL.

  • Peculiar issue with signed .jars and Linux (Debian unstable, 2.4.20-custom)

    BACKGROUND:
    I am a developer working on a Java3D application, which is to be deliverable over
    the Web. Delivery as an applet seemed a natural choice, and so I spent a considerable amount of effort learning (I won't say "mastering") the process of
    creating a self-signed .jar containing java3d-<some_version>.exe. I have in fact
    successfully created a fully-fuctional from-scratch JPI/Java3D/myapp install. By
    this I mean that Windows machine with only stock IE installed could hit my URL,
    get the proper JPI installed, followed by the Java3D runtime I'd chosen, as well
    as a third-party DXF loader, and finally (after much clicking of 'Yes', 'Accept',
    'OK', etc.) see my app in a browser window.
    That was on my old, slow, Windows2000 workstation. Now I have a shiny, new
    workstation upon which my employer has graciously allowed me to run Linux. Sadly,
    the re-creation of the self-signed .jar files under a new JDK has not gone smoothly.
    PROBLEM DESCRIPTION:
    When a user attempts to download the self-signed .jar containing the auto-install
    executable for the Java3D runtime, the normal security warning prompts are displayed (one for granting to install the extension, one to accept the "suspect" certificate from me alone). The plugin happily downloads the .jar file, and then
    a NullPointerException is thrown, with a
    stack trace like:
    NPE!
    at java.util.zip.ZipFile.getInputStream (unknown source)
    at java.util.jar.JarFile.getInputStream (unknown source)
    <something>doPrivileged<something>
    etc.
    I apologize for the lack of a full stack trace; I would essentially have to type it in by hand after printing it out on the remote test box; I hope that I've caught the important details above.
    After this, the pure-java signed .jar is downloaded and installed, and then the applet "loads" with the predictable ClassNotFoundException for javax.media.j3d.SceneGroup.
    Downloading and installing the J3D runtime by hand and then re-visiting the URL results in a fully-functional applet.
    I've tried Blackdown Linux JDKs 1.4 and 1.3.1, as well as Sun's JDKs 1.3.1_07 and 1.3.1_05 for the compiling, jar'ing, and jarsigner'ing of these files, all with the same result. At each new JDK, I re-did the HTML conversion so that he appropriate
    JPI version was required on the client. I did complete uninstallations of all client JPI instances (including Web Start for 1.4.1_x, as well as cleaning the registry on the client).
    When this strategy worked, it was on Sun JDK 1.3.1_05 for Windows runnning on Windows2000, unknown service pack.
    DESIRED BEHAVIOR:
    I would like my clients to be able to go from stock Windows2K/IE (this being an intranet without any other options) to some JPI version running the J3D extension, with only the need to click 'OK', 'Accept', 'Grant This Session', etc. a bunch of times on the part of the user. I want this to happen without my having to resurrect my decrepit old Compaq Deskpro just to play the role of "build host" for my
    Java3D and loader .jar files, if at all possible.
    FILES:
    Here's what gets merged into the "main" applet's mainfest at creation time:
    Manifest-Version: 1.0
    Extension-List: java3d DxfLoader
    java3d-Extension-Name: javax.media.j3d
    java3d-Implementation-Vendor-Id: com.sun
    java3d-Implementation-Version: 1.3
    java3d-Specification-Title: Java 3D API Specification
    java3d-Specification-Version: 1.3
    java3d-Specification-Vendor: Sun Microsystems, Inc
    java3d-Implementation-URL: http://10.1.1.1/heartcad/lib/java3d.jar
    DxfLoader-Extension-Name: eupla.dxfloader
    DxfLoader-Implementation-Title: Eupla DXFLoader
    DXFLoader-Implementation-URL: http://10.1.1.1/heartcad/lib/DxfLoader.jar
    And into the manifest for the J3D .jar:
    Manifest-Version: 1.0
    Implementation-Version: 1.3
    Specification-Version: 1.3
    Extension-Installation: "java3d-1_3-windows-i586-directx-rt.exe"
    Extension-Name: javax.media.j3d
    Implementation-Vendor-Id: com.sun
    Implementation-Vendor: Sun Microsystems, Inc
    Specification-Vendor: Sun Microsystems, Inc

    I have seen that bug, and the problem I'm having seems to be different than it. The extension installer is in the first extension .jar my applet asks for, and it
    never works automatically, regardless of how many times the applet is loaded.
    The second .jar, which doesn't have to run any installer, always works fine, but the first one will never work (a manual install of the Java3D runtime is required). This seems to not be the behavior described in the bug.
    I will continue to search for an answer to this problem, and of course if I should find anything I'll post it here.

  • Splash Screen + Jar + DND + Linux = XServer Freeze?

    I've experienced a strange problem with one of my programs which I believe to be a java bug, I just need help reproducing it in a small example.
    Basically, I have a fairly large project (20,000 loc), which involves a bit of drag and drop of a custom JTree, custom JList, and some other things. Recently, we introduced a splash screen to the project. With that, I started getting reports of the program freezing people's linux computers. I looked into it and was able to reproduce the problem. Here are my findings:
    1) Disabling the splash screen stops the freezing. This is an undesirable workaround, since the program takes a long time to load, but aside from disabling Drag and Drop, this has been the only workaround I've found so far.
    2) The freezing only occurs if the project is packed into a jar. Running from Eclipse or running the class files does not produce the problem.
    3) The freeze occurs briefly after the user completes a Drag and Drop. There are other methods to complete these actions which do not involve drag and drop, but these methods do not cause the freeze, thus the problem is with the DND.
    4) I was unable to reproduce this problem with Windows
    Upon freezing, I am still able to move the mouse cursor, but it get stuck on a certain pointer (which, since this is briefly after the DND completion, could be anything. I've obtained states such as invisible, I-beam, and pointer). Music also continues to play. Open windows, however, stop responding to attempts to bring them to front, minimize them, interact with them, etc - they are essentially frozen. Ctrl+C does not kill the offending process, even if it was run from the terminal.
    There are 2 ways to recover from the freeze: Hard Reboot, or ssh in and kill the java process that way.
    This has led me to conclude that it is the XServer freezing.
    Now the weird thing is, I'm unable to reproduce this with a small test program which involves all 4 of the mentioned components.
    Anybody know anything about this problem? Anybody else experienced this or able to reproduce this?
    My project is open source and I'd be more than happy to share a jar of it if it helps you any, or it can be accessed from an SVN. Like I said, though, it's 20,000 loc or so, so I doubt you'd want to look through it to find the problem. I've also created a small test program using the main freeze-worthy components (Splash screen, jar, DND), but it does not cause the freeze. I can provide that program if anybody's interested.
    Please help, this is very irritating, and I'm starting to get some unhappy clients.

    OK, so I managed to replicate it on relatively small code, here comes the code:
    DomTree.java
    import javax.swing.JFrame;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import java.math.BigDecimal;
    public class DomTree extends JTree
        public DomTree()
         DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
         root.add(new DefaultMutableTreeNode(new BigDecimal(Math.PI)));
         root.add(new DefaultMutableTreeNode(new BigDecimal(Math.E)));
         root.add(new DefaultMutableTreeNode(new BigDecimal(Math.PI*Math.E)));
         setModel(new DefaultTreeModel(root));
         new DomTreeDnD(this);
        public static void main(String args[]) {
         JFrame frame = new JFrame();
         frame.setSize(640, 480);
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.add(new DomTree());
         frame.setVisible(true);
    }DomTreeDnD.java
    import java.awt.Component;
    import java.util.ArrayList;
    import java.io.IOException;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.math.BigDecimal;
    import javax.swing.DropMode;
    import javax.swing.JComponent;
    import javax.swing.JTree;
    import javax.swing.TransferHandler;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    public class DomTreeDnD extends TransferHandler
        /** A list of supported data flavors for import */
        public DataFlavor importFlavors[] = null;
        /** A list of supported data flavors for export */
        public DataFlavor exportFlavors[] = null;
        // BigDecimal transfer within the same JVM instance:
        DataFlavor localBigDecimal;
        public DomTreeDnD(DomTree domTree)
         try {
             // BigDecimal transfer within the same JVM instance:
             localBigDecimal = new DataFlavor(BigDecimal.class, "Big Number");
             importFlavors = new DataFlavor[]{
              localBigDecimal, // JVM-local import
             ArrayList<DataFlavor> exportFlavors = new ArrayList<DataFlavor>();
             exportFlavors.add(localBigDecimal);
             this.exportFlavors = exportFlavors.
              toArray(new DataFlavor[exportFlavors.size()]);
             domTree.setTransferHandler(this);
             domTree.setDragEnabled(true);
             domTree.setDropMode(DropMode.INSERT);        
         } catch (IllegalArgumentException iae) {
             System.err.println("D&D is disabled due to: "+iae);
        /* In order to restrict drop location, remember what is being dragged: */
        /** Source component (of class DomTree) noted upon drag. */
        Component source = null;
        /** The DomTree in which internal MOVE action has been performed.*/
        DomTree selectTree = null;
        /** The position in DomTree where internal MOVE action has been performed.*/
        TreePath selectPos = null;
        /** Export (start drag or copy): declare supported actions */
        public int getSourceActions(JComponent c)
         // support only DomTree (for now)
         if (c instanceof DomTree) {
             System.out.println("getSourceActions: OK");
             return COPY_OR_MOVE;
         return NONE;
        /** Export (start drag or copy): wrap the data */   
        protected Transferable createTransferable(JComponent source)
         if (source instanceof DomTree) {
             DomTree domTree = (DomTree) source;
             TreePath path = domTree.getSelectionPath();
             if (path == null) return null;
             Object o = path.getLastPathComponent();
             if (o == null) return null;
             if (!(o instanceof DefaultMutableTreeNode)) return null;
             o = ((DefaultMutableTreeNode)o).getUserObject();
             if (o instanceof BigDecimal) {
              System.out.println("createTransferable");
              BigDecimal t = (BigDecimal)o;
              return new TransferableBigDecimal(t);
             } else {
              System.out.println("Dragging "+o.getClass().getName());
         return null; // otherwise drag is not supported
        /** Export (drag or copy): finish export after import is done */
        protected void exportDone(JComponent source,
                         Transferable data, int action)
         if (selectTree != null && selectPos != null) {
             System.out.println("exportDone: change selection");
             selectTree.setSelectionPath(selectPos);
             selectTree = null;
             selectPos = null;
             System.out.println("exportDone: change selection done");
        /** Import (drop or paste): find acceptable flavor. */
        DataFlavor findFlavor(Transferable transferable)
            for (DataFlavor idf: importFlavors)// prefer our priorities first
             if (transferable.isDataFlavorSupported(idf)) {
              return idf;
            System.out.println("No supported data flavor found, suggested:");
            for (DataFlavor df: flavors)
                System.out.println(df);
            return null;     
        /** Import (drop or paste): can we accept the flavor? */
        public boolean canImport(JComponent c, DataFlavor[] flavors)
         System.out.println("canImport DataFlavor");
         for (DataFlavor idf: importFlavors)// prefer our priorities first
             for (DataFlavor edf: flavors)
              if (idf.equals(edf)) return true;
         return false;
        /** Import (drop or paste): can we accept the stuff? asked continuousely.*/
        public boolean canImport(TransferHandler.TransferSupport sup)
         if (!sup.isDrop()) // allow only drop
             return false;
         // allow only copy and move:
         if (sup.getUserDropAction() != COPY_OR_MOVE &&
             sup.getUserDropAction() != COPY &&
             sup.getUserDropAction() != MOVE)
             return false;
         Component target = sup.getComponent();
         if (!(target instanceof DomTree)) // support only DomTree
             return false;
         DomTree domTree = (DomTree)target;
         // check for compatible flavor:
         if (findFlavor(sup.getTransferable()) == null) return false;
         JTree.DropLocation loc = (JTree.DropLocation)sup.getDropLocation();
         TreePath destPath = loc.getPath();  // parent of drop position
         int destIndex = loc.getChildIndex();// position of insertion
         if (destPath == null) return false;
         Object parent = destPath.getLastPathComponent();
         parent = ((DefaultMutableTreeNode)parent).getUserObject();
         if (!(parent instanceof String)) // drop only within document
             return false;
         if (target == source) { // transfer within the same tree
             sup.setDropAction(sup.getUserDropAction());
         return true; // allow transfer
        /** Import (drop or paste): perform import and return result. */
        public boolean importData(TransferHandler.TransferSupport sup)
         Component target = sup.getComponent();
         if (!(target instanceof DomTree)) return false;
         DomTree domTree = (DomTree)target;
         Transferable trans = sup.getTransferable();
         DataFlavor flavor = findFlavor(trans);
         if (flavor==null) return false;
         System.out.println("importData");
         BigDecimal t = null;
         // extract the data being dropped:
         try {     
             Object data = trans.getTransferData(flavor);
             if (data == null) return false;
             if (flavor.equals(localBigDecimal)) {
              if (data instanceof BigDecimal) t = (BigDecimal)data;
              else return false;
         } catch (UnsupportedFlavorException ufe) {
             ufe.printStackTrace(System.err);
         } catch (IOException ioe) {
             ioe.printStackTrace(System.err);
         if (t == null) return false; // data extraction failed
         System.out.println("Search for location");
         // search for position in terms of a preceeding template:
         JTree.DropLocation loc = (JTree.DropLocation)sup.getDropLocation();
         TreePath destPath = loc.getPath();
         int destIndex = loc.getChildIndex();
         DefaultMutableTreeNode pos;
         DefaultTreeModel model = (DefaultTreeModel)domTree.getModel();
         DefaultMutableTreeNode parent =
             (DefaultMutableTreeNode)model.getRoot();
         System.out.println("Insert a copy");
         BigDecimal copy = new BigDecimal(t.doubleValue());
         pos = new DefaultMutableTreeNode(copy);
         parent.insert(pos, destIndex);
         TreePath path = destPath.pathByAddingChild(pos);
         model.nodesWereInserted(parent, new int[]{destIndex});
         System.out.println("Highlight selection");
         // highlight the selection in the DomTree:
         if (pos != null) {
             domTree.setSelectionPath(path);
         return true;
        class TransferableBigDecimal implements Transferable
         protected final BigDecimal template; // hidden behind interface
         public TransferableBigDecimal(BigDecimal t) {
             System.out.println("TransferableBigDecimal");
             template = t;
         public boolean isDataFlavorSupported(DataFlavor df) {
             if (!localBigDecimal.equals(df))
              System.out.println("Tried requesting: " + df);
             for (DataFlavor myflavor: exportFlavors)
              if (myflavor.equals(df))
                  return true;
             return false;
         public Object getTransferData(DataFlavor df)
             throws UnsupportedFlavorException, IOException
             if (df.equals(localBigDecimal)) {
              System.out.println("Local export");
              return template;
             } else {
              System.out.println("Unsuported flavor");
              throw new UnsupportedFlavorException(df);
         public DataFlavor[] getTransferDataFlavors() {
             System.out.println("Asked for all supported flavors");
             for (DataFlavor df: exportFlavors)
              System.out.println(df);
             return exportFlavors;
    }manifest
    Manifest-Version: 1.0
    Main-Class: DomTree
    SplashScreen-Image: splash.pngsplash.png
    // use gimp to draw 400x300 picturecompile:
    javac DomTree.javacreate jar:
    jar -cvfm dndtest.jar manifest splash.png DomTree*.class DomTreeDnD*.classrun:
    java -jar dndtest.jarthen select any number and try to drag -- the screen freezes.
    interestingly, if you tried running this DomTree not in a jar, then it does not freeze anymore, you will need to logout/login to replicate the freeze.

Maybe you are looking for

  • Need advice on JVM GC tuning for server jdk 1.5.0_08

    We are getting full GC , can you suggest optimal GC for the following logs: /usr/java1.5/jdk1.5.0_08/bin/java -server -Xms2048m -Xmx2048m -XX:NewSize=512m -XX:SurvivorRatio=8 -Xss1024k -verbosegc -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:+Disab

  • フォトブラウザ写真整理について(Photoshop Album Mini 3.0)

    フォトブラウザで表示される写真の配置(順序)を自由に変えることは出来ないのでしょうか?(ドラッグドロップなどの方法で-) 解決方法を知っている方がいらっしゃったらアドバイスをお願いします. よろしくお願いいたします.

  • Problems backing up to external HD

    Hi there, I bought an external hd today - the Western Digital Passport, 120 gigs, USB. The 'installation guide' says simply to plug it in - which I did. It shows up on my desktop as a disk-the icon is mostly orange and has the USB symbol on it (I don

  • Digital camera videos viewable on ipod?

    I was hoping to have all my home digital videos on my 30G ipod, but they only come up as stills (can't play them). do I need to transfer them out of iphoto? if so, where to?

  • MAC question mark folder

    Now, before you freak out as this is quite a common problem let me explain. About two years ago, I was done with my MAC, and decided to dual boot it with Ubuntu. I ended up deleting my entire mac partition so Ubuntu was the only OS. I ended up runnin