Hi, I am having a class A which gets a configuration file doing:
this.getClass().getResource("cfgFile");
Now I created a new class B who needs A's cfgFile. Right now I am doing:
A.class.getResource("cfgFile");
But it doesn't feel right.
I was willing to create a new class, something like ABCfg and adding the cfgFile to it's resour...
Is there some clean static method to just dump (append) a string to a file?
...
In Goetz's "Java Concurrency in Practice", in a footnote on page 101, he writes "For computational problems like this that do not I/O and access no shared data, Ncpu or Ncpu+1 threads yield optimal throughput; more threads do not help, and may in fact degrade performance..."
My question is, when performing I/O operations such as file wr...
Why can't I do:
Enumeration e = ...
for (Object o : e)
...
...
Hi
I have two years of dotnet development experience . I am trying to move into SAP. Whats the best to opt for in Netweaver i.e Java or ABAP or there are any opportunities for this on dotnet platform. Which should be most promising for future. Googling I came to know Java is giving a backseat to ABAP.
Do comment.
Regards
SJ
...
Is there a way to display a Flash or Adobe Reader ActiveX control in a Java AWT frame?
I'm porting a large old J++ application to standard Java and it needs to host a certain ActiveX control on an AWT frame.
Is this possible?
I looked at the JACOB (Java to COM Bridge) project and it doesn't appear to support ActiveX objects that draw...
I am configuring my J2ME app to get an event from the push registry on receipt of an SMS.
Would I be able to access the SMS message, before it reaches the inbox?
I have read that messages sent to port0 of the mobile go directly to native inbox and we can't access it. Is there any way of diverting or even sniffing these messages so as ...
I'm creating a JavaHelp for our project and I'm having some issues. JavaHelp uses the following files as a convention :
helpset file: MyHelpSet.hs
index file: index.xml
TOC file (table of contents) : TOC.xml
I've been searching around for tools that help generate these files for you through a wizard, but I don't know what is good ...
I've only seen limewire though screenshots, and i feel atracted to its GUI's look.
What "API" does it use? It's clearly NOT swing, awt, or any other common API.
BTW: that IS called an API, right? Or would it be library?
...
public void wahey(List<Object> list) {}
wahey(new LinkedList<Number>());
The call to the method will not type-check. I can't even cast the parameter as follows:
wahey((List<Object>) new LinkedList<Number>());
From my research, I have gathered that the reason for not allowing this is type-safety. If we were allowed to do the above, ...
I've been unsuccessfully trying to get a class from a .jar file. The .jar is located at C:\CTF.jar and contains a .class file CaptureTheFlagRules in a folder named CTF. The following code does not work:
try {
File jarFile = new File("C:\\CTF.jar");
URLClassLoader urlClassLoader = URLClassLoader.newInstance(new URL[]
{ j...
I want to see all the java packages. Where are the packages stored in my machine? Can anyone help. I did search in jdk folder and found awt.dll and all. But its only a few. Can i see all of them?
...
Hi all,
I would like to simplify my JSP's even further by transparently including them. For instance, this is the line I would like to remove:
<%@ include file="/jsp/common/include.jsp"%>
The include.jsp file basically declares all the tag libraries I am using. I am running this on WebSphere 6.0.2 I believe and have already tried t...
Can a J2ME app be triggered by a message from a remote web server. I want to perform a task at the client mobile phone as soon as the J2ME app running on it receives this message.
I have read of HTTP connection, however what I understand about it is a client based protocol and the server will only reply to client requests.
Any idea if ...
Hello,
Could anyone please tell me, what the meaning of the word "Deploy" and "Redeploy" in context of Tomcat in the following line:
ServletConfig parameters won't change
for as long as this servlet is
deployed an running. To change them,
you'll have to redeploy the servlet
Thanks very much in advance.
...
We have been using JFileChoosers with quaqua LAF on the mac but I need to migrate our file choosers to the native mac filechoosers (I know its going to ruin portability but this is what people want). There were to main file choosers I needed to port the openProjectFileChooser just needed to select a file to be opened and this was no pr...
If so, is there any limitation to this ability? Specifically, I need to target Mac OSX.
...
Hi.
I have a design and object structuring related question. Here is the problem statement:
I have a Robot object which is suppose to traverse the ground on its own. It would be provided movement instructions and it must parse accordingly. For example sample input would be:
a. RotateRight|Move|RotateLeft|Move|Move|Move
Where move is...
I want to write a simple web proxy, for exercise. Here's the code I have so far:
def g = new Proxy()
g.serverPort = 9000
println "starting"
g.eachClient { Socket client ->
println "got a client"
try {
client.withStreams { input,output ->
String text = input.text
println "received $text from clien...
I am new to Documentum, I have to upgrade one code from Documentum foundation class to Documentum Foundation Services. Can someone provide the pros and cons of each, and good source of information to get started with it.
btw, I am writing code in Java to get information from documentum.
...