|
I don't think you searched very far, a simple Google search for "jar command" led to this[^].
The best things in life are not things.
|
|
|
|
|
I ned a command to use in code, not command line
|
|
|
|
|
See the third link here[^]; it was really not too difficult to find.
The best things in life are not things.
|
|
|
|
|
Doesn't that article only have info about console commands? I need a source code sequence that extracts the jar
|
|
|
|
|
Did you bother to read the link[^] I pointed you to? It contains all the details you need. Or are you waiting for someone else to write the code for you?
The best things in life are not things.
|
|
|
|
|
Ah, the third link for me was something else. Thanks!
|
|
|
|
|
Hi,everyone:
I'm a new developer with java.I want some projects for ssh+extjs. Before,I used ssh to build B/S programs.But, I'm not use extjs in programs once. I hope someone can help me. Thanks.
|
|
|
|
|
FariyEye wrote: B/S programs
Yeah, I've built a few of those in my time too...
Can you be a bit more explicit about what you mean when you say that you want to use ExtJS in a Java program? ExtJS is a javascript library for front-end browser development. Do you mean that you are writing a web app and want to know how to use ExtJS with JSPs, servlets, JSF, whatever?
|
|
|
|
|
Hi,
I have taken over a J2EE application and there are a lot of files that I don't believe are being used (some I know aren't). I don't normally do much Java or J2EE development so I'm wondering if anyone can let me know if there is something out there that can tell me what files aren't being used by the application. I'm using Eclipse Helios as my IDE.
For example, in Visual Studio apparently you can do the following:
In the Solution Explorer you can select the project node and click on the Show All Files button.
You will then see files and folders not referenced by the project as grayed out.
Taken from http://stackoverflow.com/questions/5889082/find-files-not-referenced-by-project-vs-2010[^]
Is there something similar in Eclipse and I just haven't found it yet?
"The computer industry is the only industry that is more fashion-driven than women's fashion. Maybe I'm an idiot, but I have no idea what anyone is talking about. What is it? It's complete gibberish. It's insane. When is this idiocy going to stop?" -- Oracle CEO Larry Ellison
|
|
|
|
|
In your IDE go to:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> unnecessary code
You'll find quite some options there. The Reult can be seen in the Problems-View (Windows -> Views).
regards
Torsten
I never finish anyth...
|
|
|
|
|
I'm not quite sure that's what the OP wants. Things that are accessible where you mentioned like unused imports are (or can be) highlighted in the IDE (and the common ones are highlighted by default). I think what he's looking for is unused references to other packages/projects on the build path and so on. Maybe OP can clarify what he's after. If it's what I think it is, I don't know of any way other than foreach (package_reference in project) {remove_package; rebuild; check_for_errors} which is a bit painful, and probably why he asked.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
It may not be that straight-forward if your project is using reflection. Suppose you do something like:
Class myClass = Class.forName("com.mycompany.stuff.MyThing");
If you remove the com.mycompany.stuff package from the project, this will still compile with no errors. But when it runs it will collapse in a smoking heap. (If you are using JUnit properly, that should catch it but even so, it's not a real solution.)
This could be a problem if you are using Spring, for example, which uses reflection to instantiate beans.
Or there may be files that need to be in your project (e.g. log4j.properties) that are not referenced directly by your own code, but are required for some third party library you are using. Yes, you can set up the log4j.properties file (or log4j.xml if you prefer) at deployment time but most projects I've seen include it in the build for convenience. Hibernate config files are another example that springs to mind.
I'm not sure that Java has the same concept of "referenced files" that .NET does. An awful lot is just picked up off the classpath at runtime. That makes it quite a bit harder to figure out which files are really "unreferenced".
|
|
|
|
|
You're right, of course. Once reflection rears its ugly (but occasionally beautiful ) head all bets are off, at least in terms of knowing where your code came from.
I don't think that things picked up from the classpath are a big issue here (but of course one'll pop up to make a liar of me!)
Have a 5!
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
What Torsten mentioned should be good enough to get me through most of the ejb stuff, I think. Maybe once I'm a little more comfortable with the app (and J2EE in general) I might go a little deeper into cleaning that part up the way you mentioned Peter. I appreciate it though.
My other problem is in the web section of the J2EE app, let me know if this is veering towards another forum now.
There are a lot of complete files that are not used at all(jsp, js, css, html, xml, etc.) by my application. Many of them are from third party things added in (grid controls, calendar controls, etc), you know there are documentation folders, example folders and then just files that are for different skins and who knows what else. There are also multiple jsp pages that I believe have been replaced by other jsp pages, but the originals haven't been removed. I want to make sure I don't mistakenly remove a needed one though.
I'll apologize now because I've tried looking around and am just not familiar enough with J2EE and Eclipse to know if there is a simple solution for this. Thanks.
"The computer industry is the only industry that is more fashion-driven than women's fashion. Maybe I'm an idiot, but I have no idea what anyone is talking about. What is it? It's complete gibberish. It's insane. When is this idiocy going to stop?" -- Oracle CEO Larry Ellison
|
|
|
|
|
My best wishes go with you. This looks like another example of
inherited project == can of worms and we all know that once you open a can of worms, you're going to need a larger can...
Did a quick google for the quote, but couldn't find it.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
That is part of what I'm after. Thank you for that!
"The computer industry is the only industry that is more fashion-driven than women's fashion. Maybe I'm an idiot, but I have no idea what anyone is talking about. What is it? It's complete gibberish. It's insane. When is this idiocy going to stop?" -- Oracle CEO Larry Ellison
|
|
|
|
|
I need to include the web cam image in gui through applet.I finished capture the image in applet.It works perfectly.But when I include the applet into the gui,applet is crashed.
The crash report file is appeared.The error is java.lang.securityException.Please help me.
|
|
|
|
|
1. Go and look at Google for possible causes of SecurityException[^].
2. Look at your code and check what you are doing when the exception occurs.
3. If you are not catch ing the exception then do so.
The best things in life are not things.
|
|
|
|
|
public static void IzbrisZivali(ArrayList<Zivali>Seznam) throws ConcurrentModificationException
, IOException
{
BufferedReader vhod=new BufferedReader(new InputStreamReader(System.in)) ;
{
System.out.println("Vnesi točno ime živali, ki bi jo radi izbrisali: ");
String IzbrisZivali=vhod.readLine();
int v=0;
for(Zivali Element: Seznam)
if(IzbrisZivali.equals(Element.getIme()))
{
Seznam.remove(Element);
System.out.println("Žival " + IzbrisZivali + " je bila izbrisana");
v++;
}
if(v==0)
{
System.out.println();
System.out.println("Na seznamu ni živali z imenom " + IzbrisZivali);
System.out.println();
}
}
}
How can i fix that? What should be changed. Please solve me this problem as im sitting here and staring at my computer for 2 hours! Please!
The problem is ConcurrentModificationException
Regards,
Matjaž
|
|
|
|
|
You can't iterate this way over your list (Seznam) while removing elements at the same time. Instead you should you use an iterator and call remove on the iterator:
Iterator iter = Seznam.iterator();
while (Seznam.hasNext()) {
Zivali element = iter.next();
...
...
if (.....) {
iter.remove();
}
}
BTW: this is a forum not a chat, so you can't request "URGENT HELP!". Your question is not more urgent than other questions. If it is really urgent, then you should pay somebody to fix the problem for you. And please, use a better title next time you ask a question, everybody knows that if you ask a question, you want some help... Please, read the posting guidelines at the top of this message board.
|
|
|
|
|
This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible. For example, it is not generally permissible for one thread to modify a Collection while another thread is iterating over it.
That's what the documentation says. You might figure out what happens when you make your function non-static. And please debug your code.
- do not name variables with capital letter ("Element") That's really dangerous and can have side effects as Object names are started with a capital letter (e.g."System", "BufferedReader").
- always use English comments.
regards
Torsten
I never finish anyth...
|
|
|
|
|
I want to identify an image in an application window.
To be more specific, I want to know how i can identify if the image exists
and if it is at the right location in the window.
|
|
|
|
|
Where "identify" means what exactly?
If you mean you want to figure out that a picture, for example, has a dog in it then you need to research pattern matching algorithms (or maybe "image pattern" but something like that.)
The algorithms are independent of language.
|
|
|
|
|
I have PictureDrawable that I wish to save as an image (JPEG/PNG) but I can't seem to find any information how to go about this.
I tried this but it does not seem to work
PictureDrawable myDrawable = GetPictureDrawable();
Bitmap bitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
myDrawable.draw(new Canvas(bitmap));
bitmap.compress(CompressFormat.JPEG, 100, new FileOutputStream("/MyLocation/MyImage.jpg"));
What am I doing wrongly?
www.belfox.net
...Simplicity at its best
|
|
|
|
|