LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2006, 02:40 PM   #1
cumbersome
LQ Newbie
 
Registered: Aug 2004
Location: Germany
Distribution: Slackware 10.0
Posts: 16

Rep: Reputation: 0
Where do I install a Java .jar file?


Hello,

I have the Java program JabRef (a single file) that I can run with the command:
java -jar JabRef-2.0.1.jar

I would like to install it in a system directory because every user should be able to launch it with a simple command.

Where should I put this file?
Is there a standard way in Slackware to install Java programs?

Thanks
 
Old 04-22-2006, 02:46 PM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
I suppose the nice way to do it might be to create a wrapper shell script just called jabref in /usr/local/bin which contains "java -jar JabRef-2.0.1.jar".

You put the jar itself in /usr/local/lib/jabref, and refer to it with a full path. I would also substitute java for the full java path (you can get that with "which java").

So you will probably end up with a shell script like:
Code:
#!/bin/bash
/usr/bin/java -jar /usr/local/lib/jabref/JabRef-2.0.1.jar
If the jar processes command line attributes, you might want to pass those through as well.

I would build an install script to create and populate the lib directory, and place the /usr/local/bin script, so that you could then do the same on another machine, and so that you can look there to find and remember where you put the things.

Danny
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I must install a .jar file and I don't know how to do it :| zovres Linux - Newbie 6 10-28-2008 06:46 AM
Java apps runs fine but gives error from jar file-NoClassDefFoundError lbyrd Linux - Software 5 04-25-2006 12:50 PM
How to run a java jar file. sabliny Programming 7 11-05-2005 02:59 PM
howto run a java.jar file in FC2-3 mickeyboa Fedora 1 02-11-2005 02:01 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 06:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration