You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by "Schwartz, Cynthia L" <cy...@intel.com> on 2013/08/27 22:06:48 UTC
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
RE: How to build 2.0.3 using 1.7 source and target ?
Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
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:cynthia.l.schwartz@intel.com]
Sent: Tuesday, August 27, 2013 1:29 PM
To: user@pivot.apache.org
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 [mailto:Roger.Whitcomb@actian.com]
Sent: Tuesday, August 27, 2013 1:23 PM
To: user@pivot.apache.org
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 [mailto:cynthia.l.schwartz@intel.com]
Sent: Tuesday, August 27, 2013 1:07 PM
To: user@pivot.apache.org
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<ja
va.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
RE: How to build 2.0.3 using 1.7 source and target ?
Posted by "Schwartz, Cynthia L" <cy...@intel.com>.
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:Roger.Whitcomb@actian.com]
Sent: Tuesday, August 27, 2013 1:23 PM
To: user@pivot.apache.org
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 [mailto:cynthia.l.schwartz@intel.com]
Sent: Tuesday, August 27, 2013 1:07 PM
To: user@pivot.apache.org<ma...@pivot.apache.org>
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
RE: How to build 2.0.3 using 1.7 source and target ?
Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
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:cynthia.l.schwartz@intel.com]
Sent: Tuesday, August 27, 2013 1:07 PM
To: user@pivot.apache.org
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<ja
va.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