Author Topic: JRUN - Looking for Guinea pig(s)  (Read 14674 times)

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #15 on: January 15, 2021, 01:54:26 am »
Now that I understand how it works, I can say that it works great . 

Tested on Dominion and ImageEditor.  I drag from FM/2 to your created Java 6 icon.  No problems so far.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #16 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!
« Last Edit: January 19, 2021, 07:44:31 am by Jan-Erik Lärka »

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #17 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.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: JRUN - Looking for Guinea pig(s)
« Reply #18 on: January 25, 2021, 04:05:15 am »
The web page you gave above is not responding.

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

Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #19 on: January 25, 2021, 09:24:43 pm »
'Here's an update...
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.
???? Where did you find "harvest" on my site? All Java programs on my site are tested with the given cmd file, the only thing I do is making the drive and directory more standard, but that doesn't influence the working. So everyone who want to make use of the cmd file only have to re edit the drive and path names. That's clearly lined out, that is, no one complained yet ;-)

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #20 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?

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #21 on: January 27, 2021, 09:13:08 am »
???? Where did you find "harvest" on my site?

I wrote harvest.cmd, to do the harvesting of information from your site that can be downloaded with
wget http://joopn... and some additional parameters.

 
All Java programs on my site are tested with the given cmd file, the only thing I do is making the drive and directory more standard, but that doesn't influence the working. So everyone who want to make use of the cmd file only have to re edit the drive and path names. That's clearly lined out, that is, no one complained yet ;-)

the cmd file for each application that each has to be adjusted statically when there is rexx and all joops knowledge how to dynamically set both general and common settings to run each app.
Code: [Select]
<PRE>
@echo off
SET BEGINLIBPATH=[drive: java]\JAVA160ga5\bin
SET path=[drive: java]\JAVA160ga5\bin
[drive: fatcalc]
cd [drive: fatcalc]\fatcalc
java -Duser.home=[drive: fatcalc]\fatcalc -jar fatcalc.jar 2&gt;fatcalc-bugs.txt
</PRE>

harvest.cmd read each htm file and look for the tag '<PRE>' to '</PRE>'
'[drive: java]\JAVA160ga5\bin' is the openjdk directory that the script already know where it is, reuse that knowledge.
[drive: fatcalc]\fatcalc is the directory to start within, the script get that directory from the parameter as one click on the .jar file the first time to add a program object for it as working directory.
etc. etc.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #22 on: January 27, 2021, 09:21:05 am »
Here is the latest adjustments to jrun that you also can get from the homepage.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: JRUN - Looking for Guinea pig(s)
« Reply #23 on: January 27, 2021, 06:19:12 pm »
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?

Thanks for your help.

To start, I just wanted to run hello.nrx

I'm running on the Q: drive. My SDK is in Q:\Programs\java600. I am running Jetty with JavaMail, so maybe that's why it is running server.

NetRexx is in Q:\Programs\NetRexx
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #24 on: January 30, 2021, 12:52:08 pm »

Thanks for your help.

To start, I just wanted to run hello.nrx

I'm running on the Q: drive. My SDK is in Q:\Programs\java600. I am running Jetty with JavaMail, so maybe that's why it is running server.

NetRexx is in Q:\Programs\NetRexx

Had to adjust the script again to handle NetRexx.
Replace JRun.cmd and now it should behave.

Tested Java/OpenJDK to load the server version of jvm.dll with JDownloader (version 2 ) and Genealogy.
"-server" on the command line is possible to use with JDownloader, but it launch itself after updates and restart and then complain. See the attached image of what it may look like then.

Add -server to the parameters of the program object to run the application in server mode.

The script (JRun.cmd) can't run a plain client java version if that same java engine already has been started with the parameter "-server". JRun.cmd then automatically try to find another java/openjdk version to use. I have Java 4.1 that it detect and create a program object for and try to run...

What is your opinion on that? Should it stop and do nothing or try to find another one to use?

Some of you may have opened the script in a text editor and looked at the code already.
If so, you'll notice that there are environment variables you can set to make it behave differently.
Please do try them out as well.
« Last Edit: January 30, 2021, 12:55:06 pm by Jan-Erik Lärka »

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: JRUN - Looking for Guinea pig(s)
« Reply #25 on: January 30, 2021, 03:16:39 pm »
I had asked to run NetRexx, and you helpfully explained that it had to be version 3.04.

The NetRexxC.cmd included did not work well, and gave an error message similar to the -server message you posted. So did JRun.cmd. Looking inside JRun.cmd shows that it was very similar to NetRexxC.cmd.

One problem was that it found the Java compiler on the wrong drive. I found the rxFind was causing this problem.

The -server error message also occurs if the wrong drive is used in -client mode. I was using a server program, but I did not invoke with -server. Maybe I should.

But I wanted to run NetRexx, and JRun wasn't helping enough, so I made a simpler script that just runs NetRexx. Now I can run simple NetRexx programs. I cannot run all the examples, but I expect I now need to find the NetRexx docs to see what else is needed. NetRexx was a clever idea, but it seems just as inconvenient as running Java as far as creating the right classpath with all the needed components.

Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: JRUN - Looking for Guinea pig(s)
« Reply #26 on: February 04, 2021, 07:46:40 pm »
I had asked to run NetRexx, and you helpfully explained that it had to be version 3.04.

The NetRexxC.cmd included did not work well, and gave an error message similar to the -server message you posted. So did JRun.cmd. Looking inside JRun.cmd shows that it was very similar to NetRexxC.cmd.
Yes.
And the updated JRun tries to find another java version as it's not possible to run the same java.exe (at all) with a different setting for server/client. All other instances has to use the same parameter if one instance of java.exe has been started with -server
One problem was that it found the Java compiler on the wrong drive. I found the rxFind was causing this problem.
You can force which one it should use by setting the environment string such as
j_path=C:\java160
but it will yet try to use another if that java version is blocke, if the script for example find a version in C:\Programs\Java141 that return a valid version string.
The -server error message also occurs if the wrong drive is used in -client mode. I was using a server program, but I did not invoke with -server. Maybe I should.
avoid mixing "-server" as it seem to cause problems.

Remove program objects that was created with jrun that show such messages, or set the environment variable as mentioned above. Remove a misbehaving program object and let the new version recreate it to fix faults you saw from the previous version of the script.

But I wanted to run NetRexx, and JRun wasn't helping enough, so I made a simpler script that just runs NetRexx. Now I can run simple NetRexx programs. I cannot run all the examples, but I expect I now need to find the NetRexx docs to see what else is needed. NetRexx was a clever idea, but it seems just as inconvenient as running Java as far as creating the right classpath with all the needed components.
The latest version I posted does exactly what your script does... and more, as it allow you to specify if you just want to compile and/or also run the compiled script.

Several of the included examples does however not even work on other platforms as the IBM examples has been moved into renamed sub-folders or something like that.