Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jan-Erik Lärka

Pages: 1 ... 3 4 [5] 6 7 ... 18
61
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 27, 2021, 07:19:02 am »
The web page you gave above is not responding.

had a power outage in the area... but ok, I'll post the package here.

1. NetRexx 3.04 can be used with OpenJDK 6, later versions of NetRex seem to use a feature only present in newer versions of java.
2. The script included with NetRexx has not been updated for long... so you have to rewrite it completely or use jRun instead. There's No point in using NetRexxc.cmd. The program object it create associate itself with .nrx files so you can Compile / Run them with a click
3. Download java2nrx and add a program object for it (with JRun) you can convert .java code to .nrx code

I'm interested in getting NetRexx running. I try NetRexxC.cmd, but it gives errors.

Error: K:\PROGRAMS\JAVA600\JRE\bin\client\jvm.dll: this JVM conflicts with a dif
ferent type of JVM loaded by another process. You may only use one JVM type of a
 given Java installation at a time
Error: K:\PROGRAMS\JAVA600\JRE\bin\client\jvm.dll: this JVM conflicts with a dif
ferent type of JVM loaded by another process. You may only use one JVM type of a
 given Java installation at a time

The documentation for java state that you may only run the server or client version of jvm.dll at a time.
The text above say that the script try to start the client version.
What other java app may be running at that time?

62
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 24, 2021, 04:23:40 pm »
Here's the most recent update...

Had to redesign parts of the script to handle the unexpected behaviour the program object environment page offer.

The code to not search for NetRexx didn't search enough, so it had to be adjusted again.

Introduced ^ to escape ; in the setupstring (also harvest.cmd)

This time you can look at the web page, read about JRun and and download it.

63
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 18, 2021, 08:21:30 pm »
'Here's an update...

1. Assume that Ivan for example didn't have any NetRexxC.jar on his computer, but several drives... the adjustment doesn't look that deep for netrexx.*

2. The NetRexxKing.png image has been adjusted so that the face isn't transparent.

3. harvest.cmd of Joop's site didn't look at classpath .jar files to decide the name of object id... that pasted section created by harvest.cmd in the JRun.cmd script has been updated.

*OBS!!!!
Updated the script once more as the adjustment for netrexx caused side effects!

64
Setup & Installation / Re: Looking for Guinea pig(s)
« on: January 14, 2021, 04:19:51 pm »
Hi Jan

Let me know if I understand how it works.
You run JRUN.CMD, it will find your java runtime, put an icon on the desktop, find your .jar file and create a icon on the desktop.

I tried it with "jdiskreport-1.3.1_os2.jar" and it created an icon on my desktop. The icon worked to run the program.

When I download a new .jar file, what should I run to make it scan for .jar file again, for it to create the icon on the desktop?

Regards

Yes!
JRun create the program object that allow you to create program objects for each .jar and .class file. I know that it is somewhat confusing that one script act as a double for itself instead of require more scripts.

After you run it once it associate itself as you have shown and you can create program objects for a .jar file with a double click. Use the program objects to start that "app".

Even other applications (native OS/2, java etc.) may be registered to handle the same file format, so more applications may appear in the list.
You can also add associations by hand, for a program object if you like.

The first application in the list act as the default application that will launch as you double click on the file. Files that use the extension show up with the application icon so you know what application will start for that file by default.

65
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 14, 2021, 11:47:37 am »
This section of code:
Code: [Select]
   PARSE UPPER VALUE rxFind( 'JAVA.EXE', '-version', 'VERSION "1.', here||'\BIN' ) WITH j_path'\BIN¤'type' VERSION "1.'minor'.'rev'_'build'"'
call the function rxFind (look further down the script) that search the computer for java.exe and try to find out which version it report itself as. If java.exe can be found in a sub folder called BIN and return the partial string 'VERSION "1.' with some more text the script use that java version to create the program object.

The name of the program object will be created from the text that fit within the variable "type" above while the version number is taken from "minor" and "rev".

If a java version 1.14.6_04 would be built for OS/2 you'd get a program object called "JAVA 14.6".
If a openjdk version 1.17.3_05 would be built for OS/2 you'd get a program object called "OpenJDK 17.3".

