OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: mauro on April 21, 2020, 06:53:46 pm
-
Hi all, after sometime not having the need to open the LVM by its program icon (in the System Setup folder), today i wanted to have a look on it, but it did not start in WPS.
Then tried in the OS2 command prompt and found:
[C:\]lvmgui
JAVAI.dll not found via JAVA_HOME=C:\APPS\OpenJDK\, so setting JA
11\BIN\..
Unable to initialize threads: cannot find class java/lang/Thread
Said that from last time I had run it successfully, I meantime installed OpenJDK, now reading the command answer for what is specifically missing, I simply copied JAVAI.ddl from the old JAVA11\BIN directory to the C:\APPS\OpenJDK\ one, but the answer is still same not finding that dll.
Do you have suggestions on how to recover the situation?
Thank you much
-
Hi mauro,
Attached is a screen grab of the LVMGUI program object on my computer check yours is the same and also check the lvmgui.cmd file just in case it has become garbled (you may need to adjust something to fit your setup).
-
Hi mauro
To use lvmgui with openjdk the config.sys Path needs to have this line
J:\Java\openjdk\bin;
Change the Drive and Path to match your system
Obviously a reboot is required after editing config.sys
Optionally: As java11 is not used for anything these days - apart from maybe some very old java apps - I suggest getting rid of java11.
This is done fairly simply by selecting Computer -> Install/Remove -> Installed Features and uninstalling.
Regards
Pete
-
I assume you are using eComStation:
Peter's advice might not be the best because the help will not properly work with the newer java.
1) make sure that you DO NOT have JAVA11 listed anywhere in your config.sys
2) check that you have a file \os2\install\syspath.dat, it should look about like this (it might be longer and it might contain different drive letters and paths):
E:\DMISL\syslevel.dmi
E:\OS2\JAVA\Java11\bin\syslevel.jav
E:\OS2\JAVA\java11\Swing\syslevel.swr
E:\TCPIP\bin\syslevel.dbx
E:\TCPIP\bin\syslevel.iak
E:\TCPIP\bin\syslevel.tcp
make sure that the java11 related paths properly point to your installation of Java11
3) make sure that these files exist in \ecs\bin:
lvmgui.cmd
jvm_find.cmd
jvm_lang.cmd
Finally, make sure that you start the app via \ecs\bin\lvmgui.cmd lvmgui and that it starts from \ecs\bin (which the program object should have properly set).
Lars
-
So it looks like sometime back in 2014 I implemented a little change to the lvmgui.cmd here. I literally specified the exactly Java 1.60 file to run as follows (pasting just the pertinent section of the code):
/* if not in classpath, try to construct from default location */
if found=0 then do
newpath=stream(SysBootDrive()'\OS2\JAVAAPPS\LVMGUI.ZIP','c','query exists')
if newpath='' then exit
cp = '-classpath' newpath';'classpath0';'
end
/* save current dir, cd to lvmgui.zip dir, invoke java */
currdir= directory()
newdir = directory(strip(filespec('drive',newpath)filespec('path',newpath),'t','
\'))
'@g:\java160\jre\bin\java.exe' cp progname parameters ' >nul'
/* say rc */
/* restore state and exit */
currdir = directory(currdir)
if loaded=1 then call SysDropFuncs
Exit 0
As you can see I am running JRE 1.60 here and my CLASSPATH statement is completely commented out in CONFIG.SYS.
-
Hi All
As I rarely bother with the java lvmgui I had not noticed the screwup with the Help failing to display correctly.
So, sorry for not quite getting it right.
Thanks to Lars for pointing this out - I take it you are seeing problems with the Help as well Dariusz?
Regards
Pete
-
...Thanks to Lars for pointing this out - I take it you are seeing problems with the Help as well Dariusz?...
Yup, HELP window contents is all made up of '?' characters with a few numbers tossed in for a good measure. I honesty use the "factory" GUI LVM very little as well, I prefer the CLI anyways or Alex Taylor's excellent LVMPM, which is a full PM application.
-
There was another reason apart from the failing help:
I always try to avoid hacking REXX scripts or code that I have not written (unless that is exactly the intention, like, for example, for the USB drivers) and I always assume that people are not familiar with any script or programming languages.
If possible, I use a documented way of fixing things. If that is not possible, I revert back to trial and error.
I have been bitten too many times by things I had changed in my system a long time ago but forgotten about and which all of a sudden conflict with changes I have done recently.
-
Hi Lars
No need to "hack" lvm.cmd if you add the openjdk Path to config.sys as mentioned previously.
Regards
Pete
-
Hi mauro
To use lvmgui with openjdk the config.sys Path needs to have this line
J:\Java\openjdk\bin;
Change the Drive and Path to match your system
Obviously a reboot is required after editing config.sys
Optionally: As java11 is not used for anything these days - apart from maybe some very old java apps - I suggest getting rid of java11.
This is done fairly simply by selecting Computer -> Install/Remove -> Installed Features and uninstalling.
Regards
Pete
Hi Pete, I started to apply the suggested change in config.sys also deleting the reference pointing to JAVA11, and rebooted.
Now, LVMGUI recalled by OS2 commands windows appears/works (great, thank you!) , but still nothing happens by clicking on the object icon. I then also applied the properties editing suggested by Ivan, but no changes.
In the images below I show what my LVM icon object properties Program tag contains, and what are the object in the C:\OS2\JAVAAPPS referred folder.
I'm running OS2 Warp 4.52.
Thank you
-
Hi mauro
The Properties need modifying:
Copy ivans setup from his uploaded Logical_00.jpg image but set the Working directory to the location of lvmgui.cmd - possibly \os2...
I cannot remember the contents of lvmgui.cmd as supplied with OS/2 so have uploaded my copy of lvmgui.cmd as lvmgui.txt
Regards
Pete
-
Hi mauro
The Properties need modifying:
Copy ivans setup from his uploaded Logical_00.jpg image but set the Working directory to the location of lvmgui.cmd - possibly \os2...
I cannot remember the contents of lvmgui.cmd as supplied with OS/2 so have uploaded my copy of lvmgui.cmd as lvmgui.txt
Regards
Pete
Thanks Pete, my LVMGUI.CMD properties only shows C:\OS2\LVMGUI.CMD string in "Path and filename" field, the other two below are empty. Nothing happens after adding the values suggested by Ivan in there.
I paste here below its script content. Then I also attach the captured snapshot of the output message after clicking on the object, while it still works fine if invoked in OS2 command window
* IBM CONFIDENTIAL
* OCO Source Materials
* (c) Copyright IBM Corp. 1998
*
* The source code for this program is not published or otherwise divested of
* its tradesecrets, irrespective of what has been deposited with the U.S.
* Copyright Office.
*
* Functions: Front end to invoke Java version of LVMGUI interface
* Change Activity: 8/19/98 initial version slp
* 8/10/01 java 1.3 and misc fixes sle
*/
progname = 'lvmgui'
cp = ''
parse arg parameters
If RxFuncQuery('SysLoadFuncs') Then Do
Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
Call SysLoadFuncs
loaded=1
End
/* search classpath for 'lvmgui.zip' */
found = 0
classpath0 = translate(value('classpath',,'OS2ENVIRONMENT'))
classpath = classpath0';'
do while (found = 0) & (length(classpath) > 0)
classpath = overlay(' ',classpath,pos(';',classpath))
parse var classpath newpath classpath
found = pos('LVMGUI.ZIP',newpath)
end
/* if not in classpath, try to construct from default location */
if found=0 then do
newpath=stream(SysBootDrive()'\OS2\JAVAAPPS\LVMGUI.ZIP','c','query exists')
if newpath='' then exit
cp = '-classpath' newpath';'classpath0';'
end
/* save current dir, cd to lvmgui.zip dir, invoke java */
currdir= directory()
newdir = directory(strip(filespec('drive',newpath)filespec('path',newpath),'t','\'))
'@java' cp progname parameters ' >nul'
/* say rc */
/* restore state and exit */
currdir = directory(currdir)
if loaded=1 then call SysDropFuncs
Exit 0
-
Hi mauro
Thanks Pete, my LVMGUI.CMD properties only shows C:\OS2\LVMGUI.CMD string in "Path and filename" field, the other two below are empty. Nothing happens after adding the values suggested by Ivan in there.
Maybe I was not clear in my previous message or maybe I am misunderstanding the above...
it is not the lvmgui.cmd Properties that need modifying it is the Logical Volume Management object in System Setup that needs modifying.
The only difference between the Properties shown in ivans image and the Properties on your system will be the Working directory which is the location of lvmgui.cmd
Looking at your lvmgui.cmd file it is a bit different to the lvmgui.txt file which is my current lvmgui.cmd renamed to txt to allow it to be uploaded here.
Not being a rexx script expert I cannot spot any problem in your lvmgui.cmd file and if it works from the command line it should work when started by the Logical Volume Management object - unless there is something wrong with the Logical Volume Management object Properties.
If you do have the Logical Volume Management object properties set correctly then it may be worth trying the lvmgui.txt script.
Copy lvmgui.cmd to lvmgui.cmd.IBM to make a backup of the original file
Delete lvmgui.cmd
Copy lvmgui.txt to lvmgui.cmd
The Properties for lvmgui.cmd should have the Path and file name showing the current Drive:\Directory\lvmgui.cmd,
replace the Drive:\Directory with the location on your system, and no other entries on the Program page.
On the Menu page check that Open as is set as Program.
Does this lvmgui.cmd then work OK from the command line?
Does starting from the Logical Volume Management object work?
Regards
Pete
-
Hi mauro
Maybe I was not clear in my previous message or maybe I am misunderstanding the above...
it is not the lvmgui.cmd Properties that need modifying it is the Logical Volume Management object in System Setup that needs modifying.
The only difference between the Properties shown in ivans image and the Properties on your system will be the Working directory which is the location of lvmgui.cmd
yes, I first did the attempt on my Logical Volume Manager object as previolusly said ("I then also applied the properties editing suggested by Ivan"), and the difference shown was not only in the Working Directory locating the lvmgui.cmd which I setted with the actual for my case, but also in Path and File Name field which contained java.exe in my case vs lvmgui.cmd in his case. All possible values replacement brought no improvements.
Looking at your lvmgui.cmd file it is a bit different to the lvmgui.txt file which is my current lvmgui.cmd renamed to txt to allow it to be uploaded here.
......................
Copy lvmgui.cmd to lvmgui.cmd.IBM to make a backup of the original file
Delete lvmgui.cmd
Copy lvmgui.txt to lvmgui.cmd
The Properties for lvmgui.cmd should have the Path and file name showing the current Drive:\Directory\lvmgui.cmd,
replace the Drive:\Directory with the location on your system, and no other entries on the Program page.
On the Menu page check that Open as is set as Program.
Does this lvmgui.cmd then work OK from the command line?
ok, as made all this, lvmgui does not work anymore not even recalled in the command prompt window, this is the answer returned:
[C:\OS2]lvmgui
5 +++ Parse Value Jvm_find('LVM') With java_exe java_dir class_pa
ir lvm_java_dir;
REX0043: Error 43 running C:\OS2\LVMGUI.CMD, line 5: Routine not found
Does starting from the Logical Volume Management object work?
Regards
Pete
of course it does not.
I try to revert the fix proposal from another view but admit from now that this could be the tipical idiot question: wouldn't it be simplest creating a one-line script .cmd object containing the running command equal to the well working command the OS2 window prompt? Then such file object should work with a double click and finally replace the not-working object in OS2 System Setup
-
Hi mauro,
If you are using an unmodified OS/2 v4.52 then you will need to use java11 that came with the install rather than openjdk6. At least that is how it worked on my OS/2 v4.52 install. I will check if I have the disk image of that install and see if anything shows up.
-
Hi mauro
There should be a jvm_find.cmd to go with lvmgui.cmd but looking at your iBM lvmgui.cmd I see it does not use jvm_find.cmd - I guess that file does not exist in OS/2 V4.52
I have packaged several CMD files into the attached jvm_cmd.zip
These should be unzipped into the directory containing lvmgui.cmd - might be an idea to check that none of these files already exist on your system before unzipping.
The other possible problem could be config.sys entries so check the following:-
1] Do you have the correct PATH entry for the openjdk \bin directory?
2] Have you deleted all java11 entries? - your CLASSPATH should look like the following but with a different Drive Letter
SET CLASSPATH=.\.;M:\os2\javaapps\lvmgui.zip;M:\TCPIP\java;
3] Have you rebooted since modifying config.sys?
Hope the above helps
Pete
-
Pete, Ivan, Lars, Dariusz; after having found a forgotten call to JAVA11 in config.sys LIBPATH, and now deleted it (every previous C:\JAVA11 call found in config.sys now replaced by C:\APPS\OpenJDK), LVMGUI.CMD object has then began to work as clicked.
So I could place a shadow copy where I like to find that, and call it Logical Volume Manager, ready to use.
Thank you for assisting me to understand how to fix this issue
-
Hi mauro
Glad you got it sorted :-)
Pete