-1

hello someone could suggest me how to compile the java project that I attach to generate the sri.jar file that appears in the Readme file

//Project java to compile https://github.com/joselo/sri

//command line where the sri.jar that I want to generate appears

 java -jar sri.jar /path/sample/certificate.p12 cErTiFicAtEPaSsWoRd /path/sample/unsignedFile.xml /path/sample outputFile.xml
user3821102
  • 139
  • 2
  • 13
  • 1
    I thought that to create a jar file took two steps: javac to create class files and jar to build the jar. – NormR Jun 08 '20 at 00:35
  • Could you help me with the full command since I am not proficient in java? – user3821102 Jun 08 '20 at 00:48
  • The task will be to use some tools provided in the JDK on your PC, There might not be any need to know the java language. Do you have a JDK installed? – NormR Jun 08 '20 at 01:23
  • I have a debian distro, and is this version ok https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html – user3821102 Jun 08 '20 at 01:35
  • With an IDE or Ant or Maven. There is really no excuse for using a command line any time in the last 20 years. – user207421 Jun 08 '20 at 03:37

1 Answers1

0

To create a jar file first thing that needs to be done is to compile the project using javac

javac -cp ./sri-master/lib/*: ./sri-master/src/sri/*.java -d ./out/

and then run the below to create the jar

jar cvfm xyz.jar ./sri-master/manifest.mf -C ./out/ .

Sambit Nag
  • 38
  • 5
  • Hello Kunal Vohra, thax for your response, I need help with one more thing, when i run the line it gives the following error: there is no main manifest attribute in xyz.jar – user3821102 Jun 09 '20 at 19:48
  • please check you are setting the right path for the manifest file – Sambit Nag Jun 10 '20 at 02:14