Where to obtain the apache JavaHL subversion binding library? [duplicate] - java

This question already has an answer here:
Paired JAR and native library binaries for SVN Java bindings (JavaHL) on Windows?
(1 answer)
Closed 8 years ago.
I can find the API-docs for JavaHL 1.6 at http://subversion.apache.org/docs/javahl/1.6/ . However I can't find any pointer to a jar+native binary (win32) package, or maven resource. Where do you obtain these artifacts?

There seems no obvious way to retrieve them directly (searched in some Maven repos). JavaHL (win32) is part every current eclipse version with subversive in it. So technically, the following would work:
Install in a fresh Eclipse installation the plugin Subversive.
Include there the (optional) library JavaHL.
At the end, you will find the library files in the directory plugins/org.polarion.eclipse.team.svn.connector.javahl16.win32_<version-nr>
Perhaps this workaround helps you, but I am interested in the "real" solution as well.

You can use the WANDisco SVN client installation, which installs the native libraries and 'paired' JAR file. See the accepted answer to my question here, which I'm going to suggest this as a duplicate of. (Although this question is older, I think the answer to the later one is more correct, so I see it as better that this is a duplicate of that if it makes any difference!)

Related

How to deploy a JavaFX project with Maven to an EXE?

I hope this question does not seem to basic but I could not find any good documentation despite researching for hours.
I use Maven (Version 3.3.9) for my JavaFX (Version 11.0.2) with JDK 13.0.1 project and want to build an EXE.
What is the easiest way to do this?
All my researchs stucked somewhere.
Following this documentation, I tried to integrate ant-tasks. But the documentation required ant-javafx.jar to be in the jdk_home/lib directory which doesn't make sense for JDK 13 since it doesn't come with JavaFX.
But this was the latest official documentation where I could find something about Ant Task. So I guessed Ant Task does not work for JDK13 anymore, am I wrong? I hope this does not seem like a dumb assumption but I could not find a newer documentation.
I have also tried the zenjava plugin but the latest commit is 2 years ago, and when I try to use it I get an error
Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-13.0.1/../lib/ant-javafx.jar
Since I've read that javafx-packager was renamed to java-packager a longer time ago (sorry, don't remember, where I've read this) I assumed that zenjava is not up to date for JDK 13.
I couldn't find anything else.
Thank you :)
The first thing to do is to upgrade your Java and JavaFX versions to 14. Then you can use the new jpackage tool, which does exactly what you need. How to do all this with Maven is described in this tutorial, which I did together with Dirk Lemmermann. Maybe that helps.
JPackageScriptFX

Is it possible to view source code of an API class? [duplicate]

This question already has answers here:
Where can I find the Java JDK source code? [closed]
(11 answers)
Closed 7 years ago.
E.g I'd like to see how Integer Class is coded. Is that available?
When you install JDK, there is an option to install the sources, which is selected by default.
After installing, when you open a project, IDEs will usually automatically index Java sources. If not, you can attach the sources to your project depending on your IDE.
Alternatively, you open <JDK_HOME>\src.zip and see the Java sources.
Assuming you are using some IDE.To attach the Java source code with Eclipse(for example), When you install the JDK, you must have selected the option to install the Java source files too Or you can refer below think to attach.
See Also
Attach java source in Eclipse.

JMS client tool - any alternative to HermesJMS for Java 8?

What alternatives to HermesJMS are available? I need to test against JBoss WildFly 8 and it uses Java 8. HermesJms seems to be built for Java 6 and I could not find a full Java 8 port for it. I tried setting hermes.bat with this configuration option but I get the following error:
org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
This seems to be due to Xerces JAR version but I am worried if all other libs under %HERMES_HOME%\lib\ext will have similar Java 8 compatibility issues. Best way is to use a Java 8 compatible build of HermesJMS rather than try fixing JARs one by one but that seems not possible given that there is no such branch.
Thanks,
Paddy
To let it work for Java 8 correctly, you need to add the following parameters:
-Dorg.xml.sax.parser=com.sun.org.apache.xerces.internal.parsers.SAXParser -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
Windows
Open bin/hermes.bat and add those parameters after start "HermesJMS" "%JAVA_HOME%\bin\javaw".
Linux / Mac
Open bin/hermes.sh and add those parameters in the last line after "$JAVACMD".
This seems to be related to java 7 vs 8 difference in XMLP
To make it work I updated Hermes lib folder with :
xercesImpl.jar (version 2.11) - I can see latest in SP5 now
xml-apis.jar (1.4.01)
After downloading JARs from MVN repo I renamed to match existing naming in Hermes.
After this change Hermes starts (and works fine when using JMS) and there is no error in logs.
You could give a try to JMSToolBox (on sourceforge)
Remove xerces.jar and xercesImpl.jar from the %HERMES_HOME%\lib directory. With these parsers removed from the lib, Hermes will default to the SAX parser in JDK8 and will work better.
Click here for additional detail.
It worked for me by adding the following jar file to lib directory.
xercesImpl

