textVary
textVary copied to clipboard
Error: Could not find or load main class textVary.jar
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)
Can you try java –jar textVary.jar instead?
Can you try
java –jar textVary.jarinstead?
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
Are you using Windows? In Windows, I think you will need to right-click it and set the default opening application to Java.
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.
Well, I just tried to open it on my Mac, and below is error I got:

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.

Well, I just tried to open it on my Mac, and below is error I got:
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.
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