Run my .jar on linux

Joe.Cole Posted messages 10 Status Membre -  
 missaoui -
Hello,
Actually, I created a project in Eclipse on Windows and I wanted to run it on Linux. I don't know how to do it!
I created my project.jar from Eclipse.
What should I do next?
What command should I type in the console?
Thank you for your help
Configuration: Windows XP Firefox 2.0.0.1

5 réponses

natas Posted messages 153 Status Membre 66
 
The command is :
 java -jar "your_program.jar" 


Of course, you need to have the JRE installed.
--
“The enemy is stupid: he believes that we are the enemy when in fact it's him!” - Pierre Desproges
48
missaoui
 
You just need to execute the command:

java -jar filename.jar

Boudjemaa Missaoui

Expert in systems and networks technologies:
Microsoft Windows, VMware, Linux, Profibus/ASI, SCADA
9
natas Posted messages 153 Status Membre 66
 
Hi,

for your questions about libraries added via Eclipse, they are usually encapsulated in the jar file it seems. However, if your program calls external libraries, then you will need to install Eclipse on Linux.

As for the directory on your Windows machine, a Samba mount on your Linux machine should do the trick.

Run a
man java
for more information on this command.
--
“The enemy is stupid: he thinks we are the enemy when it is actually him!” - Pierre Desproges
8
Joe.Cole Posted messages 10 Status Membre 4
 
Thank you for your response!
And for the libraries that I added under Eclipse, do I need to include them in the command line or not?

Another question: my app takes a directory on a Windows machine on the local network as an argument, how can I pass this argument?

Thank you for the answers.
3
Joe.Cole Posted messages 10 Status Membre 4
 
Help me please!
I have to submit this tomorrow!!!!!!
1