Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-03

Feature request: Support Java classes syntax in code tools

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

Mainly for Mattias, I suppose:

The codetools cannot handle the jvm extensions.
As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working.

Also, you cannot set the ppcjvm compiler as compiler. If you do, you get an error:

The compiler file "/usr/local/bin/ppcjvm" does not look correct: classes.ppu not found. Check your fpc.cfg.

Logical, because this unit does not exist for the JVM target...

Tested with lazarus 1.2.x, 1.3 and 1.5.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 12 lines
[...] The codetools cannot handle the jvm extensions. As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. Also, you cannot set the ppcjvm compiler as compiler. If you do, you get an error: The compiler file "/usr/local/bin/ppcjvm" does not look correct: classes.ppu not found. Check your fpc.cfg. Logical, because this unit does not exist for the JVM target... Tested with lazarus 1.2.x, 1.3 and 1.5.

The wiki page about JVM seems to be outdated.
http://wiki.freepascal.org/FPC_JVM

What is now the right way to get a ppcjvm?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 20 lines
On Sun, 8 Mar 2015 19:08:23 +0100 (CET) Michael Van Canneyt wrote: > [...] > The codetools cannot handle the jvm extensions. > As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. > > Also, you cannot set the ppcjvm compiler as compiler. If you do, you get an error: > > The compiler file "/usr/local/bin/ppcjvm" does not look correct: > classes.ppu not found. Check your fpc.cfg. > > Logical, because this unit does not exist for the JVM target... > > Tested with lazarus 1.2.x, 1.3 and 1.5. The wiki page about JVM seems to be outdated. http://wiki.freepascal.org/FPC_JVM What is now the right way to get a ppcjvm?

Just compile it from trunk, as per http://wiki.freepascal.org/FPC_JVM/Building

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 26 lines
On Mon, 9 Mar 2015, Mattias Gaertner wrote: > On Sun, 8 Mar 2015 19:08:23 +0100 (CET) > Michael Van Canneyt wrote: > >> [...] >> The codetools cannot handle the jvm extensions. >> As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. >> >> Also, you cannot set the ppcjvm compiler as compiler. If you do, you get an error: >> >> The compiler file "/usr/local/bin/ppcjvm" does not look correct: >> classes.ppu not found. Check your fpc.cfg. >> >> Logical, because this unit does not exist for the JVM target... >> >> Tested with lazarus 1.2.x, 1.3 and 1.5. > > The wiki page about JVM seems to be outdated. > http://wiki.freepascal.org/FPC_JVM > > What is now the right way to get a ppcjvm? Just compile it from trunk, as per http://wiki.freepascal.org/FPC_JVM/Building

Just compiling gives:
Error: Assembler jasmin.jar not found, switching to external assembling

Jasmin has not released a version with the patches mentioned on the wiki. So I guess you still have to build it yourself.

I tried the instruction for Jasmin:
I downloaded and unpacked jasmin 2.4.
Applying the patch failed, because it changes line endings. patch needs the option --binary for that.
It still fails on two files:
./src/jasmin/parser.java.rej
./src/jasmin/sym.java.rej

Calling build.sh results in
build.sh: line 2: $'\r': command not found
build.sh: line 16: $'\r': command not found

So changing the line endings is a bad idea.

What is now the right way to get a ppcjvm?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
> Just compile it from trunk, as per http://wiki.freepascal.org/FPC_JVM/Building Just compiling gives: Error: Assembler jasmin.jar not found, switching to external assembling Jasmin has not released a version with the patches mentioned on the wiki. So I guess you still have to build it yourself. I tried the instruction for Jasmin: I downloaded and unpacked jasmin 2.4. Applying the patch failed, because it changes line endings. patch needs the option --binary for that. It still fails on two files: ./src/jasmin/parser.java.rej ./src/jasmin/sym.java.rej Calling build.sh results in build.sh: line 2: $'\r': command not found build.sh: line 16: $'\r': command not found So changing the line endings is a bad idea. What is now the right way to get a ppcjvm?

Hm.
The instructions worked when I tried them - but that was a long time ago, I haven't rebuilt jasmin since, I always just used the initial version I built.

