Hi,
Please let me know open source product similar to rational software architect which automatically generates java base classes on completion of design. Thanks in advance.
Suppose that I have a legacy java application with thousands of lines of code which do:
try {
// stuff
} catch (Exception e) {
// eat the exception
}
Is there any global option that I could flip or 3rd party JAR which would log all "eaten" exceptions? I know that I could do a massive find replace (search for catch (Exception e) { and replace it with catch(Exception e) { logException(e);) but I was wondering if there was a better solution. Thanks!
Hi all,
I've a problem: my application must convert ms word documents (imported from another system) into rtf documents, in order to be manipulated with OOo APIs and to be immune from mistakes (for coding incompatibility reasons).
I ask you: how can I manipulate ms word documents directly from my Java application? There are APIs (like POI or OOo) that allow me to do my work without any coding incompatibility?
Thanks in advance. Best regards,
-Paolo
hi,
i am working with Jaxb. and i would like to generate javaDoc files from these classes, is it the same way as i would do it to a regular java files?
Hi all
I've simply used the following program on the url below
http://jericho.htmlparser.net/samples/console/src/ExtractText.java
My goal is to be able to extract the main body text, to be able to summarize it and present the summarized text as output to the user.
My problem is that, I'm not sure how I'd modify the above program to only get the required text from the webpage, without the links or any other information.
Again, I'd really appreciate any help I could get.
Thanks in advance
I'm trying to use the following import in Eclipse running on Mac OS X 10.6:
import javax.media.jai.JAI;
Unfortunately, this doesn't work, instead I get the following message:
"Access restriction: The type JAI is not accessible due to restriction on required library /System/Library/Java/Extensions/jai_core.jar"
How can this be resolved? I want to use JAI.create("fileload", "filename");
Yesterday I asked this question: Is this possible to make as an option dialog?
and I learned it could be made with JDialog. I'm using Netbeans GUI editor and made a button that will call my custom JDialog I designed in the GUI editor. The JDialog is called jDialog1. How do I call the jDialog1 with the button?
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
When doing null checks in Java code, and you throw IllegalArgumentExceptions for null values, what kind of message template do you use?
We tend to use something like this
public User getUser(String username){
if (username == null){
throw new IllegalArgumentException("username is null");
}
// ...
}
What is better : "is null" or "was null", and why?
For me "is null" feels more natural.
HI All I am at the end of the release of my project.So in order to keep working our manger asked us to generate Class Diagrams for the code we had written.Its medium project with 3500 java files .So I think we need to generate class diagrams.First I need to know how reverse engineering works here. Also I looked for some tools in Google(Green, Violet) but not sure
whether they are of any help.Please suggest me how to proceed.Also a good beginning tutorial is appreciated.
Exception in thread "Thread-2"
java.lang.NumberFormatException: For
input string: "3"
int test = Integer.parseInt(result[0]);
This is the error I keep getting when I'm trying to convert "3" to an integer. Well I'm receiving this "3" through a RS-232 port, so maybe this is what is causing the error.
If anybody has any idea what could be causing this it would be appreciated.
Hello,
I need to write a java JCE provider. I have been looking in the net for several days and I could not find solution. Could you please give me some useful informaion.
Regards,
i want to build a filter to block pornography sites so i have some questions :
what tools i need ?
what are the algorithms i have to use ? (speed , efficient )
where i can find an open source filter ?
and i want to use java .
thanks
I've just started using the PythonInterpreter from within my Java classes, and it works great! However, if I try to include python modules (re, HTMLParser, etc.), I'm receiving the following exception (for re):
Exception in thread "main" Traceback (innermost last):
File "", line 1, in ?
ImportError: no module named re
How could I make the classes from the jython jar "see" the modules python has available?
I know you don't like helping others in their homework but I have to make an XText grammar, write a sample code that matches this grammar and compile it to a html file.
The lecturer showed us the steps and everything worked for him... He said "It's so simple it will be a 10 minute work for you". And I believed that. However at home almost nothing works as expected. And of course no more lectures to go only the exam avaits me where I have to show what I done to pass. Moreover the e-mail I sent him bounced back by the mailer-demon...
I got Xtext along with Eclipse IDE from the xtext website and I unpacked it and I followed the steps in the official tuturial to get the default project template to work. The tutorial is found here: http://wiki.eclipse.org/Xtext/GettingStarted
Now I'm at the step "Model". It says open the "MyModel.mydsl" I do that but the editor does not opened. It said:
"Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml."
Since everything is generated, the error message does not helped me...
There was an option to look at the stack trace (it was mile long) and on the top of it there was an exception:
java.lang.IllegalStateException: The bundle has not yet been activated. Make sure the Manifest.MF contains 'Bundle-ActivationPolicy: lazy'.
I opened Manifast.MF and Bundle-ActivationPolicy: lazy was set...
I googled for the solution but no avail. It drove me nuts and I gave up.
I have no experience with Eclipse and Java and XText, I just want to do my homework and forget everything until I will need it again...
Anyone have experience with XText?
Any help appreciated.
ps: I will be on it too and I might resolve the problem in several hours. But now I am at a loss.
Hi, there. I'm interesting in best practices of using LDAP authentication in java-based web application. In my app I don't want to store username\password, only some id. But, I want retrieve addition information (Name, Last name) if any exists on LDAP catalog.
i am currently working on a web application that needs to accept video uploaded by users in any format (.avi, .mov, etc.) and convert them to flv for playing in a flash-based player.
Since the site is OpenCms-based, the best solution would be a ready-made plugin for OpenCms that allowed to upload and play videos doing the transcode operation in background, but just a set of Java classes to do the transcode would be great and then i could make the uploading form and playback part on my own.
Hello,
Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you
I am unable to compile a Java program because the compiler cannot find some of the packages needed even though they are in both the build classpath and runtime classpath. Other packages it can find just fine.
The image below shows the problem. I have highlighted the gdata-media package in eclipse, as its the first package on the console that its not able to find:
Click for full size
What am I doing wrong?
I am trying to create and use jar file in an Android project under Eclipse. I have tried various methods without any success. Here are the steps:
Create jar file from the source files jar -cf lib.jar *.java
Copy jar file to libs folder
Right click, Build Path-Add to Build path
Now, compiler gives unresolved symbols if I try to use a class from the jar file?
Can someone please let me know correct method to create and use an external jar file for the Android project under eclipse.
I'm trying to learn Spring Batch, but the startup guide is very confusing. Comments like
You can get a pretty good idea about
how to set up a job by examining the
unit tests in the
org.springframework.batch.sample
package (in src/main/java) and the
configuration in
src/main/resources/jobs.
aren't exactly helpful.
Also I find the Sample project very complicated (17 non-empty Namespaces with 109 classes)! Is there a simpler place to get started with Spring Batch?
there is a way to Dispatch MouseEvent ,
same as dispatchKeyEvent using the
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(listener);
that happens before the event transferred to the component ?
i know i have 2 options
1) add mouse event to all compoenents recursive
2) use a transparent glasspane
dose java support this , or i have to use the one of the options above
thank you
I want to return false if the URL takes more then 5 seconds to connect - how is this possible using java? Here is the code I am using to check if the URL is valid
HttpURLConnection.setFollowRedirects(false);
HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();
con.setRequestMethod("HEAD");
return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
I'm searching for open source libs for Streaming videos from mobile phones (from cameras on mobile phones) to servers.
JAVA or C/C++
any one knows any?
does anyone tried doing cache for spring-ntlm NtlmProcessingFilter.java file so that every request no need to query from microsoft active directory to authenticate user ? how to implement such cache using ehcache