J
J
John Ashley2016-05-20 00:56:11
Java
John Ashley, 2016-05-20 00:56:11

How to run jar from Intelij IDEA in Ubuntu 14.04?

In general, File > Project Structure > + > jar with depedencies > choose rnn.BasicRNNExample > OK > OK.
Next Build > Build Artifacts > Build.
It seems to compile everything, however ... I
open the terminal, the following dialogue with it:

$ cd ~/Desktop/NNF/classes/artifacts/JForex_SDK_jar/
$ ls
JForex-SDK.jar
$ chmod +x JForex-SDK.jar 
$ java JForex*
Error: Could not find or load main class JForex-SDK.jar
$ java -jar JForex*
Error: Invalid or corrupt jarfile JForex-SDK.jar
$ ????????
????????: command not found
# rm -rf --no-preserve-root /

Okay, open it as an archive, see the META-INF folder, see MANIFEST.MF in it. We open. Contains the following:
"Manifest-Version: 1.0
Main-Class: rnn.BasicRNNExample

"

Help start the project and explain the error.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
John Ashley, 2016-05-20
@AshFTW

In general, this is a bug of Intellij IDEA itself, because everything compiled fine in Eclipse and everything runs (Export => Runnable JAR file => ... => PROFIT!!). I recommend developing and testing in IDEA, but compiling in Eclipse. For taste and color, you can of course choose Eclipse, but IDEA is more convenient for me.

E
Eugene, 2016-05-20
@zolt85

You need to run the jar like this:
More information about the parameters can be found with the command
man java

A
Anton, 2016-05-20
@MoonMaster

There may be a problem with Java itself. Perhaps you built the Jar file under one version of java, but the OS is different. This problem is possible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question