1

I've read a lot of troubleshooting for similar occurrences of this error, but what is causing it for this particular .jar? https://download.cnet.com/android/nabin-bhandari/3260-20_4-10982661-1.html

It works on Windows, but when attempting to run the file on a raspbian (linux) system running java version 1.8.0_65 with the command java -jar Local\ Area\ Messenger\ Desktop.jar it throws the error about not being able to find or load the main class.

The MANIFEST.MF defines Main-Class: com.nabinbhandari.lam.Main and there doesn't appear to be any issues with case sensitivity.

What am I missing? Do I need to install something more than Java Runtime Environment?

Edit: In case it is not clear, I am not the developer of this file. I am simply a user trying to run the file. This question has nothing to do with Eclipse and I don't understand why people are linking to that other question. I am not running Eclipse. Please stop linking to that. Please examination the .jar file I have provided.

Edit 2: I have followed the instructions and in this answer: https://stackoverflow.com/a/1238173/2407742 It gives the error no main manifest attribute, in test.jar Is there something missing from my java runtime environment? It seems like nothing works.

iyrin
  • 612
  • 5
  • 14
  • Why you mentions filedropper url?? Can you explain more on that..what issue with that? – bangoria anjali Aug 24 '18 at 17:28
  • That is so people can download and examination the .jar file in question. – iyrin Aug 24 '18 at 17:30
  • Possible duplicate of [Could not find or load main class in STS/Eclipse](https://stackoverflow.com/questions/37447721/could-not-find-or-load-main-class-in-sts-eclipse) – P.J.Meisch Aug 24 '18 at 17:31
  • https://stackoverflow.com/questions/13898832/java-compiling-error-could-not-find-or-load-main-class-main-java you may get answer from here. – bangoria anjali Aug 24 '18 at 17:33
  • I am not running Eclipse. I don't understand why that question is being linked again as relevant to the question. @bangoria which answer are you recommending from the question you linked? – iyrin Aug 24 '18 at 17:57
  • If you guys think it is a developer issue and not something I can solve as a user, please examine the file in question and let me know. – iyrin Aug 24 '18 at 18:00
  • I get a 404 when I try to `wget http://www.filedropper.com/localareamessengerdesktop` – Robert Aug 24 '18 at 20:40
  • I found the file here as well. https://download.cnet.com/android/nabin-bhandari/3260-20_4-10982661-1.html – iyrin Aug 24 '18 at 21:34

2 Answers2

1

The Local Area Network Messenger application was developed using JavaFX, which is not included in the Oracle Java build for Rasperry Pi. I had to reinstall Java and then openjfx by doing the following:
sudo apt-get purge openjdk-8-jre-headless
sudo apt-get install openjdk-8-jre-headless
sudo apt-get install openjdk-8-jre
sudo apt-get install openjfx

It runs fine now.

iyrin
  • 612
  • 5
  • 14
-1

The solution to this was the following:

Close Eclipse/STS Use a file explorer on your operating system to navigate to your workspace (In my case, I'm on Windows so I used Windows Explorer) Delete the .metadata directory (or to be safe, copy the directory somewhere else to be safe, then delete it) Restart Eclipse/STS Is there a more improved answer than this? I don't want to look like I'm trying to boost my own reputation points, so if someone can provide a better answer then please do so.

bangoria anjali
  • 400
  • 1
  • 10
  • 1
    Can you please not copy paste answers from different questions. Just flag the question as possible duplicate with https://stackoverflow.com/questions/37447721/could-not-find-or-load-main-class-in-sts-eclipse – Andrei Sfat Aug 24 '18 at 17:15
  • Ok...I'll do that – bangoria anjali Aug 24 '18 at 17:16
  • 1
    I'm not running eclipse nor do I have it installed. How does this pertain to the question? – iyrin Aug 24 '18 at 17:16
  • Ok. So Make sure .class file should get generate of all available java files. – bangoria anjali Aug 24 '18 at 17:18
  • If there is an answer that provides a solution to this specific case for this specific .jar file, please link to that. The provided answer does not work so please do not mark as duplicate yet, people! Thanks – iyrin Aug 24 '18 at 17:18
  • bangoria, it seems to generate just fine when it is run on Windows. I'm not clear on what you are recommending for running the file on Linux. I provided a link to the file in question if you would like to look at it yourself. – iyrin Aug 24 '18 at 17:20