java - Jar built in windows does not run in linux -
i know there lot of posts on sof regarding same topic , feel problem little different.
i have maven based java project uses javafx . need create executable jar file , run command line or on double click of jar file.
this how build , relevant portion of pom.xml file
<plugin> <artifactid>maven-assembly-plugin</artifactid> <configuration> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> <archive> <manifest> <addclasspath>true</addclasspath> <mainclass>com.sumanta.mymain</mainclass> </manifest> <manifestentries> <class-path>./</class-path> </manifestentries> </archive> </configuration> </plugin>
i use maven build executable jar using
clean compile assembly:single
i using eclipse ide .
the jar file created runs on windows 8 on double click , command line.
now need run on ubuntu linux . have open jdk 8 installed linux installation when double click on jar file nothing happens.
then open terminal , give command
java -jar myexecutablejarfile.jar
i getting error
error: not find or load main class com.sumanta.mymain
it seems problem manifest file . file lists proper name along full package path of class contains main method
manifest-version: 1.0 archiver-version: plexus archiver created-by: apache maven built-by: ayan build-jdk: 1.8.0_71 main-class: com.sumanta.mymain class-path: ./
what wrong setup . need application run on windows , linux , , mac os. suppose since mac , linux unix type os , if application runs on linux run on mac os .
Comments
Post a Comment