How to disable JDWP interface on linux server? [duplicate] - java

This question already has answers here:
What are Java command line options to set to allow JVM to be remotely debugged?
(9 answers)
Closed 4 years ago.
I've seen this question on stackoverflow, but without a clear answer. How do you disable JDWP on linux server? We had a security team recommend to disable JDWP due to RCE.
Ref: https://ioactive.com/hacking-java-debug-wire-protocol-or-how/
Thank you.

JDWP is only enabled if you ask for it (-agentlib:jdwp), so:
To disable: Don't ask.
To see what not to do:
What are Java command line options to set to allow JVM to be remotely debugged?

Related

Java/Tomcat debugging (SSL) - which log file is used? [duplicate]

This question already has answers here:
limiting java ssl debug logging
(2 answers)
Closed 5 years ago.
I'd like to add the following to the Java-OPTS of my tomcat:
-Djavax.net.debug=ssl
I do this because I need to debug the ssl connnections to and from said tomcat.
Questions:
In which log file will the output of the debugging go? Catalina.out?
Is it possible to configure which file the output should go to?
If so, can you point me to a manual or give me an example?
Thank you very much for your help
Should be catalina.out
You can find more options in the answer below:
limiting java ssl debug logging

Matlab R2012B How to disable Java virtual machine? [duplicate]

This question already has an answer here:
How can I disable the JVM on a Windows platform for running background matlab scripts
(1 answer)
Closed 7 years ago.
I need to disable JVM in Matlab R2012B to free memory.I tried the command "-nojvm" at the end of the launch string but it doesn't work...
samobody can help me?
Thanks...
You need to use -nojvm, not -nojmv.

How to find disk space of remote linux machine using Java [duplicate]

This question already has answers here:
How to find how much disk space is left using Java?
(4 answers)
Closed 8 years ago.
I am looking for simple solution for finding total disk space and available space of a remove machine using java program.
Please help
Update
There are questions already similar to this with primarily focus on local machine. I was looking solution for remote machine.
The easiest way to get the remote machine information and also safe way to do
is to SSH to the server from Java and get the necessary information from.
use JSch Library for SSH connection to server.
for an example look here

Eject USB drive from Java [duplicate]

This question already has answers here:
How Do I Eject a Volume in Java?
(2 answers)
Closed 3 years ago.
I know that questions like this have been asked before, but I couldn't find any more recent ones and I have a twist to my question.
I've developed an application in Java that is designed to run on removable media, and work on both Windows and Mac. I would like to add a button to safely remove/eject the device, if it is supported (i.e a USB drive). Is there a command line for each operating system that would allow me to do this?
I know that it can be done by an application running on the device to be ejected, because I've seen one that does it, but obviously I understand there are certain limitations to Java.
Thanks in advance
This is something that you will have to do by invoking an auxiliary application. These applications are not platform independent as you wish. So, to do that, find out which OS you are on by using System.getProperty("os.name") and invoke the appropriate command for the detected OS. Invoking applications is done with Runtime.getRuntime().exec(). Search for the commands you need for each OS.

Is there a Java/PHP bridge? [duplicate]

This question already has answers here:
How do I add a Java backend to an existing PHP site without adding a tomcat server for Java Bridge?
(4 answers)
Closed 9 years ago.
I have created a program but i need to get a java program to run a php script with some arguments and then get the php script to send some arguments to the Java program. I know this question has been asked a lot of times but it seems like the only answer i can get is that php can do this but java cant but there must be a way to do it. Right?
You can run PHP from the command line:
http://php.net/manual/en/features.commandline.php
This should enable your Java application to run it, and capture it's return values.

Categories

Resources