textVary icon indicating copy to clipboard operation
textVary copied to clipboard

Error: Could not find or load main class textVary.jar

Open A6669 opened this issue 3 years ago • 6 comments

I have installed java, and when I click textvary.jar, nothing happened. then I use the command "java textVary.jar" to run it. But terminal just print "Error: Could not find or load main class textVary.jar" my java version is java version "1.8.0_311" Java(TM) SE Runtime Environment (build 1.8.0_311-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)

A6669 avatar Dec 11 '21 14:12 A6669

Can you try java –jar textVary.jar instead?

MrVPlusOne avatar Dec 11 '21 16:12 MrVPlusOne

Can you try java –jar textVary.jar instead?

it works, thank you. But can you fix it so that I only need to click it instead of using the command line? I use Mac 11.6.1

A6669 avatar Dec 12 '21 02:12 A6669

Are you using Windows? In Windows, I think you will need to right-click it and set the default opening application to Java.

MrVPlusOne avatar Dec 12 '21 02:12 MrVPlusOne

Are you using Windows? In Windows, I think you will need to right-click it and set the default opening application to Java.

No, I have said I used Mac 11.6.1. double-clicking does not work. right-clicking and choosing javalancher.app does not work either.

A6669 avatar Dec 12 '21 05:12 A6669

Well, I just tried to open it on my Mac, and below is error I got: image

To fix this, just go to Apple system preference -> Security and Privacy, find the warning and click "open anyway". Then you should be able to click-open the jar. image

MrVPlusOne avatar Dec 12 '21 06:12 MrVPlusOne

Well, I just tried to open it on my Mac, and below is error I got: image

To fix this, just go to Apple system preference -> Security and Privacy, find the warning and click "open anyway". Then you should be able to click-open the jar. image

double-clicking still does not work, and the terminal still works. I seem like there is some problem in your app. and it is a common problem. you can check this link. It talks about java in Windows, but maybe still works in Mac

A6669 avatar Dec 12 '21 07:12 A6669