Re: Ant project not using project specific JDK

2021-09-11 Thread Will Hartung
On Sat, Sep 11, 2021 at 6:54 PM Geertjan Wielenga
 wrote:

> Best to provide complete step by step instructions for someone to
> reproduce the problem so they can help you.
>
> Gj
>

$ git clone https://github.com/oracle/visualvm.git
< set your jdk to 1.8 >
$ cd visualvm/visualvm
$ unzip nb124_platform_21062021.zip
$ ant build-zip
...
BUILD SUCCESSFUL

Launch NB 12.4

Open Project

On the root project (VisualVM) right click->Properties->Libraries->Java
Platform, set it appropriately (i.e. 1.8)
On the root project, right click->Package as->ZIP Distribution
...
/tmp/vm/visualvm/visualvm/uisupport/src/org/graalvm/visualvm/uisupport/ProfilerTabbedPane.java:52:
error: package sun.swing does not exist
import sun.swing.SwingUtilities2;
1 error

Note at the top of the build output that it's also running the same
build-zip target.

Regards,

Will Hartung


Re: Ant project not using project specific JDK

2021-09-11 Thread Geertjan Wielenga
Best to provide complete step by step instructions for someone to reproduce
the problem so they can help you.

Gj

On Sun, 12 Sep 2021 at 01:17, Tim Mullé  wrote:

> Hi,
>
> I’ve sent an email previously about this and just wondering if there are
> any suggestions when running 12.4
>
> I have an existing project (VisualVM) I downloaded from GitHub and am
> trying to build the project in 12.4.
>
> It is an Ant project, and I am running my 12.4 IDE with JDK11.
>
> VisualVM doesn’t build with JDK11 with the following error:
>
> "visualvm/visualvm/uisupport/src/org/graalvm/visualvm/uisupport/ProfilerTabbedPane.java:52:
> error: package sun.swing does not exist
> import sun.swing.SwingUtilities2;”
>
> I know the instructions say to build via the command line, however, I want
> to build and run VisualVM within NetBeans 12.4 so I can debug
> the application and use the tools to learn how the application is built.
>
> I tried setting the Project JDK to JDK1.8 but when I use the “Build”
> option on the project it still uses the JDK (11) that NetBeans is running
> on.
>
> I found this ticket from years ago saying at first it was invalid but then
> it looked like there was a workaround..but nothing since.
>
> It is confusing that we can pick the JDK for the project properties and it
> isn’t honored during the build or run phases.
>
> https://bz.apache.org/netbeans/show_bug.cgi?id=151078
>
> Any ideas how I can specify the JDK for Ant projects without having to
> change the JDK that I run NetBeans itself on?
>
> Thanks,
> - Tim
>
>


Ant project not using project specific JDK

2021-09-11 Thread Tim Mullé
Hi,

I’ve sent an email previously about this and just wondering if there are any 
suggestions when running 12.4

I have an existing project (VisualVM) I downloaded from GitHub and am trying to 
build the project in 12.4.

It is an Ant project, and I am running my 12.4 IDE with JDK11.

VisualVM doesn’t build with JDK11 with the following error:

"visualvm/visualvm/uisupport/src/org/graalvm/visualvm/uisupport/ProfilerTabbedPane.java:52:
 error: package sun.swing does not exist
import sun.swing.SwingUtilities2;”

I know the instructions say to build via the command line, however, I want to 
build and run VisualVM within NetBeans 12.4 so I can debug 
the application and use the tools to learn how the application is built.

I tried setting the Project JDK to JDK1.8 but when I use the “Build” option on 
the project it still uses the JDK (11) that NetBeans is running on.

I found this ticket from years ago saying at first it was invalid but then it 
looked like there was a workaround..but nothing since.

It is confusing that we can pick the JDK for the project properties and it 
isn’t honored during the build or run phases.

https://bz.apache.org/netbeans/show_bug.cgi?id=151078 


Any ideas how I can specify the JDK for Ant projects without having to change 
the JDK that I run NetBeans itself on?

Thanks,
- Tim