Hacking JavaCPP in Eclipse #545
Replies: 3 comments 1 reply
-
If the only thing you dislike about Maven is the speed, I'd recommend using Gradle instead: |
Beta Was this translation helpful? Give feedback.
-
Thanks. I dislike Mavan whole approach, but as long as it doesn't get in the way I don't really mind. But for what I call hacking and exploring code the speed penalty is unbearable for me. It gets the job done for consistent builds and packaging etc so not bad for production builds and distribution. I've tried gradle and liked it better, but even that is too slow for my temperament. Maybe I just did not spend enough time with it to tune it for my liking. Or the Eclipse plugin got in the way or was not mature enough when I tried it. YMMV. But basically what I want is instant gratification, I add something to the code the experiment or investigate / instrument and I want to execute it without any perceptible delay. But that is just me. I've done my time with 20 min compile cycles and 15 min UV-EPROM erase and burn cycles and my remaining life feels too short to spend it on things like waiting anything. Not to mention what it does to concentration. I find that 15 sec is enough to start my mind wondering where I could spend the wait time. Fortunately (?) everyone can use whatever tools they want if not dictated by employers. We can't all like same things and my 'post' here was just to share what little I had learn to be able to do what I wanted. So as to spare some other poor dev from re-inventing that. |
Beta Was this translation helpful? Give feedback.
-
On 17. Jan 2022, at 2.37, Samuel Audet ***@***.***> wrote:
That said, for quick and dirty development, it's a lot easier to just use it on the command line. Coming up with your own custom build tools like you're doing is fine, if that motivates you, great, but I wouldn't recommend it.
Yes, I'm not recommending it, just sharing what I do.
Custom tooling is a bit grand word for a few lines of Java that mimic the command line interface more or less one to one.
For me to point is that all the Eclipse debugging is there to be used and starting the build is immediate without any delay and just one click.
The other point is that this is for debugging/examining the innards of JavaCPP not for developing new bindings with JavaCPP.
And since it took me more than 15 minutes to find out how to do that I felt it would be worth sharing so as to potentially save that time for someone else.
cheers Kusti
|
Beta Was this translation helpful? Give feedback.
-
FYI
I like to examine and try out stuff in JavaCPP using Eclipse.
If you want to do that you can find some hints in my repo in this branch:
https://github.com/nyholku/javacpp/tree/eclipse-tooling
I don't like Maven builds for hacking/development because it so slow that it is a ball and a chain.
So what I do I download all the jars manually from Maven Central (they are in my repo now) and just add them to the debug configuration on to the class path.
The current (as of today) list of jars is
Then I create a Java class (below) with main that calls on Builder main so that I don't have to go to the command line to execute anything.
For above to work it is essential that the current directory for the debug configuration is set to the same directory as you would use if you would execute JavaCPP from the command line.
By doing what I advocate above I can just press CMD+F11 on Eclipse and the code start immediately with no compile step and I can use all Eclipse facilities to examine the code and runtime state.
There are probably easier ways to do above but I share what I do, tips are welcome.
I know, many people prefer and like IntelliJ and Maven and if you are happy with those, then that is great.
But for me and for hacking I find above works best for me.
wbr Kusti
Beta Was this translation helpful? Give feedback.
All reactions