OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Joop on August 11, 2013, 05:04:08 pm

Title: Java applications Jedit 5.1.0
Post by: Joop on August 11, 2013, 05:04:08 pm
I installed Jedit 5.1.0, did go with one error message. Today it seems it needs the internet. But as the message at the bottom says, don't worry.
After installation I update my startup script and Jedit does start up. In English, no Dutch (I'm Dutch). Can't be choosen too, its just not there.
After that lets load a file....

And here we have an old bug which was introduced after they kicked out the OS/2 code because no one uses OS/2 anymore.
That poor fellow never did a real search on the internet. After my complaint that we aren't dead but alive and kicking they put the code back in they said, but it seems not all of it. The fellow who took it all out never had the idea to note down what he had done. So they don't know whats missing. They took out some "old days dos stuff" and with it probably the way how to manage directories and files. Today with this latest edition Jedit can't read directories properly in OS/2. It comes up with totally nonsence.

I got this in my bug tracker file;
16:40:13 [jEdit Worker #2] [error] ErrorListDialog$ErrorEntry: i:\programs\Jedit_510\i:\programs\Jedit_510\i:\programs\Jedit_51_
2212\i:\programs\Jedit_501_1212\i:\programs\Jedit_501_1212\I:\CAD\Fidocad\Manual\i:\programs\Jedit_500\I:\CAD\Fidocad\Manual\i:\
programs\Jedit_51_2212\i:\programs\Jedit_501_1212\i:\programs\Jedit_501_1212\I:\CAD\Fidocad\Manual\i:\programs\Jedit_500\I:\CAD\
Fidocad\Manual\:
16:40:13 [jEdit Worker #2] [error] ErrorListDialog$ErrorEntry: Cannot list directory.

Its all almost one line, I do have all those directories, but not in this insane way. I still use Java 160 first edition because most programs do work well with this version. Later versions do give some trouble with some programs in not having a menu on top, its there, but not displayed. I did put the bug in the bug tracker, but it seems not important enough. That's why I'm a bit down about eCS and how it all goes today, in case you ask yourself if my website is still maintained.

May be there is a trick too fool OS/2 or Jedit. Anyone?

Cheers
Joop

Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 11, 2013, 06:31:20 pm
Hi Joop

I've just installed jedit and see the problem. I doubt if there is any fix except to recode jedit to actually work properly.

What I do not see on the jedit sourceforge site is an obvious way to report the problem. Where have you reported this problem? - I'll add my bug report to yours.


Regards

Pete
Title: Re: Java applications Jedit 5.1.0
Post by: Joop on August 11, 2013, 07:07:37 pm
Hi Pete,

What I do not see on the jedit sourceforge site is an obvious way to report the problem. Where have you reported this problem? - I'll add my bug report to yours.
Try this one http://sourceforge.net/tracker/?func=detail&aid=3595308&group_id=588&atid=100588 (http://sourceforge.net/tracker/?func=detail&aid=3595308&group_id=588&atid=100588)

Cheers,
Joop
Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 11, 2013, 11:01:56 pm
Hi Joop

I added the following to your report:-

I'm using eCS2.2 operating system (aka updated OS/2) with java1.6 and see exactly the same problems with this build of jedit.

There are also problems with the jedit.cmd file included with the jedit package.  Trying from the command line I get this result:-

[J:\JAVA\JEDIT]jedit
     1 +++   ???rc = QueryJavaVersion()?if ( rc = - 1 ) then?do? say 'java.exe cannot be found'? return - 1;
REX0013: Error 13 running J:\JAVA\JEDIT\jedit.cmd, line 1: Invalid character in program


Looking at the jedit.cmd file in a text editor that works (;-)) I cannot see any obvious problems... I would guess that the jedit.cmd file has been opened in a non-OS/2 editor and now includes hidden/non-printing characters which cause the REXX interpreter to fail.

To test this I opened the file in an OS/2 editor (e2.exe) and deleted existing line endings then recreated them. The jedit.cmd file now works to tell me that it cannot find java.exe... So the problem with jedit.cmd is that at some point it has been opened in a non-OS/2 editor that then adds something to the end of each line. Another problem is that the jedit.cmd is rather simple and will only work under some circumstances - note that it failed to locate java.exe on my system despite java being in the system PATH.


Hopefully the jedit guys will fix the directory/file access problems with jedit but I suspect that we need a Rexx expert to fix the jedit.cmd file so that it works in most cases.


Regards

Pete

Title: Re: Java applications Jedit 5.1.0
Post by: Dave Yeo on August 12, 2013, 01:17:08 am
Probably the cmd file got mangled by the version control system, probably git. Quite normal for these to be set to convert CR/LF to LF and somewhat harder to have an exception for one file.
Title: Re: Java applications Jedit 5.1.0
Post by: Martin Iturbide on August 12, 2013, 02:30:15 am
It was my fault posting this news. I was checking the updated Java apps for OS/2-eCS.

I tested Jedit 5.1.0,  the installer run fine and the application seemed to run fine with "java -jar jedit.jar".

But when trying to open a file I find out about the error.

I get an:

Quote
The following I/O operation could not be completed:

X:\PROGRAMS\JEDIT\X:\PROGRAMS\JEDIT\X:\HOME\DEFAULT\:
Cannot list directory.

And I can not change the directory to open a file.

Here it is the command prompt

Quote
[X:\PROGRAMS\JEDIT]java -jar jedit.jar
7:11:33 PM [main] [warning] jEdit: initPLAF failed to set required l&f
7:11:36 PM [main] [warning] jEdit: initPLAF failed to set required l&f
7:16:40 PM [jEdit Worker #1] [error] ErrorListDialog$ErrorEntry: X:\PROGRAMS\JED
IT\X:\PROGRAMS\JEDIT\X:\HOME\DEFAULT\:
7:16:40 PM [jEdit Worker #1] [error] ErrorListDialog$ErrorEntry: Cannot list dir
ectory.

Like Joop said, it seems that JEdit is getting crazy with OS/2-eCS paths.

Regards.
Title: Re: Java applications Jedit 5.1.0
Post by: Dave Yeo on August 12, 2013, 05:38:25 am
Has anyone tried to use slashes instead of backslashes? Or double backslashes?
Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 12, 2013, 12:06:26 pm
Hi Dave

The slashes have nothing to do with the problem - at least from a user viewpoint. The visual file dialogs cannot access directories/files without mangling the contents.

To try to show this problem:-

I start jedit using this command

[J:\JAVA\JEDIT]java -jar jedit.jar

No problem starting jedit but I notice that at the top of the screen jedit shows

index.xhtml (J:\JAVA\JEDIT\J:\JAVA\JEDIT\J:\JAVA\OPENJDK6\BIN\I:\Users\peter\HOME\PeterWeb\)

I believe the above should show the file open and being worked on - it definitely should not look like the above.

Then I tried a File, Open. The File dialog opens and then immediately displays this message:-

I/O Error
The following I/O operation could not be completed:

J:\JAVA\JEDIT\J:\JAVA\JEDIT\J:\JAVA\OPENJDK6\BIN\I:\Users\peter\HOME\PeterWeb\:
Cannot list directory


I'm not surprised jedit cannot list the above directory as it does not exist - the above is a mangle of several directories which is a result of some poor coding by the jedit guys.

No, I doubt it is anything to do with slashes that a user can resolve.


Another thing I've noticed is that sometimes - not every time, about 1 in 5 - moving the jedit window causes java/jedit to crash:-

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1cd01238, pid=95, tid=6225945
#
# JRE version: 6.0_27
# Java VM: OpenJDK Client VM (20.0-b12 mixed mode os2-x86 )
# Problematic frame:
# V  [JVM+0x51238]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#


Whether the above is a result of our "odinized" java1.6 or more coding problems in jedit I do not know.


Regards

Pete
Title: Re: Java applications Jedit 5.1.0
Post by: Ian Manners on August 12, 2013, 06:44:57 pm
Hi Pete,

I got the same error when I tried to open an Album with the latest JAlbum and OpenJDK 6, didn't bother looking further as I needed to remake an album so I deleted it and put my older JAlbum v8.1.6 back.
Title: Re: Java applications Jedit 5.1.0
Post by: G. M. Anchieri on August 12, 2013, 10:14:19 pm
The Jedit.cmd contain an error in this line:
if (pos(" JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
you have to substitued this line with this:
if (pos(" VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
and jedit start without problem, this is due to method used by openjdk to respond at java.exe -version command:

OPENJDK VERSION "1.6.0_27"
OPENJDK RUNTIME ENVIRONMENT (BUILD 1.6.0_27-B01-GA5)
OPENJDK CLIENT VM (BUILD 20.0-B12, MIXED MODE)

as you can view the response is OPENJDK VERSION but in  Windows we have JAVA VERSION
and jedit is basically a windows product
Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 13, 2013, 01:11:33 am
Hi G. M. Anchieri

Sorry to say that having made your recommended change to jedit.cmd all that happens is a different error:-

[J:\JAVA\JEDIT]jedit
    49 +++             Return iMajor * 100 + iMid * 10 + iMinor;
REX0041: Error 41 running J:\JAVA\JEDIT\jedit.cmd, line 49: Bad arithmetic
conversion
     2 +++   rc = QueryJavaVersion();

[J:\JAVA\JEDIT]


However, the jedit.cmd problems are not worth pursuing as when jedit is running it is not capable of reading files and directories so, sadly, jedit is of no use to me.


Regards

Pete








Title: Re: Java applications Jedit 5.1.0
Post by: gamba on August 13, 2013, 10:20:56 am
Hi all,

I created a ticket about this problem: http://svn.netlabs.org/java/ticket/223

If it is really common to latest jEdit and jAlbum, it is not application related, IMHO.

Bye
Gabriele
Title: Re: Java applications Jedit 5.1.0
Post by: ivan on August 13, 2013, 01:36:50 pm
To bypass the problems with the cmd file I created a program object for this version, just as I have for the older versions.

As everyone has found it can be started but it is impossible to open any files - which as Pete says makes it useless.

The two attachments show the problem is with the way the file open dialogue just keeps on adding to the string by repeating everything - it will do this until it eventually causes a fault in java and libc065.

This raises the question of what has changed in the file open code in the new version as opposed to that which still works in the older versions?  Until that is answered and fixed, we OS/2 users are restricted to the older versions.
Title: Re: Java applications Jedit 5.1.0
Post by: gamba on August 13, 2013, 03:46:30 pm
Quoting dmik:

"My wild guess is that v5 uses some other Java API for path manipulation that triggers some Odin bug that doesn't affect other code paths. The bug may be a missing Win API implementation detail or such."
Title: Re: Java applications Jedit 5.1.0
Post by: G. M. Anchieri on August 13, 2013, 04:51:57 pm
Hi Pete

exist another mistake in jedit command, please replace the line:
parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
in procedure: QueryJavaVersion with this:
parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'_'iLast'"'

and the error is gone.
Title: Re: Java applications Jedit 5.1.0
Post by: Joop on August 13, 2013, 10:40:45 pm
Hi all,

I created a ticket about this problem: http://svn.netlabs.org/java/ticket/223

If it is really common to latest jEdit and jAlbum, it is not application related, IMHO.

Bye
Gabriele
I just tried JAlbum latest (11.4) with same setup of Odin/Java with which I tested jEdit 5.1.0 and I didn't have any trouble. To me its very application related and the problems with jEdit did start as soon as they kicked out all OS/2 code because someone believed that OS/2 was dead and not in use anymore. They made a test version, 5.whatever beta's and all failed. So its not a real surprise that 5.1.0 failed too. I did put in lots of documentation, but it seems of no help. It seems that the branch for reading drives, directories and files gets into some kind of loop because they probably nested it in the wrong way. The read data gets a 1 and the next time they add another 1 to it, so it reads next directory or something. I'm just guessing...

Cheers,
Joop
Title: Re: Java applications Jedit 5.1.0
Post by: Martin Iturbide on August 14, 2013, 12:35:05 am
Maybe if someone can test "jEdit 5.1.0" on OpenJDK (our same level) on Linux to see if it have the same error. I think with that we will give us some hints if it is a OpenJDK bug or application bug.
Title: Re: Java applications Jedit 5.1.0
Post by: Ian Manners on August 14, 2013, 07:39:05 am
I might have to test 11.4, had to go looking to find which one I had the file problems with, that was jalbuminstall-11.2.5.jar (v11.2.5).

The problem as far as I could see was in the application more that our version of Java.
Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 14, 2013, 05:14:24 pm
Hi All

I thought I'd try jalbum to see what happens here.

I downloaded jalbuminstall.jar and ran it from the download directory. The install started, I clicked OK for the English option and the install proceeded - until about 85% complete (approximation of progress bar position) at which point it looks like it gets stuck.

After 5 minutes I killed the process and tried again. Same result as above.

I tried the various install tips on the jalbum website but install looks like it is stopping in the same place every time.

Is there any way of logging the install to discover where it gets stuck?


Regards

Pete




Title: Re: Java applications Jedit 5.1.0
Post by: Doug Bissett on August 14, 2013, 07:19:46 pm
Quote
I downloaded jalbuminstall.jar

Well, that was your first mistake. I gave up on the JAlbum installer, years ago.

I just downloaded the ZIP file, for everything (last one in the list), unzipped it, replaced my old install (which was ancient), and it seems to work okay with the latest JAVA from the eCS Software Subscription site.

I have no interest in JEdit, but I may give it a try later.
Title: Re: Java applications Jedit 5.1.0
Post by: Doug Bissett on August 14, 2013, 07:40:58 pm
The JEdit installer (jedit5.1.0install.jar) seems to work okay. I did not try the CMD file. I used the method that I always use. The program starts okay, but it seems that trying to open a file causes the file open routine to concatenate every drive and directory, that it ever saw.

My conclusions are:
Our JAVA 16 (latest from the eCS Software Subscription, with the latest ODIN) is working as it should.
JAlbum works, as it should (but I didn't try the installer, which has never worked, for me).
The JEdit 5.1.0 file open dialog is badly broken, making the program unusable.
Title: Re: Java applications Jedit 5.1.0
Post by: ivan on August 15, 2013, 12:01:30 am
Hi Pete,

jAlbum 11.4.1 works here without any problems but you do have to get the zip file - as Doug said - because none of the installers work on OS/2.  In fact I may have been partly instrumental in them keeping the zip version because I complained when the installer wouldn't work on OS/2 and asked that they reinstate the zip version.  I will praise them for the effort they take to keep it working on our OS.
Title: Re: Java application JAlbum
Post by: Joop on August 15, 2013, 02:28:07 am
I just downloaded the ZIP file, for everything (last one in the list), unzipped it, replaced my old install (which was ancient), and it seems to work okay with the latest JAVA from the eCS Software Subscription site.
For all who are struggling with JAlbum;

Don't download the installer file, do download the zip file, for more info please visit

http://joopn.home.xs4all.nl/os2ecs/ecs6e1.htm (http://joopn.home.xs4all.nl/os2ecs/ecs6e1.htm)

Version is not latest, for the rest of it, this is what I use and I have JAlbum up and running within 5 minutes, probably less  ;)

Cheers,
Joop
Title: Re: Java applications Jedit 5.1.0
Post by: Pete on August 15, 2013, 03:33:45 am
Hi All

No problem running jAlbum having followed advice and downloaded the zip file.

Looks like the directory/file problem is jedit 5.1.0 specific as jAlbum does not have any problems listing drives, directories and files.


Regards

Pete
Title: Re: Java applications Jedit 5.1.0
Post by: Ian Manners on August 15, 2013, 05:58:20 am
I agree with everyone else, use the jalbum zip file, none of the installers have worked for a very long time.

I cut and pasted the wrong file name as I grab the jar file for my wife, the one I should have cut n pasted was jalbum11.2.5.zip
Title: Re: Java applications Jedit 5.1.0
Post by: ivan on August 15, 2013, 11:12:31 am
Ian, the latest is jAlbum 11.4.0 and is just jalbum.zip.  They only put the version numbers on the older versions, the current version is always jalbum.zip which can be a bit confusing if you don't rename them after download.
Title: Re: Java applications Jedit 5.1.0
Post by: Ian Manners on August 15, 2013, 05:50:21 pm
Hi Ivan,

I rename them as I download them, I dislike overwriting in case I find I have to back level, thats why I had to check the file name left in the directory but I scraped the jar file name instead of the zip file and pasted that in my post above, didnt give it a second thought until I came back and read the follow posts.

The latest Jalbum zip does work but now I need to find a new skin, as my previous skin doesn't like the new Jalbum. Thats a skin version check thing though, so at least the lastest JAlbum works ok. Back to Jedit - nothing to see here with JAlbum now.

I do wonder though if there was a Java compiler issue or something that caused the filename problems ? Just a fleeting thought.
Title: Re: Java applications Jedit 5.1.0
Post by: ivan on August 15, 2013, 07:17:29 pm
Hi Ian,

I'm not quite sure how a compiler cockup would cause a problem just for OS/2, especially when all the other java applications that I use run the file open without problems - even their earlier version works.  It is more like they were attempting something smart that works on windows and have now out smarted themselves.
Title: Re: Java applications Jedit 5.1.0
Post by: Joop on August 16, 2013, 12:17:45 am
The latest Jalbum zip does work but now I need to find a new skin, as my previous skin doesn't like the new Jalbum. Thats a skin version check thing though, so at least the lastest JAlbum works ok. Back to Jedit - nothing to see here with JAlbum now.
I have the same problem, but as soon as you go to use it, JAlbum comes up with a question if you want to download a new version, just agree. Its all going automatic from there, of course you need to be connected.
After that you need to restart the program so the new plugin is effective. Goes very smooth.

Cheers,
Joop
Title: Re: Java applications Jedit 5.1.0
Post by: Joop on August 19, 2013, 02:04:33 am
I just tried JAlbum latest (11.4) with same setup of Odin/Java with which I tested jEdit 5.1.0 and I didn't have any trouble.
Sorry, JAlbum latest is 11.4.1. Installed it and it just runs. Did open and close a few things. The only annoying thing is a popup for registering the stuff.

Cheers,
Joop