Regenerating j2slib.zip

5 views
Skip to first unread message

Ximin Luo

unread,
Nov 3, 2016, 11:27:34 AM11/3/16
to java2...@googlegroups.com
Hi list,

I'm trying to package java2script for Debian. Debian is a free software distribution and therefore I cannot include j2slib.zip directly, because it's not source code - it's autogenerated javascript, which is not in the "preferred form of modification" which is the usual definition for "source code".

So, to properly package java2script in Debian I must rebuild it from the original Java source code. However, I have been unable to figure out how.

I've included more technical details of my attempt here:

https://github.com/zhourenjian/java2script/issues/8

Any help would be much appreciated. Note that I'm using Eclipse 3.8 and the j2s-eclipse-3.8 branch on Github.

X

--
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git

Zhou Renjian

unread,
Nov 3, 2016, 12:37:28 PM11/3/16
to Java2Script, infi...@debian.org
Hi Ximin,

From the link you provided, it seemed that you already get j2slib built in Eclipse IDE.

To build it in complete command line mode, I suggest you to start with project


Regards,
Zhou Renjian

Ximin Luo

unread,
Nov 9, 2016, 12:04:07 AM11/9/16
to java2...@googlegroups.com
Hello Renjian!

I am already building it in complete command-line mode, using that ui.cmdline project. However, it does not generate j2slib.zip *exactly* as is distributed in git.

I'm fairly confident I'm running the "correct commands" because it generates 80% of it and looks "almost correct". But the remaining 20% is missing for some reason.

Could you explain where the "*.z.js" files come from, for example? Specifically, I am unable to generate these files, *even* when I use ui.cmdline:

-j2slib/j2slibcore.z.js
-j2slib/j2slib.z.js
-j2slib/java/error.z.js
-j2slib/java/io/FileInputStream.js
-j2slib/java/io/FileOutputStream.js
-j2slib/java/lang/Object.js
-j2slib/java/lang/reflect.z.js
-j2slib/java/net/URL.js

-j2slib/net/sf/j2s/ajax/PipeManager.js
-j2slib/net/sf/j2s/ajax/PipeObject.js
-j2slib/net/sf/j2s/ajax/simple.z.js

-j2slib/org/eclipse/swt/custom/images/*
-j2slib/org/eclipse/swt/events.z.js
-j2slib/org/eclipse/swt/layout/FillLayout.z.js
-j2slib/org/eclipse/swt/layout/GridLayout.z.js
-j2slib/org/eclipse/swt/more.z.js
-j2slib/org/eclipse/swt/widgets/Common.z.js
-j2slib/org/eclipse/swt/widgets/DesktopListener.js
-j2slib/org/eclipse/swt/widgets/Menu.z.js
-j2slib/org/eclipse/swt/widgets/TabFolder.z.js
-j2slib/org/eclipse/swt/widgets/Tray.z.js

X

Zhou Renjian:

Ximin Luo

unread,
Nov 9, 2016, 12:04:07 AM11/9/16
to java2...@googlegroups.com
Hi again,

I made some more progress on this issue:

https://github.com/zhourenjian/java2script/issues/8#issuecomment-258693034

(Sorry if this email is duplicate. I wasn't sure if you can see the github emails. Anyway, maybe other people on the list are interested.)

Now the list of missing files is reduced to:

~~~~
-java/io/FileInputStream.js
-java/io/FileOutputStream.js
-java/lang/Object.js
-java/net/URL.js
~~~~

I guess I can just copy the corresponding java files from some version of the JDK, then these will be generated automatically. Could you tell me which version, please?

Or are you somehow representing these files using a different magical method in this newer versions of J2S?

X

Ximin Luo:

Zhou Renjian

unread,
Nov 9, 2016, 12:09:59 AM11/9/16
to Java2Script
Some of those *.java files are from Apache Harmony at the time. Some are from Open JDK.

Open JDK should be source as Harmony is retired.

*.z.js files are built from Ant script /net.sf.j2s.lib/build/build.xml

Regards,
Zhou Renjian

--
You received this message because you are subscribed to the Google Groups "Java2Script" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java2script+unsubscribe@googlegroups.com.
To post to this group, send email to java2...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/java2script/a098c109-2a2f-6963-91af-622fb0b647f6%40debian.org.
For more options, visit https://groups.google.com/d/optout.

Robert Hanson

unread,
Nov 9, 2016, 7:47:00 PM11/9/16
to java2...@googlegroups.com
Zhou,

Is there an Eclipse 4.2 version of the latest J2S core package available somewhere? I see 4.5 and 4.6... For that matter, Ximin could really use a 3.8 version of that to do what he wants to do.

Bob



For more options, visit https://groups.google.com/d/optout.



--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Reply all
Reply to author
Forward
0 new messages