Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Invalid or corrupt jarfile

I wrote my java application via Eclipse Luna on Windows. And It is maven project. I exported runnable jar file with Extract required libraries into generated JAR option.

And then, copied and ran via java8 openjdk java8 -jar chatserver.jar on linux server(EC2 Amazon Linux).

However console outputs just error.

Error: Invalid or corrupt jarfile chatserver.jar

Here is my menifest.mf

Manifest-Version: 1.0
Class-Path: .
Main-Class: {serviceDomain}.chat.ChatServer

Name: org/aspectj/lang/
Implementation-Title: org.aspectj.tools
Implementation-Version: 1.8.2
Bundle-Name: AspectJ Runtime
Bundle-Version: 1.8.2
Specification-Vendor: aspectj.org
Specification-Title: AspectJ Runtime Classes 
Bundle-Copyright: (C) Copyright 1999-2001 Xerox Corporation, 2002 Palo
   Alto Research Center, Incorporated (PARC), 2003-2009 Contributors. 
  All Rights Reserved.
Specification-Version: 1.8
Implementation-Vendor: aspectj.org

How can I export java application correctly, or deploy my appliction easily?

like image 288
Minkyu Kim Avatar asked Mar 28 '26 22:03

Minkyu Kim


1 Answers

vServer Linux - Start jar: Invalid or corrupt jarfile

I found my answer.

I changed ftp mode to binary then works.

like image 173
Minkyu Kim Avatar answered Mar 31 '26 04:03

Minkyu Kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!