Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious.
Please help :/
In Java you can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
Cheers!
I am trying to use groovy to do shell scripting on unix, but I am not having any luck having one process retain the environment variables changed by another process. For example,
def p1 = ["bash", "-c", "source /some/setEnv.sh"].execute()
Now, I would like a second process, p2, to inherit the environment variables that was set in p1. How can I do this? I don't see anything in java.lang.Process or its groovy extension that would spit out the environment variables after the process has executed.
Hi all,
Does anyone know whether there is a java library for parsing a MySQL schema? In code I want to be able to determine the tables and fields specified in a schema. Or am I going to have to write my own?
Thanks Richard.
Hi,
Is there a way I can do a for loop for a certain amount of time easily? (without measuring the time ourselves using System.currentTimeMillis() ?)
I.e. I want to do something like this in Java:
int x = 0;
for( 2 minutes ) {
System.out.println(x++);
}
Thanks
Hi:
Is there a way in Java to do a Nslookup search on SRV records?
I need to bind to Active Directory and would like to use the SRV records to help determine which of the ADs in the cluster are live.
In command line the nslookup search string is: 'nslookup -type=srv _ ldap._tcp.ActiveDirectory domain name'
Thanks.
Anyone know a decent Java libarary for HTML elements?
Ex if I want to create an img-element, I would go new Image(...)
The object should support the normal HTML functions/attributes, such as setting CSS or disable.
I recently moved from NetBeans to Eclipse and I very much miss one great feature - whenever I use method which throws some kind of exception, NetBeans alerted me and I needed to add try-catch and NetBeans automatically generated exception type for me. Is there something similiar for Eclipse?
f.e. : Integer.parseInt(new String("foo"));
NetBeans alerts I need to catch NumberFormatException.
Eclipse doesn't alert me at all
I am using Eclipse Java EE IDE for Web Developers, 3.5 - Galileo
I'd like to have some kind of file browser like Windows Explorer inside a Java Application.
I just want something that's able to list file inside a folder recursively.
Is there a simple way to do this ?
I already tried to use JFileChooser but it's not what I want.
I have done everything I know. The file is not a ".filetype.filetype". It is in the same folder as the .settings and the other project files. Why is this not working? Full path isn't working either, but strangely, a Scanner is working.
import java.io.FileReader;
public class test {
public static void main(String[] args) {
FileReader testFileReader = new FileReader("hotels.json");
}
}
i am wondering regarding Java: is there a file extension separator?
like *.doc, the "." being the question.
i know there is a line.separator. just would like my app to be portable so i need to know.
thank you.
Hi,
Please point me some real time examples scenarios for each java collection classes.
For example to store file system in a hard disk ,our best option is TreeMap.I need example for other classes.
Thx
Hi all,
just wondering if there is a simple way in java to display the contents of say 16x16 array of doubles [0..1] as a greyscale image (ala matlab)? using an unfamiliar matrix library, so I'd like to check that I'm on the right track. don't really care if it is slow or ugly, or if it requires external library - it's just there for a quick look, so as long as it works, I'm fine.
Hey,
Can someone suggest me how to implement a pop-up window in Java Swing. I want the pop-up window to be a modal window (user cannot return to the main window when the pop-up is open).
I tried doing it using JDialog but it allows only one widget for user input to be in it whereas I need multiple widgets. I may be wrong here but this is what I was able to do.
Appreciate your help.
In Java, what's generally the most accepted way to organize a class in terms of the order in which declared data members and methods should be listed in the class file, keeping in mind the following and anything else you can think of for each one:
its visibility
whether it's a constructor, method, or member
if it's a method, does it overload, or override other method(s)?
Is there any way to have a code where it can be used to open PDF file in Java application but do not side to any platform. I mean using batch file in Windows could do that. Can it be any other way to have platform independent code to open PDF on fly.
We are using "Bottom Up" approach for building webservices.
We have 10 java classes which we want to expose as a webservice.
How can we create only one WSDL file for these classes?
(java2wsdl utility & its ANT TASK takes only one class as parameter for generating WSDL file.)
I was just wondering how most people fetch a mime type from a file in Java? So far I've tried two utils: JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams off properly. I was just wondering if anyone else had a method/library that they used and worked correctly?
What value is hashCode() method is returning in java?. i read that it is an memory reference of an object. when i print hascode value for new Integer(1), its 1. for String(a) - 97. so i confused. is it ascii or what type of value is?
I am planning to write a Java applet for Tower of Hanoi similar to link(
http://www.mazeworks.com/hanoi/index.htm )
Can you suggest how should I start and proceed.
And, btw, does it require multi threading?
And also, major part of my doubt is
to make a disc being clickable and being able to drag and drop the disc on a tower.
detect a tower (if a disc is being dragged using mouse)
Hi all, I would like to know simple k-means algorithm in java. I want to use k-means only for grouping one dimensional array not multi.
For example,
before grouping the array consists of 2,4,7,5,12,34,18,25
if we want four group then we got
group 1: 2,4,5
group 2: 7,12
group 3: 18,25
group 4: 34
What are the Java language and standard library design flaws you are aware of? I ask only for flaws that:
cannot be changed or are unlikely to change due to backward compatibility,
are NOT controversial, i.e. most of programmers would agree that "this is a bug not a feature" (for example checked exceptions seem to be controversial language feature, so I wouldn't classify them as "design flaw").
I want from my java code to open word document. But not just to open the document but also to open on exact page or paragraph.
Any ideas or guidelines?
Thanks in advance!