I tried to run the jar file by selecting “Run configurations” and then creating a new Java application, but Eclipse wants me to give it the main class and the project link. Can't I just give the eclipse jar file?
You can launch the JAR with the launch tool configuration "External tool" located in the "Run"> "External tools"> "External tool configurations" section.
You cannot directly execute the jar file. Instead, you need to run it using the java -jar . To do this, you:
java -jar
Fill in:
Location: /usr/bin/java (or the route to the java executable, on Linux you can find it by running which java on the terminal, on Windows you can use where java on the command line)
/usr/bin/java
which java
where java
Working directory: working directory for your jar program (usually its location)
Arguments: -jar [path to your jar]
-jar [path to your jar]
Is the jar file you provided open? public static void main (String [] arg)? In order for java to launch yours and the application, there must be a main class with "public static void main (String [] arg)". So jvm will understand the starting point of your jar.
Try the following command line
C:\Program Files (x86)\Java\jdk1.6.0_24\bin\javaw.exe
with the following arguments (one per line)
-cp C:\dev\tcpmon-1.0-bin\build\tcpmon-1.0.jar org.apache.ws.commons.tcpmon.TCPMon
Source: https://habr.com/ru/post/1415325/More articles:Change login for report deployment - visual-studio-2008https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1415321/websql-database-size-difference-on-device-iosandroid-and-on-desktop&usg=ALkJrhjQtC_VO0Wxj5Ahaskws6v1QdMAbwHow to fix the error "version" GLIBC_2.14 "not found"? - cHTML5 Database Memory Usage Determination - memory-managementcan i use the eclipse.classpath file to set the class classes and run the jar from the command line? - classpathModifying a temporary object - c ++How can I drag cross tags in a browser using javascript or jQuery? - javascriptCurved buttons and circle - androidHow to include the necessary files for Jenkins Job (Delphi) - build-automationDistribution of the application for the Play 2.0.1 platform - scalaAll Articles