Double .jar files

Hi,
I have a problem while trying connection the cloudscape 10.1 database.
For the connection a derby.jar file is required. i have include the file and I can connect the database via the class code. but when i try to connect by a jsp file, i get an error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
     org.apache.jsp.Controller_jsp._jspService(Controller_jsp.java:68)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:585)
     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     java.security.AccessController.doPrivileged(Native Method)
     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
root cause
java.lang.ExceptionInInitializerError
     java.lang.Class.forName0(Native Method)
     java.lang.Class.forName(Class.java:164)
     PRM.Database.openDatabaseConnection(Database.java:26)
     PRM.Controller.(Controller.java:14)
     org.apache.jsp.Controller_jsp._jspService(Controller_jsp.java:47)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:585)
     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     java.security.AccessController.doPrivileged(Native Method)
     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
Sun-Java-System/Application-Server
when I debug I get an other error:
Sealing violation loading org.apache.derby.jdbc.InternalDriver : Package org.apache.derby.jdbc is sealed
According to an IBM site this means that I have 2 different derby.jar files
The sealed jar error indicates that you are trying to load classes from the same package in two different jar files. (quote from the site)
http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=13764581&cat=19&thread=98729&treeDisplayType=threadmode1&forum=370#13764581
My classpath =
"/C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/applications/j2ee-modules/BigTest2/WEB-INF/classes/;/C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/applications/j2ee-modules/BigTest2/WEB-INF/lib/derby.jar;C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/generated/ejb/j2ee-modules/BigTest2/;"
The 2 locations ofthe derby.jar files are:
C:\Program Files\Sun\jstudio_ent8\AppServ8.1UR2\domains\domain1\applications\j2ee-modules\BigTest2\WEB-INF\lib
and
C:\Documents and Settings\Administrator\BigTest2\build\web\WEB-INF\lib
deleting one isn't a option, a new derby.jar will be placed back while compiling..
What to do?

Thanks but I've used that tutorial and others to learn how to make the jar file executable and its working if i use "java -jar hello.jar" at the command line.
Unfortunatley i was messing around with the 'open with' command on the jar file trying to fix it and i've made it associated with some html help thing., and i have no idea how to unasociate it.
Anyone know any way i can remove all associations with it?

