Upgrading SDK

Post here questions and problems related to oXygen frameworks/document types.
sderrick
Posts: 268
Joined: Sat Jul 10, 2010 4:03 pm

Upgrading SDK

Post by sderrick »

Hi,
I'm upgrading the SDK from 24 to 26.1.0.1 I am using Java 11
I am incorporating the Author component into a java desktop app.
I'm using the following properties for maven.

Code: Select all

<properties>
        <target.web.dir>${project.build.directory}/dist</target.web.dir>
        <jnlp.name>mbep</jnlp.name>		
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!--<oxygen.sdk.version>24.0.0.2</oxygen.sdk.version>-->
        <oxygen.sdk.version>26.1.0.1</oxygen.sdk.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
I'm seeing an odd behavior and haven't been able to figure out whats up. I'm using Netbeans as my IDE to build the project.
When I run the app from within Netbeans all is well.
When I run it from the command line "java -jar mbep.jar I get a class not found exception
Caused by: java.lang.ClassNotFoundException: com.jidesoft.swing.JideButton
I can see the oxygen-jide-1.0-SNAPSHOT.jar file in the folder with all the rest of the jars.
thanks,
Scott
Radu
Posts: 9162
Joined: Fri Jul 09, 2004 5:18 pm

Re: Upgrading SDK

Post by Radu »

Hi Scott,
I do not know what is inside the "mbep.jar" library.
As you are running "java -jar mbep.jar" without specifying a classpath and a main class in the command line, I assume that:
1) Either the "mbep.jar" was created to contain inside it the contents of all other JAR libraries.
2) It has inside a META-INF/Manifest.mf which specifies the main class name and also a classpath reference to all necessary JAR libraries. I assume that the META-INF/Manifest.mf's classpath reference does not include the Reference to the jide-related jar's library name or maybe it has a reference to the wrong library name.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sderrick
Posts: 268
Joined: Sat Jul 10, 2010 4:03 pm

Re: Upgrading SDK

Post by sderrick »

Radu,

You are correct, in my manifest file it lists
oxygen-jide-1.0-20240403.095406-1.jar
but the jar that is included in the build is
oxygen-jide-1.0-SNAPSHOT.jar
I use ant in Netbeans to build the project. Maven builds the manifest.mf file. Trying to figure out why maven is misnaming this jar out of all the 70+ other jars?
the listing in the oxygen folder for oxygen-jide, shows identical jars with different names? One is the name that shows up in teh manifest file, the other is what shows up in my build folder.
scott:~/.m2/repository$ ls com/oxygenxml/oxygen-jide/1.0-SNAPSHOT/ -all
total 5520
drwxrwxr-x 2 scott scott 4096 Jun 13 13:59 .
drwxrwxr-x 3 scott scott 4096 Jun 12 13:07 ..
-rw-rw-r-- 1 scott scott 980 Apr 3 02:54 maven-metadata-public.xml
-rw-rw-r-- 1 scott scott 40 Jun 13 13:59 maven-metadata-public.xml.sha1
-rw-rw-r-- 1 scott scott 2803838 Apr 3 02:54 oxygen-jide-1.0-20240403.095406-1.jar
-rw-rw-r-- 1 scott scott 40 Jun 12 13:07 oxygen-jide-1.0-20240403.095406-1.jar.sha1
-rw-rw-r-- 1 scott scott 1336 Apr 3 02:54 oxygen-jide-1.0-20240403.095406-1.pom
-rw-rw-r-- 1 scott scott 40 Jun 12 13:07 oxygen-jide-1.0-20240403.095406-1.pom.sha1
-rw-rw-r-- 1 scott scott 2803838 Apr 3 02:54 oxygen-jide-1.0-SNAPSHOT.jar
-rw-rw-r-- 1 scott scott 1336 Apr 3 02:54 oxygen-jide-1.0-SNAPSHOT.pom
-rw-rw-r-- 1 scott scott 232 Jun 12 13:07 _remote.repositories
-rw-rw-r-- 1 scott scott 512 Jun 13 13:59 resolver-status.properties

still trying to figure out how to resolve this.

Scott
sderrick
Posts: 268
Joined: Sat Jul 10, 2010 4:03 pm

Re: Upgrading SDK

Post by sderrick »

For now I have hacked the issue.
During the packaging process I just make a copy with the name listed in the manifest file...

Code: Select all

 <copy tofile="${project.build.directory}/dist/lib/oxygen-jide-1.0-20240403.095406-1.jar" file="${project.build.directory}/dist/lib/oxygen-jide-1.0-SNAPSHOT.jar" force="true" />

It would be nice to be able to force Maven to use the same jar it uses in the dependency plugin as it does in the manfest.mf creation.
Scott
Radu
Posts: 9162
Joined: Fri Jul 09, 2004 5:18 pm

Re: Upgrading SDK

Post by Radu »

HI Scott,
I'm glad you found a workaround, I think the name of the library itself "oxygen-jide-1.0-SNAPSHOT.jar" with that "SNAPSHOT" part usually marking libraries not intended to be used in production might cause Maven to rename the reference to it. I will add an issue to try and change the name of the JAR library on our side for the SDK and remove from it the "-SNAPSHOT" part.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sderrick
Posts: 268
Joined: Sat Jul 10, 2010 4:03 pm

Re: Upgrading SDK

Post by sderrick »

Radu, thanks, that would be great. I thought the name was odd.
Scott
Post Reply