66
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 14, 2021, 10:25:44 am »
I don't understand this with one program for launching java programs. One thing I know is that we have Java 6, but on some points it is not Java 6, different reactions, it does not work or we need a different memory specification. Lots of programs are very simple in running, but others are very hard and need sometimes lots of settings and options before it will do something. So I opt for using a command file, you can put in what you want and what will work for you. If you know how to start, what options and so on, see my website http://joopn.home.xs4all.nl/os2ecs/ecs6e.htm. There are over 150 programs with where to get it and how to run.

Joop, you do a tremendous good job to collect knowledge and insights how to set environment variables etc. to run all these scripts.
This is a script that incorporate your knowledge Joop.
I adjusted it some more from what I sent you (Joop) some days ago.
The script set up environment variables and parameters by adding what can be done to the program object instead of one specific script for each java app.

Look in the program object for a tab to set Environment variables. I found out the other day that it's possible to use SET to add environment variables there... such as PATH, CLASSPATH etc.

Joop, as you may see in the script (I did ask you) and .zip-file, I've instead harvest(.cmd)ed your knowledge as you have and excellent site that present info consistantly. The harvested file cfg.cfg had to be somewhat adjusted, but with only minor adjustments before it was added to the script JRun.cmd. Hmm, reminder, should have removed "!egl", on firefox but forgot that...

Look at the background of the attached images... they contain commented rows that the script itself in the function "adapt" use to read and adjust the settings as it create program objects. Yes, the script read itself! Different java apps use different settings... or not.  You can of course change/adjust the settings yourself once the object has been created to get your specific touch.

