I have a problem installing "JStock on Ubuntu 20.04"

Asked by Erich Aufmbruch

For the last 10 days I have failed to install " JSock " to my PC with newly installed OS Ubuntu 20.04 - - I have tried many recommendations from the Internet but nothing worked. What I did to date.:

a) I installed Java version.:

erich@erich-Aspire-E1-571:~$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
erich@erich-Aspire-E1-571:~$

b) I have dowloaded the JStock file and saved to various Files like "Home" like "Home/Downloads"

x-special/nautilus-clipboard
copy
file:///home/erich/jstock-1.0.7.45-bin.zip

c) My new Linux system is "Ubuntu 20.04"

As I have tried any recommendation on the Internet without success I would now need a line by line
Instruction which is prooven to work as well as some comment as to what I need to do with the installed
Java details?

I have used the JStock program for years with a range of Windows programs and there was never a problem
and even the installations worked always very easy when changing to a windows upgrade. I would be greatfull
if someone could help me.

I speak German as well

Thank you in advance Erich

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What output do you receive when you open a terminal window and execute the commands listed on

https://jstock.org/help_install_upgrade.html#install-linux

(you can skip the first two commands, because you have already done the download)

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

I found this:
http://softwaredoubts.blogspot.com/2013/11/how-to-install-jstock-in-ubuntu.html

If you run:

sudo apt install unp
sudo mv /home/erich/jstock-1.0.7.45-bin.zip /opt
cd /opt
sudo unp ./jstock-1.0.7.45-bin.zip
cd /opt/jstock
sudo chmod 755 jstock.sh
wget -O jstock.png http://lh3.ggpht.com/i0snKN9_eMgGL_AkhJsfKIgYZ5xr8K_l6gER7VU_bk5QJWn9J6mPCBNFfN8IqdC9zQ=w300

You can make a launcher with:

sudo gedit /usr/bin/applications/jstock.desktop

Add the below text:

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

Save the file, close the text editor and enjoy.

HTH

Revision history for this message
Erich Aufmbruch (ericaufm) said :
#3

On 2020-07-08 04:15, Manfred Hampl wrote:
> Your question #691756 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691756
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What output do you receive when you open a terminal window and execute
> the commands listed on
>
> https://jstock.org/help_install_upgrade.html#install-linux
>
> (you can skip the first two commands, because you have already done the
> download)
=========================================================================
High Manfred 09.07.20

Following your advise I left the first two lines off and I got the
JStock program. It looks OK. Need to transfer my Portfolio still etc.

I also got the MSG "System Tray not supported" and I do not know the
consequences further on ?

One more thing - the JStock logo appeared in the favorites list on the
LH side
OK however it dissapears when I close the program. To start the program
again I would
need to run the previous lines on the terminal again how can I overcome
this ?

My knowledge with Linux is about four weeks old after decades with all
Windows
systems - I finally changed to Linux after endles problems with windows
upgrades
etc. - I hope I made the right choice. - I do appreciate your help.

Thank You
Regards Erich

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

To start jstock again open a terminal window and execute the commands

cd jstock/
./jstock.sh

This should start jstock again, and show the JStock logo in the favorites bar at the left hand side.
Click on that icon with the right mouse button and select "Add to favourites". This should keep the icon there, that you can use it for starting the program again.

If anything does not work as desired, just ask again.

Revision history for this message
Erich Aufmbruch (ericaufm) said :
#5

On 2020-07-09 06:41, Manfred Hampl wrote:
> Your question #691756 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691756
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> To start jstock again open a terminal window and execute the commands
>
> cd jstock/
> ./jstock.sh
>
> This should start jstock again, and show the JStock logo in the
> favorites bar at the left hand side.
> Click on that icon with the right mouse button and select "Add to
> favourites". This should keep the icon there, that you can use it for
> starting the program again.
>
> If anything does not work as desired, just ask again.
===================================================================
Hi
Thanks for reply. . . . .

The two short command lines brought the program back OK. . .
However using the RH button on the logo it said.:
      " All windows "
      " Quit "
It does not say " Add to favorites bar " It looks to me more
like it will kill all logos in the favotites bar. ??

Thank's Erich

===================================================================

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Ok. allem Anschein nach braucht man für das Programm einen *.Desktop Starter, siehe https://wiki.ubuntuusers.de/.desktop-Dateien/

In diesem Fall am besten eine Datei ~/.local/share/applications/jstock.desktop
mit
...
Exec=~/jstock/jstock.sh
...

