Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.7.x broken builds and releases #48

Open
sfuerte opened this issue Dec 1, 2020 · 12 comments
Open

3.7.x broken builds and releases #48

sfuerte opened this issue Dec 1, 2020 · 12 comments

Comments

@sfuerte
Copy link

sfuerte commented Dec 1, 2020

it looks like there is a problem with 3.7.x release builds in general.

If I use 3.7.6.jar downloaded from here, then I'd get the following NCF error in an app:

java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:848)
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:633)
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:598)
	at com.jidesoft.swing.JideSplitButton.updateUI(JideSplitButton.java:109)
	at java.desktop/javax.swing.JMenuItem.init(JMenuItem.java:208)
	at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:147)
	at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:124)
	at java.desktop/javax.swing.JMenu.<init>(JMenu.java:161)
	at java.desktop/javax.swing.JMenu.<init>(JMenu.java:151)
	at com.jidesoft.swing.JideMenu.<init>(JideMenu.java:59)
	at com.jidesoft.swing.JideSplitButton.<init>(JideSplitButton.java:44)

It's getting more interesting when one starts to compare releases and their sizes, for example:

jide-oss-3.6.14.jar - 1.57Mb
jide-oss-3.7.6.jar - 178k

and for 3.7.6 it's pretty much doesn't matter where I take it from: Github (https://github.com/jidesoft/jide-oss/releases/tag/3.7.6), Jitpack.io (https://jitpack.io/#jidesoft/jide-oss) or build locally (with Maven).

On Jitpack, click "look up", it'll show you different versions, snapshots and their build logs. Most/all of them are failing.

On my local machine, when I was trying to compile it with Maven (mvn -f pom_compile.xml clean compile package), it wouldn't copy actual classes at all but rather some minor artefacts. If I try it with modified Ant build then it'll produce bunch of Windows related errors:

jide-oss/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java:25: error: cannot find symbol
    [javac] public class VsnetWindowsProgressBarUI extends WindowsProgressBarUI implements ActionListener
....
    [javac] 100 errors
    [javac] 30 warnings

changes to Ant build:

diff --git a/build.properties b/build.properties
index f6c53b2c..a425aaf3 100644
--- a/build.properties
+++ b/build.properties
@@ -23,5 +23,5 @@ deprecation=off
 stacksize=64m
 initheapsize=128m
 maxheapsize=512m
-source=1.5
-target=1.5
+source=9^M
+target=9^M
diff --git a/build.xml b/build.xml
index 2ca9544e..cd326ea7 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,7 @@
                fork="yes" memoryInitialSize="${initheapsize}" memoryMaximumSize="${maxheapsize}" verbose="no"
                debug="${debug}" deprecation="${deprecation}">
             <classpath refid="standard_classpath"/>
+            <compilerarg line="--add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports java.desktop/javax.swing.plaf.synth=ALL-UNNAMED --add-exports java.desktop/sun.swing=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.awt.image=ALL-UNNAMED --add-exports java.desktop/sun.awt.shell=ALL-UNNAMED --add-exports java.desktop/sun.awt.dnd=ALL-UNNAMED --add-exports java.desktop/sun.awt.windows=ALL-UNNAMED --add-exports java.base/sun.security.action=ALL-UNNAMED" />^M
         </javac>
         <copy todir="${output_dir}">
             <fileset dir="${src_dir}" includes="**/*.gif,**/*.jpg,**/*.png,**/*.properties,**/*.ttf,**/*.vm"/>

Potentially builds on Windows OS are fine but Unix/Linux-based shall be reviewed.

My JDK & OS versions:

> java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment Zulu11.43+1007-CA (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+1007-CA (build 11.0.9.1+1-LTS, mixed mode)

> sw_vers
ProductName:	macOS
ProductVersion:	11.0.1

PS: potentially relates to #30

@mokun
Copy link

mokun commented Dec 1, 2020

@sfuerte

Potentially builds on Windows OS are fine

So, do you mean that the win build is good ?

@sfuerte
Copy link
Author

sfuerte commented Dec 1, 2020

@mokun , potentially, I haven't tested there.
But even assuming the win build is good, copying a built JAR to any Linux/Unix/macOS platform will be useless. Will end up with the com/sun/java/swing/plaf/windows/WindowsLookAndFeel NCF error there.

Technically, the code isn't platform independent and can be build/run on Windows only with JDK 11+.

@mokun
Copy link

mokun commented Dec 1, 2020

@sfuerte

hmmm I pointed about a similar error in this issue here when using jide in my linux box.

Thought it was resolved but you never know, since the maven package never got updated.

I might be wrong but it doesn't seem to be too difficult to resolve this.

Can someone look into this ?

@jidesoft
Copy link
Owner

jidesoft commented Dec 1, 2020

@sfuerte please use the library source code instead of the jar. We don't release jars anymore. The latest version is 3.7.10 which already fixed the NCFE.

@sfuerte
Copy link
Author

sfuerte commented Dec 2, 2020

@jidesoft when I was posting about Maven/Ant compilation errors, that was on macOS 11 under JDK 11:

jide-oss> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   build.properties
	modified:   build.xml
	modified:   pom_compile.xml

no changes added to commit (use "git add" and/or "git commit -a")

and the diff is already at the top of the ticket.

When trying Ant build on master branch (3.7.10?), then it won't even start on JDK 11:

jide-oss> git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean


~/projects/opensource/muCommander/jide-oss> ant
Buildfile: /Users/.../jide-oss/build.xml

init:
     [echo] Ant Version: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
     [echo] Ant Home: /opt/homebrew/Cellar/ant/1.10.9/libexec
     [echo] --------------------------------
     [echo] Java Vendor: Azul Systems, Inc.
     [echo] Java Version: 11.0.9.1
     [echo] Java Home: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
     [echo] Java initial heap size: 128m
     [echo] Java max heap size: 512m
     [echo] Debug: off
     [echo] Deprecation: off.
     [echo] --------------------------------
     [echo] User Name: ...
     [echo] User Home: /Users/...
     [echo] Current Dir: /Users/.../jide-oss
     [echo] --------------------------------
     [echo] Base Dir: /Users/.../jide-oss
     [echo] Output Dir: /Users/.../jide-oss/classes
     [echo] JavaDoc Dir: /Users/.../jide-oss/javadoc
     [echo] Source list: /Users/.../jide-oss/src

compile:
   [delete] Deleting directory /Users/.../jide-oss/classes
    [mkdir] Created dir: /Users/.../jide-oss/classes
    [javac] /Users/.../jide-oss/build.xml:54: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 503 source files to /Users/.../jide-oss/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 5
    [javac] error: Source option 5 is no longer supported. Use 6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.

BUILD FAILED
/Users/.../jide-oss/build.xml:54: Compile failed; see the compiler error output for details.

Total time: 0 seconds

@xDUDSSx
Copy link

xDUDSSx commented Feb 26, 2021

I'm really not too sure what's happening here.
Either way. Currently, the latest provided jar by jidesoft is version 3.7.6 and the current state of the code fails to build for me using maven. And clearly not just me.

The library version 3.7.6 has this issue with the NoClassDefFound and windows LAF that makes my application crash on multiple linux distros when running java version 9 and above. The issue is also mentioned in issue #37 that is linked in some other projects as well. The issue is however fixed. Just not in 3.7.6.

I have managed to build the current version 3.7.11 into a library jar by importing the project into eclipse and merging some of the files from other src directories into a single one and exporting that as a jar.

Here is a link to the functional library (built using Java 8):
https://mega.nz/file/JckwwLyY#OZC5KVEN33N0c4Vl02DeLt2vCSfJ6EVeDa6YSBFrCZY

I hope I am not violating any licenses. I'm posting this just so people don't have to go through the headache of trying to figure this out again. Hopefully, jidesoft will fix their build system or address why it's not working for us.

Thanks for the library though ❤️

@DevCharly
Copy link

I've built and published latest jide-oss version to Maven Central:
https://search.maven.org/artifact/com.formdev/jide-oss

<dependency>
  <groupId>com.formdev</groupId>
  <artifactId>jide-oss</artifactId>
  <version>3.7.11.1</version>
</dependency>

This was built on GitHub Actions using Gradle.
Project is here: https://github.com/JFormDesigner/jide-oss

mokun added a commit to mars-sim/mars-sim that referenced this issue Mar 21, 2021
r5606
2021-03-21

1. Update jide-oss from 3.7.4 to 3.7.11.1.
   See jidesoft/jide-oss#48
@mokun
Copy link

mokun commented Jun 28, 2021

@DevCharly ,

Thanks for your contribution.

Jidesoft has just released 3.7.12 on June 1, 2021.

Do you mind updating your maven build to 3.7.12 so as to give the OSS community a helping hand again ?

DragonNeos referenced this issue in jpcsp/jpcsp Jun 29, 2021
Upgraded BouncyCastle library from 1.45 to 1.69.
Removed unused libraries.
@DevCharly
Copy link

@mokun 3.7.12 is now available on maven central 😄

@mokun
Copy link

mokun commented Jul 25, 2022

I just found out Jidesoft released 3.7.13 on early this year on that very special day of February 22, 2022, in that a lot of people get married 😄

@DevCharly , can you by any chance update that for the OSS community ? Thanks !

@mokun
Copy link

mokun commented Oct 20, 2023

@DevCharly

They released 3.7.14 since 25 Aug 2023.

Will you by any chance be able to update yours to 3.7.14 as well as another contribution to the OSS community ?

Much Appreciated !

@DevCharly
Copy link

@mokun thanks for the reminder
3.7.14 is now available on maven central 😄
https://repo1.maven.org/maven2/com/formdev/jide-oss/3.7.14/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants