question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing no longer works when exported as jar file

See original GitHub issue

Hello,

I’m using EmojiParser.parseToAliases(message) to convert emojis to to their aliases.

I’m reading messages from a third-party application which contain emojis.

I have two applications set up, one which I’m running from IntelliJ and one which is being exported as a .jar fille and executed via java -ver blah.jar

Whilst the pure Java application successfully parses the emoji to an alias, the exact same code exported as a .jar does not parse the emoji at all and still returns the emoji from EmojiParser.parseToAliases().

Happy to share some more code, thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
manuelgucommented, May 13, 2016

My IntelliJ terminal has UTF-8 encoding (that is why it works) while the Windows Powershell uses Windows-1252. I couldn’t figure a way to change that, but since my application is running on a linux terminal in bash it doesn’t really matter, because that one has UTF-8 encoding as well.

Replacing the emojis in the file sounds like a great idea though!

1reaction
Lolologistcommented, May 13, 2016

A good idea; I’ll give it a shot sometime soon.

-Daniel

On Thu, May 12, 2016, 10:53 PM Jean-Pierre Pommet notifications@github.com wrote:

@manuelgu https://github.com/manuelgu Not sure if you tried this but in the file emojis.json you would notice that the emojis are unicode, let’s replace the sunglasses emoji by its UTF-16 hex character “\uD83D\uDE0E” for example. Run your program in your IDE and as a jar, it should normally convert the emoji to its alias (short code). Let me know if it worked for you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/vdurmont/emoji-java/issues/33#issuecomment-218958016

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't a runnable JAR exported from Eclipse work?
Try to click on the option “Package required libraries into generated JAR”. A JAR file is a regular compressed archive.
Read more >
The java Command - Oracle Help Center
Arguments after the class file name or the JAR file name are passed to the main() method. javaw. Windows: The javaw command is...
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
My code runs if I run the main method, but is not running after I exported to jar file. When exporting, I chose,...
Read more >
google-java-format (and removeUnusedImports) broken on ...
By making them non-transient, the remote build cache will no longer work, because task inputs are now keyed on absolute paths. The root...
Read more >
Apache Tomcat 9 (9.0.70) - Changelog
Remove OSGi annotations dependency as it is no longer required with bnd 6.2.0. ... Use LF line endings for text files in JARs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found