Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class main not found after building pom.xml with maven #6

Open
jvezinat opened this issue Nov 25, 2020 · 1 comment
Open

Class main not found after building pom.xml with maven #6

jvezinat opened this issue Nov 25, 2020 · 1 comment

Comments

@jvezinat
Copy link

POM.txt
log.txt

E:\sdkj4_with_deps>mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: E:\apache-maven-3.6.3\bin..
Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_271\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

E:\sdkj4_with_deps>java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)


When trying to use jar as a library or run via command line/IDE i get the following error:
E:\sdkj4_with_deps>mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: E:\apache-maven-3.6.3\bin..
Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_271\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

E:\sdkj4_with_deps>java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)


When trying to use jar as a library or run via command line/IDE i get the following error:
E:\sdkj4_with_deps\target>java -jar sdk4j-with-dependences-1.0-SNAPSHOT.jar
Error: Could not find or load main class com.openkm.Main

When added to "C:\Program Files\Java\jdk1.8.0_271\jre\lib\ext" i am unable to import any of the sdkj4.


@darkman97i
Copy link
Collaborator

That's because does not exist a main class in the jar file, these are libraries to be used with another applications ( or build your own ). I suggest read:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants