Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java to pascal converter software?

917 views
Skip to first unread message

Paul Nicholls

unread,
Feb 21, 2008, 12:37:18 AM2/21/08
to
Hi all,
I am wanting to translate a Java application to pascal, and I was
wondering if anyone knows of a Java to Pascal converter program to help me
get started.

I have googled, but to no avail...

I do have an open-source C to pascal converter called OpenC2Pas, but I am
unsure if that would be good enough for converting Java...

I appologise if this is the wrong group, I was unsure.
thanks in advance,
Cheers,
Paul.

"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paulfn...@gmail.NOSPAM.com

Remove ".NOSPAM" to reply.


Paul Nicholls

unread,
Feb 21, 2008, 12:47:27 AM2/21/08
to
"Paul Nicholls" <paul_n...@hotmail.NOSPAM.com> wrote in message
news:47bd...@newsgroups.borland.com...

> Hi all,
> I am wanting to translate a Java application to pascal, and I was
> wondering if anyone knows of a Java to Pascal converter program to help me
> get started.
>
> I have googled, but to no avail...
>
> I do have an open-source C to pascal converter called OpenC2Pas, but I am
> unsure if that would be good enough for converting Java...
>
<SNIP>

If it helps, there is nothing graphical about the program (no GUI, etc), it
is just classes to do physic simulations.

cheers,
Paul


Franz-Leo Chomse

unread,
Feb 21, 2008, 1:03:07 PM2/21/08
to
On Thu, 21 Feb 2008 16:47:27 +1100, "Paul Nicholls"
<paul_n...@hotmail.NOSPAM.com> wrote:

>"Paul Nicholls" <paul_n...@hotmail.NOSPAM.com> wrote in message
>news:47bd...@newsgroups.borland.com...
>> Hi all,
>> I am wanting to translate a Java application to pascal, and I was
>> wondering if anyone knows of a Java to Pascal converter program to help me
>> get started.

convert to j#

then use reflector to convert to Delphi.net

then try to convert to Delphi for Win32

Regards from Germany

Franz-Leo

Paul Nicholls

unread,
Feb 21, 2008, 4:36:49 PM2/21/08
to
"Franz-Leo Chomse" <franz-le...@samac.de> wrote in message
news:v3frr318e6vati7jg...@4ax.com...


Thanks Franz-Leo, but how does one do the conversion from Java to j#, and
then reflector to convert to Delphi.net?

I do have access to Delphi 2007 (not sure if it is only Win32 or not) if
this helps...

cheers,
Paul

cheers,
Paul


Paul Nicholls

unread,
Feb 21, 2008, 5:09:13 PM2/21/08
to
"Paul Nicholls" <paul_n...@hotmail.NOSPAM.com> wrote in message
news:47bdeef0$1...@newsgroups.borland.com...

EDIT: It seems I only have Delphi 2007 for Win32...

cheers,
Paul


Paul Nicholls

unread,
Feb 21, 2008, 10:18:58 PM2/21/08
to
"Paul Nicholls" <paul_n...@hotmail.NOSPAM.com> wrote in message
news:47bd...@newsgroups.borland.com...
> Hi all,
> I am wanting to translate a Java application to pascal, and I was
> wondering if anyone knows of a Java to Pascal converter program to help me
> get started.
>

I have found a java2delphi converter from a Korean web page here
http://www.codeway.co.kr/board/bbs/board.php?bo_table=Delphi_PDS&wr_id=300&sfl=&stx=&sst=wr_datetime&sod=asc&sop=and&page=7.

I downloaded it and tried running it as per the instructions on the example
java file like so:

java -jar java2delphi.jar Formatter.java

I got these errors:

C:\Downloads\java2delphi.20070629>java -jar java2delphi.jar Formatter.java
Exception in thread "main" java.lang.UnsupportedClassVersionError:
javacc/JavaParser (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Anyone know what this means, and how to fix it?
The Java source code for the parser is included in the download if this
helps...

cheers,
Paul


Rob Kennedy

unread,
Feb 21, 2008, 10:53:27 PM2/21/08
to
Paul Nicholls wrote:
> I have found a java2delphi converter from a Korean web page here
> http://www.codeway.co.kr/board/bbs/board.php?bo_table=Delphi_PDS&wr_id=300&sfl=&stx=&sst=wr_datetime&sod=asc&sop=and&page=7.
>
> I downloaded it and tried running it as per the instructions on the example
> java file like so:
>
> java -jar java2delphi.jar Formatter.java
>
> I got these errors:
>
> C:\Downloads\java2delphi.20070629>java -jar java2delphi.jar Formatter.java
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> javacc/JavaParser (Unsupported major.minor version 49.0)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
> Anyone know what this means, and how to fix it?

That's a Java exception. It tried to load a class, but you don't have
the version it expected to get. Perhaps your Java version is too new or
too old. Try asking on a Java newsgroup.

Google finds a number of sites discussion that exception
(java.lang.UnsupportedClassVersionError) and what to do about it.

> The Java source code for the parser is included in the download if this
> helps...

It might help. Can you recompile the code to make a jar file against
your Java version? Ask for help on a Java newsgroup.

--
Rob

Paul Nicholls

unread,
Feb 21, 2008, 11:02:42 PM2/21/08
to
"Rob Kennedy" <m...@privacy.net> wrote in message
news:47be4735$1...@newsgroups.borland.com...

Thanks Bob, I will try and find a java newsgroup and ask there...
cheers,
Paul


Paul Nicholls

unread,
Feb 21, 2008, 11:32:03 PM2/21/08
to
"Rob Kennedy" <m...@privacy.net> wrote in message
news:47be4735$1...@newsgroups.borland.com...

Hi guys,
on a whim, I searched my harddrive and found I had at least 3 version of
a java.exe file on it...I pointed the path to the latest version I had
(1.5.0_09) and tried the parser again.

It now works!
It will save heaps of time :-)

I hope it will help someone else here :)

cheers,
Paul


alarm...@gmail.com

unread,
May 5, 2014, 1:45:15 PM5/5/14
to
пятница, 22 февраля 2008 г., 7:32:03 UTC+3 пользователь Paul Nicholls написал:
I can't download java2delphi.jar from the corean forum and I can't find it on the Internet. Please, share it in this thread!
0 new messages