'OracleGlassfishServer' is not recognized as an internal or external command - java

I have a problem downloading Oracle’s GlassFish application server. It says I have to execute the app using a command 'ogs-windows.exe' -j as I seemingly don't have JRE 8, which I have. enter image description here
However, the first is not recognised as a command. I have tried reformulating it as "OracleGlassfishServer-3.1.2.2-windows.exe" but it still fails to recognise it. What do I do?

Related

Unable to get GaalVM to work on latest version of OS/X?

I have tried loading the latest versions of GraalVm from the site onto OS/X from : graalvm-ce-java11-darwin-amd64-20.2.0.tar.gz
I tar this bundle, following the instructions and sudo mv the directory to /Libaray/Java/JavaVirtualMachines and setup the .bash_profile per the instructions. If I run the java_home -V command I see the VM there.
When I try to execute any of the command line utilizes from the VM (java, javac, jar, etc.) I get a fault by OS/X saying the application is from an untrusted developer. I then I have to to control panel/security and settings/general and manually select each an every binary and each and every native library one at a time and tell OS/X to add them as an exception to allow them to be run.
Am I missing something or is this expected behavior? Is there a better way to install the graalVM on OS/X?
This is an old issue but maybe it helps:
https://github.com/oracle/graal/issues/1724
I wonder why this has not been fixed yet.

Apache Tomcat will not start on Mac

I cannot get Apache Tomcat to start. I followed the instructions for installing Tomcat on the Mac found at https://www.dev2qa.com/how-to-install-tomcat-in-macos/.
After I type the command to start Tomcat, the response from the command line is that Tomcat has started.
However, when I go to the browser, the default page is not showing up. I further checked to see if the port was being used by using the command
lsof -nP -i4TCP:8080 | grep LISTEN
which showed that no program is using the port. I also read the 'RUNNING.txt' that instructed me on setting the environmental variables, which I did. Any suggestions on why Tomcat is not starting up.
I'm using jdk 1.8.0_202 and Apache Tomcat 9.0.14 that is running of Mac OS High Sierra.
BatChmod
After downloading a fresh version of Tomcat, I use the BatChmod app to alter the file permissions. Tomcat will not launch properly without altering the permissions.
I do not know the command-line equivalent, but here is a screenshot of the settings I have used for years successfully.
Plea for help
If anyone can write the equivalent as a shell script for macOS, please post!
Even better, explain how to wrap such a script as an AppleScript for drag-and-drop execution in Finder.
The problem turned out to be a permissions problem. When I installed Tomcat, I put the folder in the '/Library/Tomcat' directory. Even though the Tomcat files were changed to be executable, the user and group ownership remained the same. To get Tomcat to run, I moved the directory to 'Users/MyUserName/Tomcat'. Once I did that, the default Tomcat page ran.

How do I uninstall a corrupt copy of Java's Assistive Technology - AccessBridge from a Windows 10 PC

My company sells a Java app that mysteriously stopped working for one of our customers. It had been working, but now won't start. The error he gets when trying to start the app is: "java.awt.AWTError: Assistive Technology not found...". I've researched the issue and I think it's caused by some other java app which incorrectly installed “java se accessbridge” and ended up corrupting all java apps on his PC. See:
https://www.avnirvana.com/threads/java-install-error-any-ideas-on-the-fix.2178/
Exception in thread "main" java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge error
https://docs.oracle.com/javase/accessbridge/2.0.2/setup.htm#uninstalling-jab
I've had the customer uninstall our app, uninstall all copies of Java on his PC, and delete all copies of WindowsAccessBridge.dll found in ‘%WINDOWSHOME%\SYSWOW64’ and ‘%WINDOWSHOME%\SYSTEM32’. Now, he gets the same error from Install4j when trying to re-install our app. I have not asked him to try to re-install Assistive Technology-AccessBridge since our app does not require it and the installation appears convoluted and requires a number of manual steps.
There does appear to be a workaround. According to this article:
https://deciphertools.com/blog/2016-05-09-assistive-technology-not-found/
you can keep the jre from loading AccessBridge by adding:
-Djavax.accessibility.assistive_technologies
-Djavax.accessibility.screen_magnifier_present=false
To the app's vmoptions file. I would have him add this to our vmoptions file, but he can't get the installer to run since it gets the same error.
My question is twofold:
What other things can I have the customer do to remove Assistive Technology-AccessBridge?
Failing that, how can I modify install4j's vmoptions file so he can install our app and modify its vmoptions file?
The installer does not read a .vmoptions file for security reasons. You can pass VM parameters on the command line like this:
installer.exe -J-Djavax.accessibility.assistive_technologies -J-Djavax.accessibility.screen_magnifier_present=false

SvnKit export failed randomly on linux

I am using svnkit to export subversion repositories. I am using the code from https://gist.github.com/cliffdarling/2360866 with slight modifications that related to reading command line arguments. I am running this on ubuntu 16. subversion server use windows authentication. when I run the code I get following exception time to time.
org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for 'https://subversion.myserver.com:443' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:53) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:47) at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getNextAuthentication(DefaultSVNAuthenticationManager.java:233) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:724) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189)
Java code is run by a bash script and it loops through a list of urls. I use the vm option -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate. jar file is executed as follows.
java -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate -jar exporter.jar url
Code works for some repo urls but failed sometimes. It is randomly happen. Code works without a problem in windows. I could not find out a solution for this. why does happening ?

ProcessBuilder with open command fails on OSX

I am encountering a problem related to macOS.
To explain the case, we try to update an old auto-update system for mac that just replaced the old jar files, with a new code that will automatically open a .pkg installer file after his download. (the only way for us to update all the application, using Sparkle or other framework is not possible at this stage).
The .pkg file is signed with an "Developer ID Installer ID" certificate.
The .app file is signed with an "Developer ID Application ID" certificate.
But...
When application is launched by double clicking it, or from the terminal with an "open" command, when it comes to the part of code where we try to launch the pkg via a ProcessBuilder and the "open" command, nothing happens, and the Apple console app says that a security issue occured (-67062), nothing more.
However, when the same Application is launched directly via the java command determined by the JavaApplicationStub (copy pasted from the Apple Console Application log), it works without any problem, and the pkg opens fine.
What could we do to overcome this one?
UPDATE:
I also discovered that the command 'spctl -a -v" returns :
MyApp.pkg: rejected
source=no usable signature
Unless it is used with the parameter "--type install" which gives:
MyApp.pkg: accepted
source=Developer ID
I don't know if it matters or if it the expected result but it may help
UPDATE 2 :
Digging further in High Sierra logs (not accessible with the Console, although it seemed provided for that...), with the following command :
log stream --debug
I was able to see that the issue came from the jspawnhelper file located in the "lib" folder of the JRE, that was not signed by Oracle...
By the way, this means that we must include a JRE bundled with a Java app, with all executable properly signed with a "Developer ID Application" certificate.
But...still not solved...
Another error occurs, again with the "open" command, but it goes a little further.
Now I have the following, thrown by the builtin Installer.app from Apple :
No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting.
And still no idea, as my package already contains an Info.plist...

Categories