Open adelbs opened 5 years ago
To execute the jar file, run this command:
java
-cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main
I'll create the manifest as soon as possible.
Hi,
I tried that and got:-
c:\ISO8583\ISO8583-master\target>java -cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main
Exception in thread "main" java.lang.NullPointerException
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at org.adelbs.iso8583.Main.<init>(Main.java:50)
at org.adelbs.iso8583.Main.main(Main.java:25)
Regards,
Ed Holt
From: Felipe Jacob notifications@github.com Sent: 29 March 2019 03:46 To: adelbs/ISO8583 ISO8583@noreply.github.com Cc: bastet77 ed.holt@btinternet.com; Mention mention@noreply.github.com Subject: Re: [adelbs/ISO8583] Create a manifest file (#27)
To execute the jar file, run this command:
java -cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main
I'll create the manifest as soon as possible.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adelbs/ISO8583/issues/27#issuecomment-477856074 , or mute the thread https://github.com/notifications/unsubscribe-auth/ADN0TBA7a4aXmuf3GTSfuScmJ6LAar8vks5vbYxggaJpZM4cRkSC . https://github.com/notifications/beacon/ADN0TKiFQyhFqbo9Z-wiw-JqHMS6HMS0ks5vbYxggaJpZM4cRkSC.gif
Hi Ed!
What JDK version did you use to compile it? What java -version are you using to run it? What is your operating system?
This line refers to this code:
setIconImage(Toolkit.getDefaultToolkit().getImage(Main.class.getResource("/org/adelbs/iso8583/resource/package.png")));
So, check if inside the generated jar file there is this image: /org/adelbs/iso8583/resource/package.png
If not, there is something wrong with the build.
Hi
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ Adelbs-ISO8583 ---
[INFO] Building jar: c:\ISO8583\ISO8583-master\target\Adelbs-ISO8583-1.1.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.165 s
[INFO] Finished at: 2019-03-29T21:52:34Z
[INFO] ------------------------------------------------------------------------
c:\ISO8583\ISO8583-master>mvn -version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T19:41:47+01:00)
Maven home: c:\maven\bin..
Java version: 1.8.0_112, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_112\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
c:\ISO8583\ISO8583-master>cd target
c:\ISO8583\ISO8583-master\target>
c:\ISO8583\ISO8583-master\target>echo %java_home%
C:\Program Files\Java\jdk1.8.0_112
c:\ISO8583\ISO8583-master\target>
Hi did a search for png in the jar file and didn’t find anything. All the pngs are in the resource file.
Hope this helps,
Regards
Ed Holt
From: Felipe Jacob notifications@github.com Sent: 29 March 2019 17:49 To: adelbs/ISO8583 ISO8583@noreply.github.com Cc: bastet77 ed.holt@btinternet.com; Mention mention@noreply.github.com Subject: Re: [adelbs/ISO8583] Create a manifest file (#27)
Hi Ed!
What JDK version did you use to compile it? What java -version are you using to run it? What is your operating system?
This line refers to this code:
setIconImage(Toolkit.getDefaultToolkit().getImage(Main.class.getResource("/org/adelbs/iso8583/resource/package.png")));
So, check if inside the generated jar file there is this image: /org/adelbs/iso8583/resource/package.png
If not, there is something wrong with the build.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adelbs/ISO8583/issues/27#issuecomment-478090273 , or mute the thread https://github.com/notifications/unsubscribe-auth/ADN0TO4zioiUS_YaLUec4rgEBKtbYGBuks5vblILgaJpZM4cRkSC . https://github.com/notifications/beacon/ADN0TD9i5VuoEXUX8IdnFeGoxwfRRKtgks5vblILgaJpZM4cRkSC.gif
Hi Adelbs
I could already compile with the version of java 1.8 on my Mac osx 10.13.6
> Schmuckes-MacBook-Pro:target schmucke$ java -version
> java version "1.8.0_202"
> Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
> Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
>
but I had the same error
> Schmuckes-MacBook-Pro:target schmucke$ java -cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main
> Exception in thread "main" java.lang.NullPointerException
> at sun.awt.SunToolkit.imageCached(SunToolkit.java:899)
> at sun.lwawt.macosx.LWCToolkit.getImage(LWCToolkit.java:549)
> at org.adelbs.iso8583.Main.<init>(Main.java:50)
> at org.adelbs.iso8583.Main.main(Main.java:25)
verifying and the jar is missing the entire resource folder, unload it, copy the folder and repackage it and it works, something must be missing in the maven
Hi, What commands did you use to unload and reload a jar file. I tried to add the file to the jar using zip but then when I executed the java command I got....
c:\ISO8583\ISO8583-master\target>java -cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main Error: Could not find or load main class org.adelbs.iso8583.Main
Clearly I have done something wrong.
Hi, use the jar tool to unpack and package, the zip compress and decompress it is not correct.
https://docs.oracle.com/javase/tutorial/deployment/jar/unpack.html
Hi,
Thanks for that. Worked a treat.
Regards,
On Mon, 1/4/19, Ab4cus notifications@github.com wrote:
Subject: Re: [adelbs/ISO8583] Create a manifest file (#27) To: "adelbs/ISO8583" ISO8583@noreply.github.com Cc: "bastet77" ed.holt@btinternet.com, "Mention" mention@noreply.github.com Date: Monday, 1 April, 2019, 14:57
Hi,
use the jar tool to unpack and package, the zip compress and decompress it is not correct. https://docs.oracle.com/javase/tutorial/deployment/jar/unpack.html
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
OK got past the missing resources but now when I press any thing on the panel I get other exception errors;-
c:\temp>java -cp ./Adelbs-ISO8583-1.1.1.jar org.adelbs.iso8583.Main Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For inpu t string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.adelbs.iso8583.gui.PnlISOProperties.save(PnlISOProperties.java:97 ) at org.adelbs.iso8583.gui.PnlISOProperties$1.actionPerformed(PnlISOPrope rties.java:52) at javax.swing.JComboBox.fireActionEvent(Unknown Source) at javax.swing.JComboBox.setSelectedItem(Unknown Source)
Regards,
Ed Holt
On Mon, 1/4/19, Ab4cus notifications@github.com wrote:
Subject: Re: [adelbs/ISO8583] Create a manifest file (#27) To: "adelbs/ISO8583" ISO8583@noreply.github.com Cc: "bastet77" ed.holt@btinternet.com, "Mention" mention@noreply.github.com Date: Monday, 1 April, 2019, 13:57
Hi,
use the jar tool to unpack and package, the zip compress and decompress it is not correct. https://docs.oracle.com/javase/tutorial/deployment/jar/unpack.html
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Applied @ab4cus suggested fix and managed to succesfuly run the project.
@adelbs May I please take up this issue so I can provide a permanent fix? If so please assign the issue to me.
@adelbs please accept the pull request, so the issue will be fixed, public still experiencing this issue
Hi,
Given that no fix has yet been issued, would it be possible to get an explanation on:
Thank you in advance. :)
Br,
Are you guys still having the problem? From here what I did was to use the maven package on eclipse and also to have the JDK instead of the JRE. Please let us know here before we close the issue.
Hi. I tried maven package and indeed it built a jar file to the target directory. But, however, when I issue java -jar Adelbs-ISO8583-1.1.1.jar it comes back with the message
c:\iso8583\ISO8583-master\target>java -jar Adelbs-ISO8583-1.1.1.jar no main manifest attribute, in Adelbs-ISO8583-1.1.1.jar
Originally posted by @bastet77 in https://github.com/adelbs/ISO8583/issues/26#issuecomment-477803725