Now you'll have to ask Jonas, I'm out of my depth here :(

I don't think he is subscribed to the Lazarus mailing list, so better contact him in private. Maybe he'll find time to update the instructions (and/or the needed patches).

Michael.

Reply by email

Sven Barth
to Mattias Gaertner: On Mon, 9 Mar 2015 21:36:18 +0100 (CET) Just compiling gives: Error: Assembler jasmin.jar…
"Mattias Gaertner" wrote 14 lines
On Mon, 9 Mar 2015 21:36:18 +0100 (CET) Michael Van Canneyt wrote: > > > On Mon, 9 Mar 2015, Mattias Gaertner wrote: > > > On Sun, 8 Mar 2015 19:08:23 +0100 (CET) > > Michael Van Canneyt wrote: > > > >> [...] > >> The codetools cannot handle the jvm extensions. > >> As a result, as soon as you include e.g. the androidr14 unit, code

completion just stops working.

> >> > >> Also, you cannot set the ppcjvm compiler as compiler. If you do, you

get an error:

Show quoted text 14 lines
> >> > >> The compiler file "/usr/local/bin/ppcjvm" does not look correct: > >> classes.ppu not found. Check your fpc.cfg. > >> > >> Logical, because this unit does not exist for the JVM target... > >> > >> Tested with lazarus 1.2.x, 1.3 and 1.5. > > > > The wiki page about JVM seems to be outdated. > > http://wiki.freepascal.org/FPC_JVM > > > > What is now the right way to get a ppcjvm? > > Just compile it from trunk, as per

http://wiki.freepascal.org/FPC_JVM/Building

Show quoted text 22 lines
Just compiling gives: Error: Assembler jasmin.jar not found, switching to external assembling Jasmin has not released a version with the patches mentioned on the wiki. So I guess you still have to build it yourself. I tried the instruction for Jasmin: I downloaded and unpacked jasmin 2.4. Applying the patch failed, because it changes line endings. patch needs the option --binary for that. It still fails on two files: ./src/jasmin/parser.java.rej ./src/jasmin/sym.java.rej Calling build.sh results in build.sh: line 2: $'\r': command not found build.sh: line 16: $'\r': command not found So changing the line endings is a bad idea. What is now the right way to get a ppcjvm?

The prebuild Jasmin should be available on our FTP (don't know the link right now, maybe either JVM related or utils).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150310/97df34e5/attachment.html>

Reply by email

Mattias Gaertner
to Michael Van Canneyt: Mainly for Mattias, I suppose: The codetools cannot handle the jvm extensions. As a…
[...] The codetools cannot handle the jvm extensions. As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working.

It works here.
What error do you get?

Also, you cannot set the ppcjvm compiler as compiler. If you do, you get an error: The compiler file "/usr/local/bin/ppcjvm" does not look correct: classes.ppu not found. Check your fpc.cfg.

That was just a warning. I fixed it.

Logical, because this unit does not exist for the JVM target... Tested with lazarus 1.2.x, 1.3 and 1.5.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 9 lines
On Sun, 8 Mar 2015 19:08:23 +0100 (CET) Michael Van Canneyt wrote: > [...] > The codetools cannot handle the jvm extensions. > As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. It works here. What error do you get?

The following:

### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "illegal qualifier . found" at Line=51 Col=8 in "/data/source/android/skeletonapp/src/skeletonapp.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas"

If you want, I can send the application I was developing.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 17 lines
On Tue, 10 Mar 2015, Mattias Gaertner wrote: > On Sun, 8 Mar 2015 19:08:23 +0100 (CET) > Michael Van Canneyt wrote: > >> [...] >> The codetools cannot handle the jvm extensions. >> As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. > > It works here. > What error do you get? The following: ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas"

In 1.5 I don't see this error.
Maybe it has been fixed there.

If you want, I can send the application I was developing.

ok

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 24 lines
On Tue, 10 Mar 2015 19:45:29 +0100 (CET) Michael Van Canneyt wrote: > > > On Tue, 10 Mar 2015, Mattias Gaertner wrote: > >> On Sun, 8 Mar 2015 19:08:23 +0100 (CET) >> Michael Van Canneyt wrote: >> >>> [...] >>> The codetools cannot handle the jvm extensions. >>> As a result, as soon as you include e.g. the androidr14 unit, code completion just stops working. >> >> It works here. >> What error do you get? > > The following: > > ### TCodeToolManager.HandleException: "expected :, but 'java.lang' found" at Line=11753 Col=35 in "/home/michael/fpc/rtl/android/jvm/androidr14.pas" In 1.5 I don't see this error. Maybe it has been fixed there.

I copied the errors from 1.5 ?

> If you want, I can send the application I was developing. ok

Sent in a separate mail.

Michael.

Reply by email