Das Icon ist nur im jar-Archiv verpackt vorhanden, um es extra herunterzuladen scheint mir eine Zeile aus actionparsnip's Information geeignet:

wget -O ~/jstock/jstock.png http://lh3.ggpht.com/i0snKN9_eMgGL_AkhJsfKIgYZ5xr8K_l6gER7VU_bk5QJWn9J6mPCBNFfN8IqdC9zQ=w300

dann kann man im .desktop file ergänzen
...
Icon=~/jstock/jstock.png
...

Revision history for this message
Erich Aufmbruch (ericaufm) said :
#7

======================================================================================================================
21.07.20
Gentleman, I am very grateful for the various replies that I got which
have enabled me to set up the "JStock" program
so it is now working perfectly to my satisfaction.

However....
I have to date failed to set up a Launcher and I have tried various
recommendations without luck. I have also tried the settings below
but at the end the program refused to save. Regrettably I have NO Linux
knowledge as yet so I can only ask you to help me with another bit
of advise. Thank You Erich

=======================================================================================================================

On 2020-07-08 04:30, actionparsnip wrote:
> Your question #691756 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691756
>
> Status: Needs information => Answered
>
> actionparsnip proposed the following answer:
> I found this:
> http://softwaredoubts.blogspot.com/2013/11/how-to-install-jstock-in-ubuntu.html
>
> If you run:
>
> sudo apt install unp
> sudo mv /home/erich/jstock-1.0.7.45-bin.zip /opt
> cd /opt
> sudo unp ./jstock-1.0.7.45-bin.zip
> cd /opt/jstock
> sudo chmod 755 jstock.sh
> wget -O jstock.png
> http://lh3.ggpht.com/i0snKN9_eMgGL_AkhJsfKIgYZ5xr8K_l6gER7VU_bk5QJWn9J6mPCBNFfN8IqdC9zQ=w300
>
> You can make a launcher with:
>
> sudo gedit /usr/bin/applications/jstock.desktop
>
> Add the below text:
>
> [Desktop Entry]
> Name=JStock
> GenericName=JStock
> Comment=Stock market software
> Exec=/opt/jstock/jstock.sh
> Terminal=false
> Type=Application
> Icon=/opt/jstock/jstock.png
> Categories=GNOME;GTK;Utility
> StartupNotify=false
>
> Save the file, close the text editor and enjoy.
>
> HTH

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

There are two possible directories for the launcher:

/usr/bin/applications/jstock.desktop
valid for everybody, but needing administrative rights for creation of the file (*)

and

~/.local/share/applications/jstock.desktop
valid only for you, and you can create that file without admin rights

(*) You temporarily get admin rights, if you put "sudo" in front of a command and provide your password as confiirmation when asked so.

Revision history for this message
Nigel Frampton (nigel-frampton) said :
#9

Hello,

I have tried to follow these instructions, but cannot create the desktop launcher.

The installation of JStock was successful, and I can access it via the terminal and the commands:-

cd jstock/
./jstock.sh

However, the launcher desktop file does not function at all. I have created the file in

~/.local/share/applications/jstock.desktop

My installation of Ubuntu 20.04 does not have /usr/bin/applications.

The file jstock.desktop is owned by me (not root); permissions are 755; in the properties of the file "Allow executing file as program" is selected. Unlike Erich, I do not have any problem saving the file - but it doesn't perform its intended function at all!

Thanks in advance for any help that anyone can give.

Nigel

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

It won't work because you are assuming that the script path starts in your user's home, which it doesn't. You need to use absolute paths. So your username is "foo" then the script will be:

cd /home/foo/jstock
/home/foo/jstock/jstock.sh

and it will work as you expect

Revision history for this message
Nigel Frampton (nigel-frampton) said :
#11

Thanks for your prompt response actionparsnip - that works fine! Enjoy the rest of your Sunday!

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

Please mark as solved if the issue is sorted

Revision history for this message
Nigel Frampton (nigel-frampton) said :
#13

I cannot see anything to allow me to mark the question as "solved". Maybe that is because I did not create the original question?

The status is shown as "Answered", but I don't seem to have access to modify that status.

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Only the original poster of the question , who is Erich Aufmbruch can mark that question as "solved".

Can you help with this problem?

Provide an answer of your own, or ask Erich Aufmbruch for more information if necessary.

To post a message you must log in.