2,443 Posted Topics

Member Avatar for musthafa.aj

[QUOTE=musthafa.aj;1079622]Hi! i creating java apps to edit windows registry .... it is fine in Xp but in Vista its need admin privileges.. how do get it programmatic-ally... [/quote] You don't. You'd have to execute under a different user, of course. [quote] in .net app.manifest is there..but in java anything is …

Member Avatar for masijade
0
92
Member Avatar for VinceAshbySmith

read it and as you read it write it out to another file, but don't write the last line.

Member Avatar for masijade
0
3K
Member Avatar for onsir

Try "outer" joins [code]select i.code,s.date_sale from Item i, Sale s where i.code = s.code (+) and s.date_sale <='2009-01-31' (+)[/code] Edit: Although I don't know HQL, at all, I am assuming it is one of the in Java written DBs and so should still understand basic SQL. I'll probably look into …

Member Avatar for masijade
0
86
Member Avatar for ravikiran032

Okay, I know NeilCoffey explained it [i]long[/i] before, somewhat, but I, now, will still give a full explanation. It has to do with "literal" data. I.E. data that you type directly into code. Boolean data is just that, the boolean [code]true false[/code] Strings are surrounded by quotes [code]"string"[/code] If you …

Member Avatar for masijade
0
2K
Member Avatar for RichardCrickets

It has found the node, but the word itself, i.e. Apple is a child node of the "word" node, a TextNode type.

Member Avatar for RichardCrickets
0
106
Member Avatar for Merosansar

So write one. If you need help getting it right post your code (and nay and all errors) here and we will help you correct it.

Member Avatar for masijade
0
60
Member Avatar for girl.java
Member Avatar for jotha buddhi

