How to open and run a java software: jstock

Asked by Ian Milne

I'm running Ubuntu 12.04 and have downloaded a file /home/ian/jstock-1.0.6q-bin.zip. This file I have unzipped into folder /home/ian/.tmp/jstock, how do I open the software to use it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubuntu-meta Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try:

sudo apt-get install unp

Can you also give the output of:

find /home/ian/.tmp/jstock

Thanks

Revision history for this message
Ian Milne (i-m) said :
#2

Many thanks. Tried sudo apt-get install unp what should have happened?

Output as requested below:

ian@Ianz-pc:~$ find /home/ian/.tmp/jstock
/home/ian/.tmp/jstock
/home/ian/.tmp/jstock/config
/home/ian/.tmp/jstock/config/commons-logging.properties
/home/ian/.tmp/jstock/database
/home/ian/.tmp/jstock/database/database.zip
/home/ian/.tmp/jstock/lib
/home/ian/.tmp/jstock/lib/dom4j-1.6.1.jar
/home/ian/.tmp/jstock/lib/jackson-mapper-lgpl-1.5.7.jar
/home/ian/.tmp/jstock/lib/jxlayer.jar
/home/ian/.tmp/jstock/lib/xml-writer-0.2.jar
/home/ian/.tmp/jstock/lib/xstream-1.4.2.jar
/home/ian/.tmp/jstock/lib/gdata-core-1.0.jar
/home/ian/.tmp/jstock/lib/kxml2-2.3.0.jar
/home/ian/.tmp/jstock/lib/gdata-media-1.0.jar
/home/ian/.tmp/jstock/lib/google-collect-1.0-rc1.jar
/home/ian/.tmp/jstock/lib/nachocalendar-0.23.jar
/home/ian/.tmp/jstock/lib/swing-layout-1.0.jar
/home/ian/.tmp/jstock/lib/joda-time-1.6.jar
/home/ian/.tmp/jstock/lib/ta-lib-0.4.0.jar
/home/ian/.tmp/jstock/lib/gdata-client-1.0.jar
/home/ian/.tmp/jstock/lib/blobsallad.jar
/home/ian/.tmp/jstock/lib/commons-logging-1.1.jar
/home/ian/.tmp/jstock/lib/smack.jar
/home/ian/.tmp/jstock/lib/poi-3.2-FINAL-20081019.jar
/home/ian/.tmp/jstock/lib/jh.jar
/home/ian/.tmp/jstock/lib/jdom-1.1.jar
/home/ian/.tmp/jstock/lib/jcommon-1.0.16.jar
/home/ian/.tmp/jstock/lib/jakarta-oro-2.0.8.jar
/home/ian/.tmp/jstock/lib/xpp3_min-1.1.4c.jar
/home/ian/.tmp/jstock/lib/pinyin4j-2.5.0.jar
/home/ian/.tmp/jstock/lib/mail.jar
/home/ian/.tmp/jstock/lib/stax-1.2.0.jar
/home/ian/.tmp/jstock/lib/jfreechart-1.0.13.jar
/home/ian/.tmp/jstock/lib/gdata-docs-3.0.jar
/home/ian/.tmp/jstock/lib/forms-1.1.0.jar
/home/ian/.tmp/jstock/lib/commons-httpclient-3.1-rc1.jar
/home/ian/.tmp/jstock/lib/opencsv-2.3.jar
/home/ian/.tmp/jstock/lib/swingx-0.9.6.jar
/home/ian/.tmp/jstock/lib/jackson-core-lgpl-1.6.1.jar
/home/ian/.tmp/jstock/lib/jasypt-1.5.jar
/home/ian/.tmp/jstock/lib/commons-codec-1.3.jar
/home/ian/.tmp/jstock/lib/commons-lang-2.4.jar
/home/ian/.tmp/jstock/lib/commons-net-1.4.1.jar
/home/ian/.tmp/jstock/lib/stax-api-1.0.1.jar
/home/ian/.tmp/jstock/lib/smackx.jar
/home/ian/.tmp/jstock/lib/l2fprod-common-all.jar
/home/ian/.tmp/jstock/lib/gdata-calendar-2.0.jar
/home/ian/.tmp/jstock/lib/commons-validator-1.3.1.jar
/home/ian/.tmp/jstock/lib/AbsoluteLayout.jar
/home/ian/.tmp/jstock/lib/cglib-nodep-2.2.jar
/home/ian/.tmp/jstock/lib/xom-1.1.jar
/home/ian/.tmp/jstock/lib/JHotDraw7.jar
/home/ian/.tmp/jstock/jstock.jar
/home/ian/.tmp/jstock/extra
/home/ian/.tmp/jstock/extra/extra.zip
/home/ian/.tmp/jstock/docs
/home/ian/.tmp/jstock/docs/gpl-2.0.txt
/home/ian/.tmp/jstock/docs/contributors.txt
/home/ian/.tmp/jstock/docs/changelog.txt
/home/ian/.tmp/jstock/jstock.sh
ian@Ianz-pc:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Then run:

cd /home/ian/.tmp/jstock/; chmod +x ./jstock.sh; ./jstock.sh

Revision history for this message
Ian Milne (i-m) said :
#4

That seems to work but there's a reference to java :-

ian@Ianz-pc:~$ cd /home/ian/.tmp/jstock/; chmod +x ./jstock.sh; ./jstock.sh
Warning: /bin/java does not exist
requestFocus
ian@Ianz-pc:~/.tmp/jstock$

presumably you don't get java in linux or can you?

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#5

I think you should install openjdk java runtime:

sudo apt-get install openjdk-7-jre

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#7

@ actionparsnip: is it better to use Oracle Java? I'm using OpenJDK but a few things don't work, like online games.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

Try both

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#9

Thanks! Using the PPA you mentionned has just fixed a long time issue. ;)

Revision history for this message
Ian Milne (i-m) said :
#10

 Many thanks Emmanuel Thomas-Maurin and actionparsnip.

The command "ian@Ianz-pc:~$ cd /home/ian/.tmp/jstock/; chmod +x ./jstock.sh; ./jstock.sh" works and opens the software, but even though I lock the icon to the launcher, once I've closed it down clicking the icon wont launch it though the icon pulses for a few seconds. Also I can't find it in the list of installed software.

I tried both commands suggested to load java runtime but neither seem to have worked with jstock.

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#11

Could you right-click the icon, open 'properties', and tell us what you read in the 'command' field?

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#12

If you run:

sudo wget -O /usr/share/icons/jstock.png http://freecode.com/screenshots/65/ea/65eaa7e610f8886a8fc4caaa6b416df5_medium.png

gksudo gedit /usr/share/applications/jstock.desktop

add the below code:

[Desktop Entry]
Name=JStock
GenericName=JStock
Comment=Stock market software
Exec=/home/ian/.tmp/jstock/jstock.sh
Terminal=false
Type=Application
Icon=/usr/share/icons/jstock.png
Categories=GNOME;GTK;Utility
StartupNotify=false

Save the new file and close gedit, you should now find the application in dash, you should be able to drag it to the unity panel.

Revision history for this message
Ian Milne (i-m) said :
#13

Thanks actionparsnip, that solved my question.