The line for JEKS should not start with /*<CLA_ as it does in your scripts, change it to /*JAV_ before you try it.

67
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 14, 2021, 09:46:29 am »
Sorry to upset things, java on all my machines resides in the boot partition, OPENJDK6 and OPENJDK6-SDK in the root of drive C: and all the java apps are in JAVA-APPS on drives F: and H:

What you have here reminds me of the set of runjava scripts from 2002.

Yes, they may be similar, but why is there no launcher with ArcaOS?

So you have C:\OPENJDK\bin and C:\OPENJDK-SDK\bin
Important! Java.exe has to be placed in the "bin" subfolder.

Did the script create an icon for it on the desktop or did just not find anything there?

You can test two things if it didn't find anything.
1. Copy the files to the bin-folder with java.exe
or
2. Open a command prompt in the folder with JRun.cmd and type
set rxtrace=on
followed by Enter and then
JRun
and press Enter to step through each line of the script.

68
Setup & Installation / Re: JRUN - Looking for Guinea pig(s)
« on: January 13, 2021, 07:02:49 pm »
Just one observation.  There should be some way to specify what drives to search - reason, I let it run for several hours while it searched one of my NAS boxes, it never did complete because I killed it before it got to the next NAS box with even larger drives in it.

Interesting... where is it supposed to find and run OpenJDK or Java from, on your machine?
I have both on d: here...

"Advanced 1" in the readme give a hint, but I need to rephrase that instruction perhaps and include when it can't find anything on its own.

copy the files to the bin folder where java.exe reside and run the script there.
If it can't create the program object, then it can't execute "java.exe -version" that should output something like "openjdk version 1.6.0_27" or "java version 1.4.1_07".

This is what it gave me with the script in the java 1.4.1 folder (D:\Programs\Java141\bin) for golden code  java with the proper license file.
Notice that I've also added "Manifest.class" from the same folder as jRun to find out if the script define a main class to run as default.
The order you add an association is important to which one that will become the default and topmost option.

69
Setup & Installation / Re: Looking for Guinea pig(s)
« on: January 13, 2021, 06:51:51 pm »
Ohh. I just noticed that the OpenJDK 6 icon created was also associated to .jar files, so that is the way to create the desktop icon.
Regards
Yes, and if you've let it create another program object for Java 4.1/4.2 it will be available on that menu as well.
The main purpose of .jar files should be to run with a java engine.
This is how it look like when .jar has been de associated in the Archive tool.
Notice that it will use the icon and png image with the same name as the .jar file as it create the desktop object

You have to draw and place the icon and/or png image in the folder yourself.
Now may be the time to learn how to draw nice icons and png images.

70
Setup & Installation / Re: Looking for Guinea pig(s)
« on: January 12, 2021, 10:51:00 pm »
Seem like everyone that has downloaded it can make it work... right?

So,what have you tested so far?

Your feedback is greatly appreciated.

Regards,
//Jan-Erik

71
Setup & Installation / JRUN - Looking for Guinea pig(s)
« on: January 11, 2021, 03:12:28 pm »
Hello,

I'd like to ask you for help to test a rather advanced script I've created to aid launch of java applications.
The goal is to make it as easy to install a java app as click on a .jar/.class file.

The script can use OpenJDK 6 and Java 4 in parallel. (See README)

Please do tell me what alterations/adjustments and additions you make to the script as well as faults and problems.

Regards,
//Jan-Erik

Remember: If something goes wrong, it's your fault!

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

72
Networking / Re: openvpn configuration?
« on: December 22, 2020, 01:31:55 pm »
I used Safe Fire PPP a lot and was very pleased with it. Installation was a bit "sparse", but the drivers, gui and engine worked flawlessly.

Today i found out that it was developed further.
Safe Fire PPP 1.3a from 2007-2009 contain updated drivers for network and protocol AND OpenVPN references.

I've installed it, but has been unable to figure out how to enable OpenVPN.
Can you tell me how to ... ?

The driver seem to contain quite a lot of what we want (TAP and TUN)!

From plref.htm
Quote
PL_OVPN plugin library

The OpenVPN related code.

OpenVPN plugin

This plugin incorporates the OpenVPN 2.1_rc1 code to create OpenVPN tunnels. It have to be used in conjunction with pl_lan:Adapter plugin to bind to a system TCP/IP stack. Of course various filters like NAT may be inserted in the chain also. There is no support for TUN device as pppX interface. Both (TAP and TUN) modes are implemented over lanX interface like TAP-Win32 adapter.

To generate TLS certificates you'll need the openssl utility. No special version restriction for it. For example you can take it here.

Plugin is operating in Single Connection Mode - only binding to the 0 index of stream pack is allowed.
Links in the text above was removed during copy paste

Merry Christmas,
//Jan-Erik

73
Programming / Re: ODBC VX-Rexx/DBExpert
« on: November 22, 2020, 10:13:26 am »
The drivers shipped with DBExpert can only be used with DBExpert.
You may want to install Lotus SmartSuite for OS/2 or UNIXODBC for OS/2 use ODBC with another product.

I've begun to figure out how to write a bridge between rexx and java, but stumbled on some problems. It would be quite useful if we'd get a bridge between jdbc and odbc as there are plenty of current drivers for java.

//Jan-Erik

74
Programming / Re: OW, JNI (GCC built java 1.6) and parameters
« on: May 21, 2020, 07:30:32 pm »
I use open-watcom-c-os2-2.0-beta3.zip wherever it may come from.

Ohh, LoadLib.txt should be adjusted ... change a ".dll" to "*dll" to allow it to use any version of the library you define. Especially useful with Cairo as it come in many versions.

75
Programming / Re: OW, JNI (GCC built java 1.6) and parameters
« on: May 21, 2020, 09:56:54 am »
Nice,

Java was more of a challenge as it need the code fpeHandler that get called as various Floating point exceptions pop up.
Code: [Select]
LoadLib *jVM = new LoadLib( "jvm" ); //find in before/after libpath, path etc.
if( jVM->rc != NO_ERROR ) //jvm.dll not found, try subfolder "client" of above and environment variable JAVA_HOME (if set), try as is if param 2 instead contain \.
       jVM->Load( "client\\jvm", "JAVA_HOME" );

... do other stuff ...
Code: [Select]
/* Define each function dynamically */
    int rc = NO_ERROR; //must be defined as InitFunc use rc
    InitFunc( jVM->hmod, jint, JNI_GetDefaultJavaVMInitArgs, ( void *vm_args ) );
    InitFunc( jVM->hmod, jint, JNI_CreateJavaVM, ( JavaVM **p_vm, JNIEnv **p_env, void *vm_args ) );
InitFunc take care of decorations "_" in front or after.

Code: [Select]
resVer = JNI_GetDefaultJavaVMInitArgs(&vm_args2);...
Code: [Select]
res = JNI_CreateJavaVM( &currentJVM, &jniEnv, &vm_args2);

Also tried with libsane and created my own version of scanimage, that use defaults. There I have problems to reach and set internal structures of variables in the memory created by the gcc compiled library

Pages: 1 ... 3 4 [5] 6 7 ... 18