How to build 2.0.3 using 1.7 source and target ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to build 2.0.3 using 1.7 source and target ?

Schwartz, Cynthia L

What is the proper way to build Pivot 2.0.3 using ant  ?

 

I tried ant –Dcompiler.source=1.7 –Dcompiler.target=1.7 install

 

(without the 1.7 switches, it  builds and runs the project.  Then  I added a try-with-resources stmt and tried to run my project )

 

It builds, however my Netbeans project will not run with the following :

 

 

java.lang.ExceptionInInitializerError

Caused by: java.lang.RuntimeException: Uncompilable source code – mainwindow.MainWindow is not abstract and does not override abstract method startup(org.apache.pivot.wtk.Display,org.apache.pivot.collections.Map<java.lang.String,java.lang.String>) in org.apache.pivot.wtk.Application

                at mainwindow.MainWindow<clinit>(MainWindow.java:XX)

Exception in thread "main" Java Result: 1

 

Reply | Threaded
Open this post in threaded view
|

RE: How to build 2.0.3 using 1.7 source and target ?

Roger Whitcomb-2

Hi Cynthia,

                You should only have to do: “ant install” (actually to just build the unsigned .jar files you can use “ant clean package”). I just tried it on Windows 7, with JDK 1.7.0_25 and it worked fine (with the current code in svn at “branches/2.0.x”).  I don’t think you need to specify the 1.7 compiler version, even if you want to use Java 7 features in your code.  The 1.6-compatible .jar files generated by a Pivot build will still be compatible with code built using 1.7-compatible user programs (in my experience). 

                Did you try just using the 2.0.3 release .jar files from here:  http://pivot.apache.org/download.cgi#2.0.3 ?

                Where did you add the “try-with-resources” statement?  Was it in your main program (close to the “startup” method)?  The Pivot code does not implement the “AutoCloseable” interface anywhere that would be required for a “try-with-resources” statement, so that may be the problem, depending on what resources you wanted automatically closed….

 

~Roger

 

From: Schwartz, Cynthia L [mailto:[hidden email]]
Sent: Tuesday, August 27, 2013 1:07 PM
To: [hidden email]
Subject: How to build 2.0.3 using 1.7 source and target ?

 

What is the proper way to build Pivot 2.0.3 using ant  ?

 

I tried ant –Dcompiler.source=1.7 –Dcompiler.target=1.7 install

 

(without the 1.7 switches, it  builds and runs the project.  Then  I added a try-with-resources stmt and tried to run my project )

 

It builds, however my Netbeans project will not run with the following :

 

 

java.lang.ExceptionInInitializerError

Caused by: java.lang.RuntimeException: Uncompilable source code – mainwindow.MainWindow is not abstract and does not override abstract method startup(org.apache.pivot.wtk.Display,org.apache.pivot.collections.Map<java.lang.String,java.lang.String>) in org.apache.pivot.wtk.Application

                at mainwindow.MainWindow<clinit>(MainWindow.java:XX)

Exception in thread "main" Java Result: 1

 

Reply | Threaded
Open this post in threaded view
|

RE: How to build 2.0.3 using 1.7 source and target ?

Schwartz, Cynthia L

Roger,

 

Currently the try-with-resources statement is in the library, in TerraFileBrowserSkin.java and then I build 1.7 compatible jars and try to use my modified library.

 

Cynthia

 

 

 

From: Roger L. Whitcomb [mailto:[hidden email]]
Sent: Tuesday, August 27, 2013 1:23 PM
To: [hidden email]
Subject: RE: How to build 2.0.3 using 1.7 source and target ?

 

Hi Cynthia,

                You should only have to do: “ant install” (actually to just build the unsigned .jar files you can use “ant clean package”). I just tried it on Windows 7, with JDK 1.7.0_25 and it worked fine (with the current code in svn at “branches/2.0.x”).  I don’t think you need to specify the 1.7 compiler version, even if you want to use Java 7 features in your code.  The 1.6-compatible .jar files generated by a Pivot build will still be compatible with code built using 1.7-compatible user programs (in my experience). 

                Did you try just using the 2.0.3 release .jar files from here:  http://pivot.apache.org/download.cgi#2.0.3 ?

                Where did you add the “try-with-resources” statement?  Was it in your main program (close to the “startup” method)?  The Pivot code does not implement the “AutoCloseable” interface anywhere that would be required for a “try-with-resources” statement, so that may be the problem, depending on what resources you wanted automatically closed….

 