Similar Messages

  • How can I create a jar file that will run automatically on double click

    all the jars I created run only from the command-line.
    how can I make it run by double-click on it?

    First you will need to associate .jar files with the javaw.exe program in order to just be able to double click on the jar and run it from within a windows explorer application. Next you will need to set the main class attribute of the manifest file. My understanding is that the value of this attribute is used by the launcher to know which class to load. In other words, which is your main application class. To specify this attribute open your manifest file in a text editor. You will find this file located within the jar at META-INF/MANIFEST.MF. Then, add the line,
    "Main-Class:<relative path to the main class>" However, remember not to add the .class extension to the end of the class name.
    In Windows 2000 you can associate jar files with javaw by finding a jar file in Windows Explorer and right clicking it. This will give you a context menu which should have an Open With... option (if you are not using Windows 2000 and don't see the 'open with' menu item, try holding down the shift button while right click on the file). Select the Open With... option, then, when the dialog appears highlight javaw and select the "Always use this program to open these files" checkbox. When you hit the OK button you should have all your jar files associated with the javaw process.
    Once you've done this, you should be able to double click on your jar file and run your application.
    Regards,
    Daniel Walsh

  • Double click on JAR file to execute it.... How???

    Hello,
    I wrote a standalone java application, and im wondering how to put a shortcut on my desktop to run the application without having to go into the command prompt to type "java -jar MyProgram.jar".
    I want to be able to just double click on it and have it run. Is there a way to do this?

    Here is how I did it:
    Just install the JDK/JRE and then make a shortcut to the jar file you want to execute. When you install the jre jar's are registered and all you need do is double click them. I've done this in windows 95, 98, Me, NT, and Win2000.

  • Issue with .jar file (double clicking)

    Hi.
    I've been having a problem with a certain .jar file when I attempt to double click it. From my understanding, I was under the impression that when someone double clicks a .jar file, the contents are supposed to execute by itself (kind of like a .exe file, I guess?)
    I've been able to successfully create my .jar file and have been able to run it through a command prompt in Windows using the following:
    java -jar testjar.jar
    However, whenever I try to double click on the testjar in the folder it is located in, a command prompt quickly pops up and goes away. I've been able to tell I'm getting an error, mainly consisting of something along the lines of "Exception in thread "main" java.lang.NoClassDefFoundError: ...
    I'm not entirely sure what information is needed for support, but I'd be more than happy to provide what is necessary. Thanks in advance!

    I've been having a problem with a certain .jar file when I attempt to double click it. From my understanding, I was under the impression that when someone double clicks a .jar file, the contents are supposed to execute by itself (kind of like a .exe file, I guess?) Only if it has a manifest file which specifies the main class
    java -jar testjar.jar
    However, whenever I try to double click on the testjar in the folder it is located in, a command prompt quickly pops up and goes away. I've been able to tell I'm getting an error, mainly consisting of something along the What does your program do? It's possible that it runs and then closes before you can notice when you double click. It's also possible that the java version that double click is invoking is different from what you're using on the command line.

  • How to make .jar files executable by double clicking

    hi,
    I've been trying to make my .jar file created via ANT Tool executable by double clicking it but I'm not being successfull. I looked at the ANT Tool for making manifest.mf and I included most of the attributes listed there and later found that Main-Class attribute is required but its not mentioned in the documentation.
    So, I'll be very greatful to receive any suggestions
    regards,
    Jay

    ya I've been doing things the same way mentioned there but it isn't working. here is the code for it:
    //All the .class files are in the build directory and the class files are under the package org.home.proj.
    <!-- For making .jar files -->
    <target name="jar" depends="compile" description="Makes CyberStation.jar from the CyberStation code.">
        <mkdir dir="${bin}" />
        <jar jarfile="${bin}/CyberStation.jar" basedir="${build}">
          <exclude name="**/run.bat" />
            <manifest>
           <attribute name="Buily-By" value="${user.name}" />
           <attribute name="Main-Class" value="org.home.proj.CyberSoft" />
             <section name="org/home/proj/CyberSoft.class">
               <attribute name="Sealed" value="false" />
             </section>
         </manifest>
        </jar>
      </target>It show the error: Could not find the main class. The program will exit.
    regards,
    Jay

  • Running .jar files in linux on double click

    Hi,
    i needed a solution to run the jar files on double click in linux system.Necessity is mainly because when i run the jar file by java -jar myapp.jar in terminal it works fine .Iam running my app continuosly in system tray(a server kind).But if i close the terminal my app exits.
    How to resolve this ?

    I am taking a SWAG.....it sounds like your problem is how to run a java app without a terminal window. So as I recall, there is some way in Linux to enter a command and have it execute in a new process. I don't recall the syntax but maybe putting a '&' character in the command line? Anyway, you should be able to use the method and use "javaw" instead of "java" to launch your app. You should be able to do this in a batch file too. Something like, javaw -jar yourjar.jar &

  • Error opening JAR files with double-click

    I have this problem while trying to execute a JAR file by double-clicking in Windows Vista Home: the JAR file never opens and it appears the following in the command line:
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\PATH_TO_FILE\JAR_FILE_NAME/jar
    Caused by: java.lang.ClassNotFoundException: C:\PATH_TO_FILE\JAR_FILE_NAME.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)the strange thing is that I have the environmental variable CLASSPATH set to ".;" and while running from the command line as java -jar C:\PATH_TO_FILE\JAR_FILE_NAME.jar I have no problems...
    Any idea?? Thanks in advance!

    This was getting so frustrating I turned off FileVault and the problem went away. That's too bad, but there it is.

  • Jar file not executing on double-click

    Hello,
    I have a .jar file that I would really like to execute using a double-click in win xp.
    I can execute the jar file witha java -jar command on the command prompt and the program runs but when double-clicking i get the error: cannot find the main class: program will exit
    I had win rar installed on my computer which changed itself to the default app to open jar files.
    So this is what I've tried
    I tried modifying the registry command to run java -jar, javaw -jar but they don't work.
    I have created several manifest.mf files with this in them
    Manifest-Version: 1.0
    Created-By: 1.4.2_07 (Sun Microsystems Inc.)
    Main-Class: MyClass
    I know that a carraige return needs to be at the end though I don't know really how to check for it (I assume its there because I have a few extra lines after the last text peice). I've read through some other threads but nothing seems to work. It's getting really annoying always having to go through the runline. Thanks for the help.

    I don't understand why Netbeans has such a hard time creating working jar's for applications. This is the second time I've written an application that just will not work when trying to execute using the jar. The last time this happened I used Eclipse and imported everything (including the layout) and Eclipse got it working the first time.
    This time, I thought I'd go back to Netbeans since they released a newer version 4.0 (I haven't gone to 4.1 yet). Apparently nothing has changed as my application, once again will not run from the jar. What's the deal with Netbeans?
    I think I'll, once again bring my project into Eclipse and have that make the jar.
    Kurt

  • Double clicking .jar file does nothing!

    Hello i am wondering, how to run a .jar file by double clicking it?
    After creating the jar file and by typing javaw.exe -jar ledger.jar in command prompt in windows 7 works fine for my swing application.
    I created a .bat file which has javaw.exe -jar ledger.jar also works fine.
    But when i double clicking the ledger.jar is not working, not giving any error, not even doing anything.
    I tried associating .jar file with java or javaw then also nothing happens.
    My questions are:
    1) What i have to do to execute the .jar file by double clicking it?
    2) Why java is not so user friendly to the end users especially in Desktop Applications?
    Thanks in advance.
    Note: OS - Windows 7 64 bit
    JRE - 32 bit in Program files (x86) folder version 7

    handat wrote:
    Your other question, please blame Microsoft for not making file associations easier to manage.Too easy. You can blame MS all you want; it is the task of the Java runtime installer to properly setup the file associations - OR the administrator which bypasses the runtime installation with his own scripts. i have installed the runtime many times including on Windows 7 and it always does it properly. I have no clue how people end up with half-finished installations.

  • Jar file runs from the command line, but not when I double click it

    Hello, I'm running windows xp. I've created an executable jar file and it runs fine from the command line when I type;
    java -jar wizard.jar
    but, when I double click it . . . nothing.
    Any ideas?

    nothing ? that's weird, windows XP should prompt you to select the program you want to use in order to open Jar files (and give you this silly piece of advice to search the web for the appropriate program)
    you might want to check what program (if any) got associated with .jar extensions :
    in Windows Explorer : Tools => Folder Options => File Types
    hth

  • Double click on jar file but does not launch

    My PC has windows7 operating system
    The jar file was working fine, everytime I double click it would launch, no problems
    Somehow the .jar file association was changed to open with winrar so now when I double click it does not launch and run like before, winrar opens it
    How can I change the file association back to java?
    Regards
    Edited by: muddy777 on Jan 9, 2010 9:42 PM
    Edited by: muddy777 on Jan 9, 2010 10:14 PM

    muddy777 wrote:
    I understand
    I know how to do this in windows xp but in windwos7 there is no way to enter " -jar "%1" %*
    I can only browse to where javaw.exe is located and select itI can't help you specifically, but found this using Google. [http://www.winvistaclub.com/t19.html]

  • Why does my .jar file do nothing when double clicked?

    Hi all. Just got into java, though I do have a background in Visual Basic, PHP, C / C++ and JavaScript. Anyway, i've written a "Hello World" program and it runs successfully in the IDE, however when I run the .jar executeable file, nothing happens. Why? Thanks in advance.

    I'm using NetBeans IDE, and I have everything set up correctly to the best of my knowledge. As said, no problems arise when running the application in the IDE, just running the .jar file directly is giving me problems. Here is the code if it provides any assistance in solving my problem:
    package including;
    * @author jayz
    import java.io.*;
    // #include <java.io.h>
    public class Main
        //in Java, everything is encapsulated in2 classes, not functions
        public Main()
        //creates a Main() object
        public static void main(String[] args)
            System.out.println("Hi");
        //is our main function (method)
    }

  • .jar file is not working properly :developed in NETBEANS

    Hi Gurus,
    i am using NETBEANS IDE 7.2.
    i am developing a project that interacts with databases 10g and COM ports of machine , these all processes are performed by .bat file which i am trying to run from jFramform , code works perfectly .bat file is also called perfectly when i run the project using F6 from the NETBEANS, for testing i placed some dialogue boxes on the form to test it ,
    but when i run executable .jar  file , form run successfully and dialogue box works perfectly but .bat file is not called by executable .jar file.
    this is how i call the .bat file...
      String filePath = "D:/pms/Libraries/portlib.bat";  
            try { 
              Process p = Runtime.getRuntime().exec(filePath); 
            } catch (Exception e) { 
                e.printStackTrace(); 
    and below is the contents of portlib.bat file
    java -jar "D:\SMS\SMS\dist\SMS.jar" 
    you must probably ask why i am calling a .jar file using .bat file .
    reason is that this .jar project sends message using GSM mobile , System.exit(); is compulsory to complete a job and then do the next one ,
    if i use the same file to execute this job it makes exit to entire the application (hope you can understand my logic).
    that's why i use extra .jar file in .bat file , when single job is completed .bat exits itself and new command is given.
    Problem is that code is working perfectly in NETBEANS when i run the project but when i run .jar then .bat file is not working  ,
    thanks.

    Thanks Sir ,
    You need to first test an example that works like the one in the article.
    There are plenty of other examples on the web - find one you like:
    http://javapapers.com/core-java/os-processes-using-java-processbuilder/
    I tried this one.
      try {
                ProcessBuilder dirProcess = new ProcessBuilder("D:/SMS/SMS/Send_message.bat");
                 File commands = new File("D:/SMS/SMS/Send_message.bat");
                 File dirOut = new File("C:/process/out.txt");
                 File dirErr = new File("C:/process/err.txt");
               dirProcess.redirectInput(commands);
                 dirProcess.redirectOutput(dirOut);
               dirProcess.redirectError(dirErr);
                 dirProcess.start();
            } catch (IOException ex) {
                Logger.getLogger(mainform.class.getName()).log(Level.SEVERE, null, ex);
    as instructed in the article i compiled  both the projects at same version or sources and libraries which is 1.7
    here is my version details
    C:\>javac -version
    javac 1.7.0_07
    C:\>java -version
    java version "1.7.0_07"
    Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
    Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
    inside the NETBEANS IDE c:\process\err.txt  remains empty and code works perfectly , but when I run executable .jar file( by double clicking on that file in dist directry) then c:\process\err.txt becomes full with this error text and there is no response from calling D:\SMS\SMS\send_message.bat
    here is the error text
    java.lang.UnsupportedClassVersionError: sms/SMSMAIN (Unsupported major.minor version 51.0)
      at java.lang.ClassLoader.defineClass0(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$100(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 java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"
    here is /SMS/SMS
    unknown source ?

  • Access of MySQlL Driver class by eclipse but not from Outside Jar file

    Dear All,
    I have done a standalone application having access with MySQl database.
    I could access it when i execute it from eclipse. But when i export it into Jar file and running I get MySQL Driver class not found exception.
    Give me a better solution for this issue.

    CLASSPATH, CLASSPATH, CLASSPATH.
    You have defined the Eclipses Project Library Path to include the MySQL jar, but ar not including it on the classpath when executing the jar.
    Either modify the MANIFEST.mf file in the jar to include a reference to the MySQL driver jarfile or call java in the following manner
    java -cp /full/path/to/MySQL/Driver/jarfile.jar -jar yourJarFile.jarObviously, if this is on Windows and you are executing through a double click, the first option is the best option.

  • Project behaves differently as a jar file

    I am attempting to implement a project. My development was done with netBeans 4.0. I have created a jar file with my project. When I double click on the jar file I get a frame with buttons that appear to be working correctly. When I push a button the correct frame appears with a JComboBox. When I select the first entry in the JComboBox I am ignored, however the second element to the combo box works as expected. This project executes correctly from the run icon in netbeans.
    Where do I start to debug this? Does this sound familiar to anyone.
    Thanks
    PS is this the correct forum?

    PS is this the correct forum? No, these forums are for the Java language only, and do not support for NetBeans (or any other IDE.)
    NetBeans' website provides NB support via a mailing list; there may be others.
    NB provides tutorials that cover most situations; see
    http://www.netbeans.org/kb/articles/javase-deploy.html

Maybe you are looking for

  • Macbook 2010 froze and wont boot primary ssd

    My macbook pro 2010 froze all of a sudden and i forced it to quit with the power button held. That shouldn't be anything exceptional. Now the computer does not boot to primary ssd or even notice it with cms pressed, from secondary windows hdd or from

  • TIME-OUT error in BSAK select query(Progress Indicator is also used)

    Hi,     In my report program one select query is there on BSAK table, which is as follows --        SELECT BUKRS                                                                           BELNR                     GJAHR                     SHKZG      

  • PSE6 and a new imac

    (The imac is only 3 months old and yes with Snow Leopard newly installed a few days ago also...) I just bought and received my copy of PSE6 tonight and have had no luck installing it.  It started out slowly (the progress bar seemed to be running thro

  • Problem With Mac Book

    KCNcrew 07-15-07 pack after installing this my programs quits or programs don't load plz help install there APE Patcher

  • Air sdk 16.0 and mobile theme css

    Hi, I use AIR SDK 16.0 in order to build an ARM 64bits for IOS. However the default css mobile theme (mobile.swc) is not taken in consideration while with SDK 15.0 it was ok. How do I can use default.css of mobile.swc with SDK 16.0? Thanksin advance,