LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2010, 05:56 AM   #1
origami-sheep
Member
 
Registered: Dec 2009
Distribution: Arch
Posts: 103

Rep: Reputation: 2
Question making a ('list'?) of commands to run


i have a java program and to run it, i have to go into terminal and type
cd <where the file is>
java -jar <filename>.jar
this works fine, but is there a way to make a shortcut/small program to do this for me when i double click?
 
Old 12-11-2010, 06:32 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You appear to be using Ubuntu. If that is correct then you can move the mouse pointer to an empty area on the desktop and click the right mouse button. A menu will appear. Click on "Create Launcher...". A window will appear with a form to fill in. When you have finished entering the appropriate information then click on the "OK" button in the lower right of the window. When you do this an icon will appear on your desktop.
 
Old 12-11-2010, 06:37 AM   #3
origami-sheep
Member
 
Registered: Dec 2009
Distribution: Arch
Posts: 103

Original Poster
Rep: Reputation: 2
thanks, i really wasnt sure what to do

cheers
 
Old 12-11-2010, 09:20 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A launcher may not always work.

But a script can. Make it executable, and cp script /usr/local/bin/
Code:
#!/bin/sh
cd <where the file is>
java -jar <filename>.jar
A launcher can then start the <script>.
..
 
  


Reply

Tags
command, java, list, string, terminal



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
list of commands eric2000 Linux - Newbie 6 01-06-2006 02:17 AM
Making some commands run everytime I start Linux (Slack 9.1) Agna Linux - Newbie 7 08-26-2005 09:38 PM
Script to Run the Same Commands on a List of Files Chryzmo Programming 1 10-03-2004 08:34 AM
Making Commands for an Applikation dragomir Linux - Newbie 2 02-21-2004 08:23 PM
list of commands JROCK1980 Linux - General 2 02-16-2004 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 PM.

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