Executing a jar file in Linux
Heh, what @marc is trying to say in his comment is that how you do that could be wildly different depending on your linux flavor. In general, you just need to find out how to change the default "Open With" behavior for whichever flavor you're using. You need to tell it to open jar files with Java instead of with the archive program.
How can I execute .jar file from the terminal without specifying its name
I am not sure it would be a good idea to just run everything in a directory, but you could:
FOR %A IN ("*.jar") DO (java -jar "%~A")
Running .jar File on Linux
First, try running it on the command-line, with
java -jar <file.jar>
The user.dir
property is cross-platform (see here) so it should not be the problem. However, are you using correct file separators? Remember it's '/' on UNIX and '\' on Windows.
how to run a jar file on the ubuntu 14.04 without stopping when i stopped the putty?
You can use nohup to run the jar(any process) in background.
Use the following command in the putty session :
nohup java -jar xxx.jar &
Related Topics
Is a Java Filelock a Posix Advisory (Fcntl) Lock
Certificateexception: No Subject Alternative Names Present
Cassandra Startup Error 1.2.6 on Linux X86_64
Why Is Alternatives Command Used When Installing Java on a Linux MAChine
Seeing All the System Calls That Were Made by a Java Program
How to Call Method in Jar File with Terminal
Unsatisfiedlinkerror When Using Jni
Jfilechooser and Browsing Networked MAChines
Command Working in Terminal, But "No Closing Quote" Error When Used Process.Exec
One to One Mapping of Java Thread to Linux Thread (Lwp)
Commportidentifier.Getportidentifiers with Zero Ports on Linux
Making a Java Package in the Command Line
How to Include Platform-Specific Native Libraries in the .Jar File Using Eclipse
When to Use Generic Methods and When to Use Wild-Card