I have an HP Proliant remote application card installed in my server, and it uses a java app (jnlp) for KVM access. Due to the incorrect way it's configured, no browser will run the jnlp file it provides; they all just download the file, and then I've just manually run it from my file manager.
Enter Java 8, where medium security is no longer an option. When I try to run the jnlp file, it tells me it's blocked by java security, so how can I run this jnlp file now? I've tried adding localhost and 127.0.0.1 to the exceptions list, but that didn't help.
Related
With macOS Catalina we are experiencing the following problem: opening Java Web Start applications behaves differently when application starts by double clicking on JNLP file and when it is started by double clicking on a shortcut installed on a desktop.
In the first case (double click on a downloaded JNLP file) application opens without permissions to access file system - trying to get the directory listing in user's Desktop directory in JAVA code always returns null. There are no prompts presented to the user asking for any permissions to access the file system. This is not an expected behaviour.
In the second case (starting it from desktop shortcut) user is first prompted that application is trying to access the file system and asked for a permission. When user allows application to access files - application reads user's Desktop directory properly. This is the expected behaviour.
Is there a workaround for this? How can we make web start application access file system on Catalina if it is started by double clicking on JNLP file (which is how the application must be started at least for the first time)?
I've run into a similar problem running a legacy .jnlp app. I was able to get around it by simply invoking the application from CLI (iTerm/Terminal/etc.) :
# javaws filename.jnlp
The root cause is that macOS 10.15 (Catalina) now requires non-Apple applications to be specifically granted "Full Disk Access" permission. Check out this and this for details. Using the explanation there, I added /usr/bin/javaws (and other java binaries such as java and appletviewer) to "Full Disk Access", but that didn't resolve the issue.
Based on an older thread, it seems that if the path to the application is not under /Applications/ (in this case, java and javaws are under /System/ and not under /Applications/), then Full Disk Access is not honored. So it's very likely that a fix needs to be provided by Apple to allow running these applications from the UI.
We were able to resolve this by granting Full Disk Access to /System/Library/CoreServices/Java Web Start.app
For me the problem was solved by installing a different version of Java.
I had the same issue on OSX Catalina 10.15.7. I was able to launch the jnlp file by first setting JAVA_HOME.
export JAVA_HOME=$(/usr/libexec/java_home)
javaws /path/to/file.jnlp
I need to run a jar on a windows server instance.
I would like to build/update/redeploy the jar through a script.
On Linux I know how this works but I cannot seem to find any information how this works on Windows server.
I build the jar somewhere on jenkins.
On linux I can scp (ssh-copy) the jar to the server on a certain location. Then restart it.
In Windows don't even know how to copy the file on to the server without logging in manually via RDP.
I would like a scirpt that I can run in jenkins, that connects to windows server. Stops the running jar and exchanges it for the new one. Starts it up again. (with windows file handles I'd have to stop it before overwriting the jar).
How does CI work on windows server?
PS:The issue is that the jar starts up a process which only runs on windows server in a NON headless mode and thus, I cannot get around windows.
I downloaded Appdynamics agent for Java, which required adding jvm option for glassfish server 3.1.2, for javaagent.jar, giving path of agent. user which application server runs on has full permissions on this folder. After adding this jvm in glassfish server 3.1.2, a restart of server is required. After executing restart, server could not start givng error: error opening ZIP file or JAR manifest missing C:AppServerAgent:javaagent.rar. I noticed that the option was not added in domain.xml file, but still the option is required for starting the machine. I tried to add it manually in the domain.xml file, but still no success. What can I do? now the appication hosted by glassfish doesnt start because the server is down.
Any help? Thank you in advance.
The asadmin manual page says the following:
For the Windows operating system in single mode, a backslash is
required to escape the colon and the backslash characters.
So try the following:
-javaagent:C\:\\AppServerAgent\\javaagent.jar
See also:
Oracle GlassFish Server 3.1 Administration Guide - Administering JVM Options
i have this problem since a while,
i have a web,that can read files from many server.
when it running from eclipse..all is well.
the problem is that when i've published the web on apache tomcat..i cannot read the file on server(permission issue)
i change the username and password for the apache to give it all privileges.
i noticed that the only time i haven't access to read a file,its when the server machine has password protection sharing.
i cannot turn off this password,how to solve it throw the code.
What do you mean with "i change the username and password for the apache to give it all privileges"?.
If it works from eclipse and from tomcat it doesn't, then it must be the tomcat user that doesn't have read/write permissions for that file you are trying to access.
By default, the tomcat user is "tomcat7", so what you have these options:
1) Change the file locations permissions (not recommended):
chmod 666 "myFile"
or:
chown tomcat7:tomcat7 "myfile"
2) (best option!) Change the tomcat user and group, and run tomcat as your os user or any other which has permissions. If you are using tomcat 7 then the config file must be in /etc/default/tomcat7:
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat7.
TOMCAT7_USER=tomcat7
# Run Tomcat as this group ID. Not setting this or leaving it blank will use
# the default of tomcat7.
TOMCAT7_GROUP=tomcat7
Hope it helps!
A web application has been developed in C# which hits my Java code through a restful web service which returns a JSON response.This process was working on a local machine with tomcat server. Now my Java application needs to be hosted on an external server in Linux environment.
Using putty, I logged into the particular hostname and as a root admin.
I have installed Java JDK 1.7, Apache tomcat server 7, my Java application as a war file is placed in the webapps folder. I can start the tomcat server too.
My question is:
How do I hit my application from windows. Is it http://x.y.z.k:8080//MYAPPNAME(war file name)/?
How do i check the java logs in the linux env?
Also I have a set of files that I read from my windows folders as in C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as /home/opt/file.txt
Will this work?
How do I hit my application from windows. Is it
http://x.y.z.k:8080//MYAPPNAME(war file name)/?
If 8080 is the port Tomcat is configured to listen on (I think by default, it is), then that is correct. Bare in mind the web app name is case sensitive. You can configure this setting in $TOMCAT_HOME/conf/server.xml
How do i check the java logs in the linux env?
Since you're using a remote shell over SSH, you will want to use either tail or less to monitor logs in real time. The log files are stored in $TOMCAT_HOME/logs.
Try
$ less +F /path/to/tomcat/logs/catalina.out
catalina.out is the main file when running Tomcat on *nix systems.
Also I have a set of files that I read from my windows folders as in
C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as
/home/opt/file.txt Will this work?
As Lutz Horn mentioned in the comments, try it. In theory, that should work fine as long as the permissions are setup properly.