~Roger

 

From: Schwartz, Cynthia L [[hidden email]]
Sent: Tuesday, August 27, 2013 1:07 PM
To: [hidden email]
Subject: How to build 2.0.3 using 1.7 source and target ?

 

What is the proper way to build Pivot 2.0.3 using ant  ?

 

I tried ant –Dcompiler.source=1.7 –Dcompiler.target=1.7 install

 

(without the 1.7 switches, it  builds and runs the project.  Then  I added a try-with-resources stmt and tried to run my project )

 

It builds, however my Netbeans project will not run with the following :

 

 

java.lang.ExceptionInInitializerError

Caused by: java.lang.RuntimeException: Uncompilable source code – mainwindow.MainWindow is not abstract and does not override abstract method startup(org.apache.pivot.wtk.Display,org.apache.pivot.collections.Map<java.lang.String,java.lang.String>) in org.apache.pivot.wtk.Application

                at mainwindow.MainWindow<clinit>(MainWindow.java:XX)

Exception in thread "main" Java Result: 1

 

Reply | Threaded
Open this post in threaded view
|

RE: How to build 2.0.3 using 1.7 source and target ?

Roger Whitcomb-2

Hmm.  Did you try changing “compiler.source” and “compiler.target” in the “build.properties” file?  That is the expected place for it to be set. 

 

~Roger

 

From: Schwartz, Cynthia L [mailto:[hidden email]]
Sent: Tuesday, August 27, 2013 1:29 PM
To: [hidden email]
Subject: RE: How to build 2.0.3 using 1.7 source and target ?

 

Roger,

 

Currently the try-with-resources statement is in the library, in TerraFileBrowserSkin.java and then I build 1.7 compatible jars and try to use my modified library.

 

Cynthia

 

 

 

From: Roger L. Whitcomb [[hidden email]]
Sent: Tuesday, August 27, 2013 1:23 PM
To: [hidden email]
Subject: RE: How to build 2.0.3 using 1.7 source and target ?

 

Hi Cynthia,

                You should only have to do: “ant install” (actually to just build the unsigned .jar files you can use “ant clean package”). I just tried it on Windows 7, with JDK 1.7.0_25 and it worked fine (with the current code in svn at “branches/2.0.x”).  I don’t think you need to specify the 1.7 compiler version, even if you want to use Java 7 features in your code.  The 1.6-compatible .jar files generated by a Pivot build will still be compatible with code built using 1.7-compatible user programs (in my experience). 

                Did you try just using the 2.0.3 release .jar files from here:  http://pivot.apache.org/download.cgi#2.0.3 ?

                Where did you add the “try-with-resources” statement?  Was it in your main program (close to the “startup” method)?  The Pivot code does not implement the “AutoCloseable” interface anywhere that would be required for a “try-with-resources” statement, so that may be the problem, depending on what resources you wanted automatically closed….

 

~Roger

 

From: Schwartz, Cynthia L [[hidden email]]
Sent: Tuesday, August 27, 2013 1:07 PM
To: [hidden email]
Subject: How to build 2.0.3 using 1.7 source and target ?

 

What is the proper way to build Pivot 2.0.3 using ant  ?

 

I tried ant –Dcompiler.source=1.7 –Dcompiler.target=1.7 install

 

(without the 1.7 switches, it  builds and runs the project.  Then  I added a try-with-resources stmt and tried to run my project )

 

It builds, however my Netbeans project will not run with the following :

 

 

java.lang.ExceptionInInitializerError

Caused by: java.lang.RuntimeException: Uncompilable source code – mainwindow.MainWindow is not abstract and does not override abstract method startup(org.apache.pivot.wtk.Display,org.apache.pivot.collections.Map<java.lang.String,java.lang.String>) in org.apache.pivot.wtk.Application

                at mainwindow.MainWindow<clinit>(MainWindow.java:XX)

Exception in thread "main" Java Result: 1