[url=http://www.lmgtfy.com/?q=Java+Custom+Look+And+Feel]Here[/url] Edit: P.S. Attempting to crete your own look and feel [i]far[/i] from a "simple" task. It tasks even the best of Java Programmers (to get it right, anyway).

Member Avatar for peter_budo
0
110
Member Avatar for CuteCat
Member Avatar for jbennet
0
93
Member Avatar for Narvind Pise
Member Avatar for HazardTW
Member Avatar for dahliababy
Member Avatar for Fenerbahce

Are you trying to say "not less than", if so why don't you just say "greater than"? [code] > // instead of <! [/code] Edit: Nevermind, I'm an idiot, they're Strings so greater than and less than are not what you want anyway. Doh!

Member Avatar for masijade
0
249
Member Avatar for rimorin

How are you determining that it "doesn't recognise \n"? If you are "checking" the file with Notepad, it is that notepad "doesn't recognise \n", try checking with wordpad (assuming you're on windows, and on MAC the "newline" character is "\r" on Windows it is "\r\n"). You shouldn't be using "\n" …

Member Avatar for rimorin
0
114
Member Avatar for Hanyouslayer

Rather than Scanner use a BufferedReader, its readLine method, and String's split method.

Member Avatar for Hanyouslayer
0
317
Member Avatar for topest1

Showing your code [i]might[/i] help. Mainly for the overridden JPanel (which I do not know why you are doing that if you are simply adding elements to it), and for the "text change" on the button. Better would be if you took the time write a very small, compilable, and …

Member Avatar for topest1
0
604
Member Avatar for may781

As he has been told here ( [url]http://www.java-forums.org/new-java/23657-command-line-arguments-help.html[/url] ) already.

Member Avatar for javaAddict
0
106
Member Avatar for Solani

Because the only print statement you have there refers to one specific element (and actually it doesn't refere to any of them since index is undefined there). You, of course, need to create another for loop in that case section just like under the case section 1.

Member Avatar for masijade
0
117
Member Avatar for farag
Member Avatar for Spirate

What does "User" constructor do? (IOW It's code, please.) As I find it very hard to believe that that line will throw an NPE, unless the constructor is catching one then rethrowing it, maybe, and then it should be the "throw" line in the constructor that is listed rather than …

Member Avatar for masijade
0
164
Member Avatar for MxDev

The "thread" is the right idea, but probably done wrong. It [i]might[/i] help to see the code. However, recreate the code in a small GUI that contains nothing but the textarea and the "loop" (and any extraneous items "in between" that actually contribute) that displays the problem you're seeing.

Member Avatar for masijade
0
91
Member Avatar for adams161

One thing that might cause "strange effects" is the way that public static final (or protected/default static final for sub/package classes) are handled. Those values compiled directly into the class using them, so a change to one of those without recompiling the classes that use them will cause a "disconnect". …

Member Avatar for masijade
0
108
Member Avatar for JavaOwnsMe

IOW we should do your work for you? Why don't we start out this way, you write out, here, what you have and we will help you refine it. How about that?

Member Avatar for BestJewSinceJC
0
160
Member Avatar for kool005

Use LinkedList (see the API docs), or create a Custom Object that contains reference to the previous and next "edge" as instance variables as well as defining the current "edge" itself.

Member Avatar for mellowmike
0
145
Member Avatar for ramjeev

That is the instance that all threads must obtain a lock on in order to access the block.

Member Avatar for ramjeev
0
115
Member Avatar for musthafa.aj

:sigh: Is this suppossed to be some kind of crack program? In any case, there is no blanket answer to that anyway. It depends. If it is a firewall on the machine, then it depends on the software. Are there CLI command that you can use? Then ProcessBuilder/Runtime.exec(). Is there …

Member Avatar for musthafa.aj
0
235
Member Avatar for gitech

They both work. Depends on how granular you want the syncronisation to be.

Member Avatar for masijade
0
64
Member Avatar for kool005

The first index of an array is 0, which means the last index of an array is one [i]less[/i] than its length. So, knowing that, take a look at the condition in your for loop and see if can find and fix the problem.

Member Avatar for masijade
0
1K
Member Avatar for f3rrari

The exception tells you exactly [i]where[/i] the error occured. Somewhere directly before that point you have forgotten a ; or a closing } or are performing an action that must be contained within a method or constructor.

Member Avatar for masijade
0
100
Member Avatar for ceileyg

For number 7, add a toString() method. In the equals method you should probably check that the parameter is not null. You may also think about properly overriding Object's equals method and just use that. The other part of number 9 is to implement Comparable. For number ten override the …

Member Avatar for masijade
0
5K
Member Avatar for donths

Do you want to "set the element to 0" or do you want to remove it. The sample code will actually remove it. If all you want to do is set it to 0, then there is no reason to "record" the index when you find it, simply set it …

Member Avatar for donths
0
105
Member Avatar for kpcorp

And what, exactly, is the problem? You might want to try using trim on the first nextLine call to remove extraneous whitespace (to include any possible newline, but I believe the nextLine call strips that, check the API docs about that though, as I am, currently, too lazy to do …

Member Avatar for Ezzaral
0
102
Member Avatar for ramjeev
Member Avatar for ramjeev
0
152
Member Avatar for leoeroy

[QUOTE=leoeroy;1062302]Im not printing out the array. The purpose of this program is creating an array of objects. the result of this program should be a box filled with green color.[/QUOTE] Then you need to [i]show[/i] that somehow. So, your question is no longer how to create a 2d array, but …

Member Avatar for leoeroy
0
648
Member Avatar for TheDLSyrnyk

[QUOTE=TheDLSyrnyk;1063362]I was just wondering if someone can provide an algorithm to the following question.[/QUOTE] Yes, I am quite sure someone can. Unfortunately for you, though, that's your job in this case.

Member Avatar for javaAddict
0
134
Member Avatar for rajeshmoyra

Return a javascript onload that erases the history, or something to that effect. Another thing that you can do, is to set all pages as no-cache and a very short expires. This would force the page to be reloaded (or at least ask the user if they wish to repost …

Member Avatar for masijade
0
130
Member Avatar for P00dle

[url]http://java.sun.com/docs/books/tutorial/ui/features/components.html[/url] which is part of [url]http://java.sun.com/docs/books/tutorial/ui/index.html[/url] and don't forget [url]http://java.sun.com/docs/books/tutorial/uiswing/events/index.html[/url]

Member Avatar for jbennet
0
379
Member Avatar for Stefano Mtangoo

[url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] [url]http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html[/url] [url]http://java.sun.com/docs/books/tutorial/ui/features/components.html[/url]

Member Avatar for masijade
0
123
Member Avatar for Neela.V
Member Avatar for masijade
0
139
Member Avatar for Kreators

[QUOTE=Kreators;1062342]Hi i'm new here in daniweb i would like to ask about my program i'll make a program that show if the word is palindrome or not can you correct my program when i complie my program its say Process complete then when i run the program it doesn't show …

Member Avatar for P00dle
0
94
Member Avatar for rukshilag

For the first item Google "Java Installer Builder" (Hint install4j). For the second item [url]http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html[/url]

Member Avatar for masijade
0
107
Member Avatar for ki72

Well, let us see what you've tried. We are more than happy to help you complete it, and "get it right" but, nobody here is simply going to do it for you.

Member Avatar for masijade
0
111
Member Avatar for naziatarannum

If this is that "download count" problem, then you are going about it completely the wrong way. If it is "good enough" to get the count the next day, then simply parse the servers access log. If you need it "real time", then don't give direct access to the file, …

Member Avatar for peter_budo
-1
106
Member Avatar for nlanka
Member Avatar for Pranesh_Ashrit

Well, of course you're "not getting the exact reason for this" when you ignore all errors. Add a printStackTrace to each of those catch blocks.

Member Avatar for masijade
-1
85
Member Avatar for doobiez

Exctly as it says. Compare line 75 with line 54. What's missing at the front of the line 75 statement?

Member Avatar for masijade
0
151
Member Avatar for Stefano Mtangoo

It [i]might[/i] help to know what these nebulous "errors" are. [i]complete[/i] error message with stack traces (where applicable), please.

Member Avatar for Stefano Mtangoo
-1
327
Member Avatar for timaquerra

Provide the full stack trace please. That message doesn't help at all, and it doesn't even seem to be produced by this piece of code.

Member Avatar for ~s.o.s~
0
198
Member Avatar for vandhana v

With the API docs for Image? With the Swing Tutorials? With the Threading Tutorial? With the "Getting Started" Tutorial?

Member Avatar for masijade
-1
32
Member Avatar for girl.java

Because 2 and 3 are Integers, so pure Integer math is performed. Use a literal double (i.e. 2.0 instead of 2) or cast at least one of them to a double [code]double a = (double) 2 / 3; // or double b = 2 / (double) 3; // or double …

Member Avatar for donaldw
0
120

The End.