3 Replies - 1091 Views - Last Post: 12 December 2009 - 10:28 AM Rate Topic: -----

#1 kzhuravl   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 29-September 09

Creating executable jar file

Posted 10 December 2009 - 01:56 PM

Hello,

I wrote a program which uses RMI(Remote Method Invocation). I usually compiled and run it from command line using makefile.
This is how I compiled and run my Client:

/* Compiling */
javac -cp .:../lib/some.jar app/Server.java	/* Compile Server, so I can create stub classes for Client*/
javac -cp .:../lib/some.jar app/Client.java	 /* Compile Client */ 
rmic app.Server										 /* Java rmi compiler */

/* Running */
java -Djava.security.manager -Djava.security.policy=client.policy -cp .:../lib/some.jar app.Client



So I was wondering if somebody can help me to create executable JAR with those parameters using command line?
Any help is appreciated

P.S. I use linux
P.P.S I do not use Eclipse and other IDEs

Thanks for your help I really appreciate it.

Is This A Good Question/Topic? 0
  • +

Replies To: Creating executable jar file

#2 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3202
  • View blog
  • Posts: 19,235
  • Joined: 14-September 07

Re: Creating executable jar file

Posted 10 December 2009 - 01:57 PM

Read Me
Was This Post Helpful? 0
  • +
  • -

#3 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8379
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Creating executable jar file

Posted 10 December 2009 - 08:07 PM

or
http://java.sun.com/...deployment/jar/
Was This Post Helpful? 0
  • +
  • -

#4 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3632
  • View blog
  • Posts: 16,679
  • Joined: 20-September 08

Re: Creating executable jar file

Posted 12 December 2009 - 10:28 AM

You should probably get to know and use Ant - it will make things easier and more organised.
Get used to keeping your sources and classes in seperate branches of the tree. This will make things easier to organise when you come to making your jar
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1