I am using Linux Mint Cinnamon 14. I have set the $JAVA_HOME and $PATH environment variables in ~/.profile as follows: I then did source ~/.profile to make the proper changes. When I execute java -version command to check the active java version, it shows the default (already installed open-jdk) java version. How can I override the default open-jdk with the
Tag: java
ant: warning: unmappable character for encoding UTF8
I have seen numerous of questions like mine but they don’t answer my question because I’m using ant and I’m not using eclipse. I run this code: ant clean dist and it tells me numerous times that warning: unmappable character for encoding UTF8. I see on the Java command that there is a -encoding option, but that doesn’t help me
Can i store unix permissions in a zip file (built with apache ant)?
I’m building a linux installer for a Java application, and I end up with an install.jar and a setup.sh that I put in a zip file using ant. The idea is the user unzips the zip file and then runs setup.sh but the trouble is that they always need to chmod setup.sh first to give themselves execute permissions. I want
opening a shell and interacting with its I/O in java
I am trying to open a shell (xterm) and interact with it (write commands and read the shell’s output) Here is a sample of code which won’t work: When I execute this program an “xterm” window opens and the “ls” command is not entered. Only when I close the window I get a “-1” printed and nothing is read from
Change file owner group under Linux with java.nio.Files
I have a Linux server and I’m running an image resize job in Java for multiple websites on my server. The website files are owned by different OS users/groups. Newly created thumbnails/previews are owned by the user running the resize job. Now I was googleing around how to change the file owner of newly created previews/thumbnails in my resize program
Teradata and JDBC driver – classnotfoundexception …but its there?
Trying to work with a JDBC connection to Teradata. I’ve loaded the tdgssconfig.jar and terajdbc4.jar file and adding them to the classpath with javac when I compile in Linux. But I still get a ClassnotFoundException when trying to compile. I’ve not worked with java in a while, but I’ve scoured the net and it looks like it should work. Simple
java application and x11 forwarding
I need to start jperf on virtual server. I configured X11 forwarding via ssh. xclock – is working. But if I start jperf I get: user@client-32:~/sandbox/jperf-2.0.2$ sh jperf.sh Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77) at net.nlanr.jperf.JPerf.(Unknown Source) java version: java version “1.7.0_03” OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3) OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
CommPortIdentifier.getPortIdentifiers with zero ports on Linux
i am trying to connect serial port on ubuntu. However, It doesn’t work for me. I succesfully run the same project on Windows just with different drivers. The problem is that I can’t load any ports while I am using this: CommPortIdentifier.getPortIdentifiers(); // i am using rxtx 2.1.7 It always return zero ports. I would like to use port ttyS0
handling vps numproc limits
this is my vps package £14.99 uk pounds a month, so not to expensive. Thay are limiting numproc to 96, they didn’t make it obvious that this was a limit when I signed up, but I suppose it is my fault for not asking. I am running Tomcat and if I run out of numproc then Java will crash and
In Java is there any way to share memory location to exchange some real-time small packets?
Is there any better/smarter way to put and get a boolean value from memory system, but not using any TCP/UDP nor local file system method? Where Backend does memory allocation, and Frontend reads it on the fly, none of them will be able to use TCP/UDP nor File system. Answer AFAIK, The only way to use shared memory in pure