How to use correct version of JavaFX in Eclipse Plugin? [duplicate]

This question already has answers here:
How to use JavaFX 2 SDK in Eclipse?
(8 answers)
Closed 9 years ago.
How to use JavaFX classes inside Eclipse Plugin?
Apparently I am unable to add jfxrt.jar somehow, because it depends on java version and I don't know under which java my plugin will run.
UPDATE
In the "duplicate" question How to use JavaFX 2 SDK in Eclipse? it is answered either to set classpath to jafrt.jar or to use e(fx)clipse
First option looks not portable, because path to java may vary.
And I had failed with second. I have installed e(fx)eclipse into my application but can't figure which plug-ins to include into runtime config.
The only option you have today with Java7 or Java8 is to make use of Equinox Adapter Hooks. e(fx)clipse provides those for free and they are already used by other Eclipse tools like the Spring IDE.
You can find a tutorial on how to integrate JavaFX into your Eclipse Plugins at https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
Please note that the tutorial is pointing to the nightly builds who only work with Luna & Java8 if you want to target Kepler / Java7 you need to use the released version of e(fx)clipse which is at http://download.eclipse.org/efxclipse/runtime-released/0.9.0/site
The easiest way would be to download the latest version of Java7 and use that to start eclipse (Java7 now has JavaFX packaged with it).
Otherwise I believe you would need to specify it either in your shortcut to eclipse (I'm assuming a Windows OS):
"C:\Program Files\...\eclipse.exe" -vm "C:\Program Files\...\javaw" -Xbootclasspath "C:\Program Files\...\jre\lib\jfxrt.jar"
Or you could create a _JAVA_OPTIONS environment variable containing the same information about the classpath:
-Xbootclasspath "C:\Program Files\...\jre\lib\jfxrt.jar"
The JVM should pick that up.
Please note, this is highly OS specific and the file paths need to be adjusted for your system.
edit
The JVM argument has been updated per the suggestion by #tomsontom

How to create native binaries for your Java app? [duplicate]

This question already has answers here:
How can I convert my Java program to an .exe file?
(16 answers)
Closed 3 years ago.
I'm wondering how to package a Java application into a native binary for Windows, Linux and Mac OS X.
I know Minecraft does this, but I can't figure out how. This is what'd I'd like to do:
From NetBeans (preferably) or Eclipse, build the three binaries automatically.
Include native libraries for OpenGL et. all.
Obfuscate my code if possible.
If there's some way to mimic the Minecraft auto-updater feature, that'd be totally awesome.
So, are there any tools available to do this for you, or do I need to write a large bulk of XML to accomplish this?
To make a native binary for Windows, you would use a tool like Launch4J. On OSX you could use JarBundler. Minecraft simply distributes the jar file for Linux. I'm not aware of a native binary packager for Linux.
You could also compile your Java code via GCJ but that's probably not what you want, as there are limitations and compatibility concerns there. The native bundlers like Launch4j and JarBundler simply wrap your jar file and use a real JRE to execute it.
As for integrating with NetBeans or Eclipse, you'll probably have to write your own ant build file, especially since the solution varies from one platform to the next.
If you are using Java 9, you can also use Java 9 Modularization & jlink to ship a zero-dependency native app.
There is also maven-jlink-plugin that could help here.
Take a look at GCJBuilder plugin for eclipse. Not sure if it supports cross compilation as the command GCJ compiler does.
If the app. has a GUI and can be distributed from a web site, look into Java Web Start. JWS is supplied by Oracle, and provides auto-update amongst many other features.
Note that JWS uses Jar files, so no conversion is necessary.
I've used JSMooth for this in the past: http://jsmooth.sourceforge.net/
As mentioned before, this wrapper just looks for a real JRE to run it - it does not come with a bundled JRE.

Categories

Resources