-2

I cant export my JAR file, its just a simples ''hello world'' code and I want to export it as a JAR file. But it gives me an error I cant figure out how to solve. Pls look at my step by step trying to create a jar file

My code

Clicking on Export

Selecting workspace and code but it gives me that error

My configure classpath

0

1 Answer 1

0

Instead of opening the parent folder containing all languages, you should open the Java project's folder as a workspace.

Alternatively you can export the jar file using the jar command. E.g:

jar cf App.jar -C classes
2
  • The error still happens if only my java program folder is open. That code gives me this error jar : The term 'jar' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + jar cf App.jar -C classes + ~~~ + CategoryInfo : ObjectNotFound: (jar:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Jul 27, 2022 at 22:15
  • Have the jdk and java extensions installed according to this article?
    – JialeDu
    Jul 28, 2022 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.