java - My application don't run properly when packaged as a Jar -
i following file > export > runnable jar file
create runnable jar file of eclipse java project. when run application eclipse, works fine.
but when run exported jar file, this.
in order , export tab inside build path, have checked externals jars needed. ant script got created.
<?xml version="1.0" encoding="utf-8" standalone="no"?> <project default="create_run_jar" name="create runnable jar project server_side jar-in-jar loader"> <!--this file created eclipse runnable jar export wizard--> <!--ant 1.7 required --> <target name="create_run_jar"> <jar destfile="c:/users/nikitha/desktop/server.jar"> <manifest> <attribute name="main-class" value="org.eclipse.jdt.internal.jarinjarloader.jarrsrcloader"/> <attribute name="rsrc-main-class" value="start"/> <attribute name="class-path" value="."/> <attribute name="rsrc-class-path" value="./ mysql-connector-java-5.1.24-bin.jar activation.jar comm.jar jsms.jar jwap.jar jwap-src.jar mailapi.jar servlet.jar forms-1.3.0.jar"/> </manifest> <zipfileset src="jar-in-jar-loader.zip"/> <fileset dir="e:/eclipse juno/workspace/server_side/bin"/> <zipfileset dir="e:\eclipse juno\mysql-connector-java-5.1.24" includes="mysql-connector-java-5.1.24-bin.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="activation.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="comm.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="jsms.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="jwap.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="jwap-src.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="mailapi.jar"/> <zipfileset dir="e:\eclipse juno\jsms-2.3.2\jsms-2.3.2\lib" includes="servlet.jar"/> <zipfileset dir="e:\eclipse juno\workspace\server_side" includes="forms-1.3.0.jar"/> </jar> </target> </project>
in code, after displaying combobox port, next step display available serial ports using commportidentifier
there problem in step? because according ant script, comm.jar included. shouldn't causing problem here.
only reason see happen populating these fields external text file may not found during runtime of jar execution. when create jar file must add other dependent files/resources need.if language dropdown not displayed due resource not found swing not execute next instructions display other contents on container.
can provide errors/exceptions or warning getting?
Comments
Post a Comment