| Username String suggestion |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- serialVersionUID.. ?Hello ,
I posted this message in the Eclpse group with no responses. I am using
Eclipse.
I resolved by defining this in my class:
static final long serialVersionUID = 0;
Now, all of a sudden, this is not working and getting error:
Syntax error on token "DETAIL_FOOTER", VariableDeclaratorId expected after
this token
Happens when I define this class var in applet or interface:
private DETAIL_FOOTER = "# detail footer";
I do not have a clue! Any one have any Ideas?
--
Thanks in Advance...
IchBin
_____________________________________________
'Black holes are where God divided by zero.'
-Steven Wright, comedian (1955- )
- 1
- Problem running the hello world servletI installed j2sdk1.4.2_12, and apache tomcat 4.1.34, on a windows XP
box. I set the following environment variables:
CATALINA_HOME C:\apache-tomcat-4.1.34
CLASSPATH C:/Program
Files/Java/jre1.5.0/lib/xt/QTJava.zip;C:/j2sdkee1.3.1/lib
J2EE_HOME C:/j2sdkee1.3.1
JAVA_HOME C:/j2sdk1.4.2_12
PATH C:\j2sdk1.4.2_12\bin\
I edited the web.xml in C:\apache-tomcat-4.1.34\conf and uncommented
the invoker servlet tag so that I can run servlets.
I can now access jsp and html pages with tomcat, but when I tried to
run HelloWorld Servlet, it gives the following error:
ava.util.MissingResourceException: Can't find bundle for base name
LocalStrings, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:838)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:807)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:578)
at HelloWorldExample.doGet(HelloWorldExample.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:417)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
What could be the problem?
- 1
- How to make sure stdout and stderr is caught from runtimeexecHi,
I have written a class that handles stdout and std err from a unix
command. How can I make sure that both threads have finished? Do I need
to synchronzie my StreamConverter?
cheers,
//mikael
> public class RuntimeExec {
>
> public RuntimeExec() {
> }
>
> /**
> * Executes a command
> * @param command
> * @return The result of the command
> * @throws IOException
> */
> public String exec(String command) throws IOException {
> int exitValue = 0;//0 - executed ok.
> String stdOut = null;
> String stdErr = null;
> String result = null;//result from clearcase operation
> StringBuffer out = new StringBuffer();
> StringBuffer err = new StringBuffer();
> Process process = Runtime.getRuntime().exec(command);
> StreamConverter outSc = new StreamConverter(process.getInputStream(),out);
> StreamConverter errSc = new StreamConverter(process.getErrorStream(),err);
> Thread outThread = new Thread(outSc);
> Thread errThread = new Thread(errSc);
> outThread.start();
> errThread.start();
> //Wait until the prosess finish
>
> long delayMillis = 5000; // 5 seconds
> try {
> //wait for threads to die.
> outThread.join(delayMillis);
> if (outThread.isAlive()) {
> // Timeout occurred; thread has not finished
> } else {
> // Finished
> }
> } catch (InterruptedException e) {
> // Thread was interrupted
> }
>
>
>
>
> return result;
>
>
> }
>
> // bridge between byte and character stream.
> class StreamConverter implements Runnable {
> private InputStreamReader isr = null;
> private StringBuffer sb = null;
> // end of steam
> private static final int EOS = -1;
>
> public StreamConverter(InputStream is, StringBuffer sb) {
> isr = new InputStreamReader(is);
> this.sb = sb;
> }
>
> public void run() {
> int character = 0;
> try{
> while ((character = isr.read()) != EOS) {
> sb.append((char)character);
> }
> }catch(IOException ioe){
> System.out.println("Could not read std out!"+ioe.getMessage());
> }
> }
>
> }
>
>
> }
- 1
- Image from WebHi all, I need to read an image located in http://www.xxx.yyy/eee/test.jpg
...how can I do?
How can I display once readed in a swing interface?
thanks.
mario
- 1
- the MI 5 spammeremail***@***.com wrote:
> Incorrect. None of the nasty things that you have said or implied
> about me are at all true.
Does this mean you still accuse me of hacking OpenOffice.org's mailing
lists? What a hoot!
- 1
- url rewriting when the url contains parametersHi,
I am trying to maintain sessions by doing URL rewrite. Things were
working fine till the URL did not contain any parameters. The URL that
I have now is of the form:
http://myurl?id=1&user=null and on doing a sessionID append it becomes
http://myurl?id=1&user=null;jsessionId=xyzw..
Things still get authenticated but now when I try and get the value of
user I get passed the whole string after user= and not just null.
What is the right way to append the sessionID? Btw, I am using the URL
to connect to a servlet from a j2me client.
Thanks,
Gaurav
- 1
- Capture conversion and containmentHi,
I'm writing a tool that analyses java-code, but I have a problem fully
understanding the rules defined in JLS3 for containment and their
combination with capture conversion.
Take the following classes:
class Box<T> {}
class ABox<T extends A> {}
class A {}
Why (because of which rules) is this type-correct code? :
ABox<? extends A> a1;
ABox<?> a2;
a1 = a2;
(And I really mean "a1 = a2" there, not "a2 = a1")
The extra bounds "? extends A" doesn't really make a difference,
ABox<? extends A> and ABox<?> are equivalent, because that parameter already
has a bound A from the definition of ABox. So, informally I understand why
this code is safe. But my problem is understanding the formal rules by
which we can derive that, and where those rules are defined.
My attempt at understanding this:
The constraint for the assignment is:
capture-of(ABox<?>) <: capture-of(ABox<? extends A>)
the capture of ABox<? extends A> is ABox<_T>
where _T is a fresh type variable with upperbounds A.
the capture of ABox<?> is ABox<_T2>
where _T2 is another fresh type variable, also with upperbounds A.
And ABox<_T2> <: ABox<_T> because _T2 <= _T (_T contains _T2). But why?
I see rules for containment defined (4.5.1.1) for wildcards, but not for
type variables created by capture conversion. While I would actually expect
that only rules for type variables would be needed, as types are always
capture converted before you use them. (And this example is chosen so
that "skipping" this capture conversion step doesn't work.)
Now, intuitively, I would say that one type variable contains another if all
its upperbounds are a supertype of one of the upperbounds of the other, and
all its lowerbounds are a subtype of one of the lowerbounds of the other.
But I'd like to see something like this in writing somewhere, and I can't
find an answer to this in the Java Language Specification or anywhere else.
And this intuitive rule doesn't work for Box<ABox<?>>, because the capture
conversion of that is just Box<ABox<?>> again.
So I'm quite confused about how this actually works.
I'd appreciate some help, or pointers to more information about this.
Wouter.
- 4
- "Linked List" AssistanceCan someone please point me to a url that will show me how to create a
linked list.
This needs to be a very simple example as Linked Lists are confusing me.
Thankyou for your assistance.
- 4
- You have received 5 notifications from your fans!Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request.24 hours ago
Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request. 24 hours ago
Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request. 24 hours ago
There are 2 additional fan requests to review
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> .
Click here to view ALL notifications
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=> Change your Email Summary Settings
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=4&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Prefere
nces/Main.aspx?open=emailPref>
You can control
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=4&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Prefere
nces/Main.aspx?open=emailPref> the frequency of these summary emails.
FanBox - 255 G Street #723, San Diego, CA 92101, USA
- 9
- Intellij 5.1 compile time error..hi,
I am using Intellij 5.1 version. Each time I build the project I get
an error:
error: Compiling Web Module 'web':Invalid file
and the file is in the "deploy" folder
So each time I go into the folder and maually delete the .war file and
then when I build the project it works fine.
>From what I have seen one more person using the same version has this
problem. but the one's using the earlier versions don't have this
problem.
Is there any solution for this?
thanks,
- 14
- ANN: New XML Differencing, Updated XML Mapping in Stylus Studio 5.3
A new update for the Stylus Studio XML IDE adds a new XML Differencing
Tool, updated visual XML mapping tools and many other features. Download
a free trial of Stylus Studio 5.3 at:
http://www.stylusstudio.com/xml_download.html
Highlights of new XML Differencing Tool:
* Differencing of XML files and folders using a customizable color-coded
XML tree view
* Support for one-to-one and many-to-one XML file
* Step through XML differences node-by-node
* View differences using "split-screen" and "merged changes" views
* Expand all changes, or collapse identical XML blocks to simplify the
display
* User-configurable XML differencing settings allow you to optionally
resolve or ignore
* XML entity references and XML namespaces
More information at: http://www.stylusstudio.com/xml_differencing.html
Updates to Stylus Studio XML Mapping Tools:
Stylus Studio's visual XML mapping tools now support new split-screen
editing mode that simultaneously display fully editable views of both
the visual XML mapping diagram and the underlying XSLT or XQuery source
code which implements the visual XML mapping. You can now edit either
the source code or the visual XML mapping diagram, and see instantly the
effect their changes have - all without clicking a separate tab or
opening another editor. The automatic synchronization of both the visual
mapping diagram and the XSLT or XQuery source code views is the most
productive mode for developing XML mappings and is a great way to learn
the intricacies of XSLT and XQuery. More information at:
http://www.stylusstudio.com/xml_to_xml_mapper.html
Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com
- 14
- Java Timer, swingDear Java experts,
I'm struggling with timers. I've used javax.swing.Timer in my program. But
when one doesn't have the jre installed, my program doesn't work. It then
gives a class not found exception in the browser. It only works on the sun
virtual machines which you have to download from the website like some jre.
I quess the swing library isn't supported by a lot of virtual machines. But
I'm happy about how the timer works in my program because it makes use of
the actionListener.
Is there some easy solution? Using a simple Timer like the swing version and
let it work on any virtual machine/ jre?
best regards,
Piet den Dulk (Netherlands)
- 14
- Please can you help me how can apply unicode in javaI am tr y to develope a localization application.when i run the code
there is no the right output, it's square box but i can't fix the error
and why it's like that .but i know the unicode representation of my
language please look a sample of code and based on that give me
suggestion to fix the erro.
import java.io.*;
class Unicodechar{
public static void main(String[] args){
//declare a character initialized to Ethiopic
char fidel='\u1200';
// print Ethiopic Unicode (version 3.0)
while(fidel<='\u137C'){
for(int i=0;i<8;i++){
System.out.println((int)fidel +", ");
fidel++;
}
//System.out.println();
}
}
}
- 14
- how to hide tabs in JTabbedTableHello all
I have a JTabbedTable with many tabs with JPanel in it. I want in a state,
only some tabs are shown and other states, other tabs are shown. I used
setVisible(boolean) but it does not work. could you please help
thank you
S.Hoa
- 15
- Creating an object during runtimeI'm trying to generate an object name during run time, and then create an
object with the contents of that variable. You can see that I'm trying to
also make the object name self generating (almost, the 'y' variable isnt
being incremented yet), putting two values ('y' and 'C'). My apologies for
poor coding structure / lack of comments, but I'm am a bit lost on how to
work it out. MANY thanks in advance.Heres what I have so far:
public class testVariable
{
private String name = "";
private String New_name = "";
private int y = 2;
public testVariable()
{}
public void test(String x)
{
name = x;
New_name = name + y ;
System.out.println(New_name);
}
public String getNew_name()
{
return New_name;
}
public static void main(String[] args)
{
int z = 2;
testVariable Darren = new testVariable();
Darren.test("C");
testVariable "c"+ z = new testVariable();
String Old_name = New_name;
}
}
|
| Author |
Message |
Yuriy_Ivanov

|
Posted: 2005-12-15 4:55:00 |
Top |
java-programmer, Username String suggestion
I'm doing Java excercises in University. Part of a program I am working on
requires me to input a both a surname and forename together and have the
program output the forename name only.
e.g:
Please enter student's name: Yuriy Ivanov
Yuriy scored (+ score) which is a (+ grade)
The only way I can think of doing this is to use a String method to output
everything until it hits a space, does this sound probable?
Of course, I would need validation incase only a space is entered.
If this sounds like I'm on the right lines please can someone tell me how
to do that, if not please can someone tell me a better way. I've only know
of String concatination which is the opposite of what I need.
If there is a way to do this without methods I'd prefer to have that as
this part of the program isn't meant to include methods or arrays yet.
Thank you in advance.
|
| |
|
| |
 |
klynn47

|
Posted: 2005-12-15 6:29:00 |
Top |
java-programmer >> Username String suggestion
If a space is what defines a seperation between the names, then you
could simply use the split method of String.
|
| |
|
| |
 |
Monique Y. Mudama

|
Posted: 2005-12-15 7:02:00 |
Top |
java-programmer >> Username String suggestion
On 2005-12-14, Yuriy_Ivanov penned:
> I'm doing Java excercises in University. Part of a program I am
> working on requires me to input a both a surname and forename
> together and have the program output the forename name only.
>
> e.g: Please enter student's name: Yuriy Ivanov Yuriy scored (+
> score) which is a (+ grade)
>
> The only way I can think of doing this is to use a String method to
> output everything until it hits a space, does this sound probable?
> Of course, I would need validation incase only a space is entered.
>
> If this sounds like I'm on the right lines please can someone tell
> me how to do that, if not please can someone tell me a better way.
> I've only know of String concatination which is the opposite of
> what I need.
>
> If there is a way to do this without methods I'd prefer to have that
> as this part of the program isn't meant to include methods or arrays
> yet.
>
I don't quite know what you mean by "without methods". Even reading
the data from stdin requires method usage. Perhaps you mean without
implementing your own methods?
Spaces can be problematic, as some last names have spaces in them.
And what if the student enters a middle name as well?
But I'm guessing your instructor is assuming a single word each for
the first and last names.
--
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
|
| |
|
| |
 |
Roedy Green

|
Posted: 2005-12-15 7:19:00 |
Top |
java-programmer >> Username String suggestion
On Wed, 14 Dec 2005 15:54:30 -0500, "Yuriy_Ivanov"
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :
>The only way I can think of doing this is to use a String method to output
>everything until it hits a space, does this sound probable?
to solve that problem commercially takes pages and pages of code. If
you have only two names, there in not a big problem but if the name is
something like Yuri St. Gluwein or Yuri van Gluwein you have the
problem of figuring ot what the middle thing is.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Yuriy_Ivanov

|
Posted: 2005-12-15 7:41:00 |
Top |
java-programmer >> Username String suggestion
I need to design it without the use of my own methods, that is what I
meant, at least until I develop the second part of the program to add onto
it.
I know there must be a simple solution they are looking for since we're
beginners in this course, so it should be assuming the user inputs single
words for the names.
|
| |
|
| |
 |
Monique Y. Mudama

|
Posted: 2005-12-15 8:04:00 |
Top |
java-programmer >> Username String suggestion
On 2005-12-14, Yuriy_Ivanov penned:
> I need to design it without the use of my own methods, that is what
> I meant, at least until I develop the second part of the program to
> add onto it.
>
> I know there must be a simple solution they are looking for since
> we're beginners in this course, so it should be assuming the user
> inputs single words for the names.
>
>
Yup, I tend to agree. Although it can't hurt to ask your teacher if
you're supposed to handle those types of cases. S/he may be impressed
and more likely to help you in the future =)
PS: It is good newsgroup practice to "quote" the text to which you're
responding, as I've done with your text here. It makes it easier to
follow the conversation. (My newsreader happens to color-code
responses to my posts and bump them to the top of the list, so at
least I knew that this was a followup to my post.)
--
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
|
| |
|
| |
 |
Hal Rosser

|
Posted: 2005-12-15 8:24:00 |
Top |
java-programmer >> Username String suggestion
"Yuriy_Ivanov" <email***@***.com> wrote in message
news:email***@***.com...
> I'm doing Java excercises in University. Part of a program I am working on
> requires me to input a both a surname and forename together and have the
> program output the forename name only.
>
> e.g:
> Please enter student's name: Yuriy Ivanov
> Yuriy scored (+ score) which is a (+ grade)
>
> The only way I can think of doing this is to use a String method to output
> everything until it hits a space, does this sound probable?
> Of course, I would need validation incase only a space is entered.
>
> If this sounds like I'm on the right lines please can someone tell me how
> to do that, if not please can someone tell me a better way. I've only know
> of String concatination which is the opposite of what I need.
>
> If there is a way to do this without methods I'd prefer to have that as
> this part of the program isn't meant to include methods or arrays yet.
>
> Thank you in advance.
>
I suspect the instructor is looking for you to use some methods of the
String class.
Use the indexOf(String s) method to get the index of the space in the the
String, then use the subString method to get the first name - starting with
index 0 up to index of the space.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- commons transactionHi!
I would appretiate it if someone could direct me to a source where i
could get a feel of how exactly the FileResourceManager, in the
commons.transaction.file package is used to manage transactional files.
A source with an example or usage is cool too.
Thanks,
-D
- 2
- Eclipse PakageWhen we create a pakage in java you make it creating several folders one
inside the other in an organized way.
In Eclipse I can create pakages, but I cann't create a pakage inside
another. (left mose button, new|pakage)
Any ideias on how to create inside pakages via IDE ?
- 3
- Carbon AS CE IOC-JMX Architecture V 0.2 is releasedCarbon AS Community Edition is a JMX compliant Open Source J2EE
Application Server project initiated by Aquosine (http://
www.aquosine.com). Carbon AS Community Edition is released under LGPL
and is free to use, modify and distribute. Aquosine is an open
standards based enterprise solutions provider.
Please visit the thread: http://www.theserverside.com/discussions/
thread.tss?thread_id=44178
-Abhilash
- 4
- Detect if Sun plugin is installed (in IE) EVEN if not set as default in plugin?I've looked everywhere and havent found a way to do what I need to do,
so I'll try posting this:
We have a need to sent users to one of 2 webpages depending on whether
they are using the MS JVM/1.1 or the Sun plugin/1.2+
What we did is create a simple applet that checks the java.version
property and forwards to the appropriate page depending on its value.
This should work fine except for one case:
If the user has the plugin installed but it is not set as the default
for IE, then IE will use the MS JVM when it encounters the applet tag,
and the user will get the 1.1 page even though they have the plugin
installed - we don't want that. Other requirements are that we only
need to support IE and we don't want the user to have to download the
plugin if they dont have it.
Can anyone think of anyone to do this? Can I use the OBJECT tag somehow
for this? Maybe nesting the OBJECT and APPLET tags? Also, if there was
anyway to detect the installation of the plugin using javascript it
would help.
Any ideas?
Thanks
Aaron
- 5
- how to make of a specific row toprow in jtableHi,
Please can you tell me how to make of a specific row the first row in
the visible area of a jtable.
For example:
i have a 100 rows and only then a visible.
Now i want to make of row 34, for example, the first one in the
visible area.
How can i do that.
Thank you.
Anand
- 6
- 7
- I WANT YOU I WANT YOU
I LIKE YOU
PLEASE CLICH THIS:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
http://myprofile3210.blogspot.com
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- 8
- Software QA InterviewSoftware QA Interview
http://trailfire.com/frank/trails/31938
Don't be SCARED. Be PREPARED. Practice interview questions before your
interview. Preparing your answers ahead of time makes you feel more
confident and gets you hired faster...
- 9
- manipolazione pdfSul server ho 3 .pdf come posso via codice unirli in un unico .pdf ?
Magari qualcuno di voi conosce qualche framework per la manipolazione
dei documenti pdf ?
- 10
- Tv Need Extra Money for anything ?! Work for Top $ Tv/ I found this on a bulletin board and decided to try it: A little while back, I was browsing through news groups and e-mails, just like you are now, and came across an article similar to this that said you can make thousands of dollars within weeks with only an initial investment of $6.00!! So, I thought, "Yeah right, this must be a scam," but like most of us, I was curious, so I KEPT reading. Anyway, it said that you send $1.00 to each of the six names and addresses stated in the article. You then place your own name and address in the bottom of the list at $6.00, and post the article in at least 200 news groups. (There are thousands) No catch, that was it. So after thinking it over, and talking to a few people first, I thought about trying it. I figured, "What have I got to lose; except six stamps and $6.00 right, right?" Then I invested the measly $6.00.
WELL GUESS WHAT!!!
Within seven days, I started getting money in the mail!! I was shocked!! I figured it would end soon, but the money just kept coming in. In my first week, I made about $25.00. By the end of the second week I had made a total of more than $1000.00!! In the third week I had more than $10,000.00 and it's still growing!! This is now my fourth week and I have made a total of $42,000.00 and it's still coming rapidly. It's certainly worth $6.00 and six stamps, and I have spent more than that on the lottery without ever winning!!!
Let me tell you how this works and most important, why it works.......... also make sure you print this out NOW, so you can get the information off of it, as you will need it. I promise you that if you follow the directions exactly that you will start making more money than you thought possible by doing something so easy!!
Suggestion: Read this entire message carefully!! (Print it out or download it)
Follow the simple directions and watch the money come in!! It's easy. It's legal. And, your investment is only $6.00 (Plus postage)!!!
IMPORTANT:
This is not a rip-off, it is decent; it's legal; and it is virtually no risk - it really works!! If all the following instructions are adhered to, you will receive extraordinary dividends.
PLEASE NOTE:
Please follow the directions EXACTLY, and $50,000 or more can be yours in 20 to 60 days. This program remains successful because of the honesty and integrity of the participants. Please continue its success by carefully adhering to the instructions. You will now become apart of the Mail Order business. You are in the business of developing Mailing Lists. Many large corporations are happy to pay big bucks for quality lists. However, the money made from the mailing lists is secondary to income, which is made from people like you and me asking to be included in that list. Here are the four easy steps to success.
STEP ONE: Get six separate pieces of paper and write the following on each piece of paper "PLEASE PUT ME ON YOUR MAILING LIST." Now get 6 U.S. $1.00 bills and place ONE inside of EACH of the six pieces of paper so the bill will not be seen through the envelope (to prevent thievery). Next, place one paper in each of the six envelopes and seal them. You now should have six sealed envelopes, each with a piece of paper stating the above phrase, your name and address, and a $1.00 bill. What you are doing is creating a service.
THIS IS ABSOLUTELY LEGAL!!!!!
You are requesting a legitimate service and you are paying for it!! Like most of us I was a little skeptical and little worried about the legal aspects of it all. So I checked it out with the U.S. Post Office (1-800-238-5355) and they confirmed that it is indeed legal!!
Mail the six envelopes to the following addresses:
1) W. Edens
4829 Bud Ln
Lexington, KY 40514
2) L.Lessard
40 Martins Ferry Rd
Hooksett,NH 03106
3) J. Safian
6950 W. Forest Presrv. Dr., #115
Norridge, IL 60706-1324
4) G. Takla
690 Adelaide Avenue East
Oshawa, Ontario, L1G 2A8
5) Q. Huda
1212- 1315 Bough Beeches Blvd.
Mississauga, Ontario, L4W 4A1
6) T Ryan
275 Rt 10E Ste 220-301
Succasunna, NJ 07876
STEP TWO: Now take the #1 name off the list that you see above, move the other names up (six becomes 5, 5 becomes 4, and etc.) and add YOUR NAME as number 6 on the list.
STEP THREE: Change anything you need to but try to keep this article as close to original as possible. Now post your amended article to at least 200 news groups. :
(I think there are close to 24,000 groups) All you need is 200, but remember, the more you post, the more money you make!! This is perfectly legal!! If you have any doubts, refer to Title 18 Sec. 1302 & 1341 of the Postal Lottery laws. Keep a copy of these steps for yourself and whenever you need money, you can use it again, and again. PLEASE REMEMBER that this program remains successful because of the honesty and integrity of the participants and by their carefully adhering to directions. Look at it this way. If you were of integrity, the program will continue and the money that so many others have received will come your way.
NOTE: You may want to retain every name and address sent to you, either on a computer or hard copy and keep the notes people send you. This VERIFIES that you are truly providing a service. (Also, it might be a good idea to wrap the $1 bill in dark paper to reduce the risk of mail theft). So, as each post is downloaded and the directions carefully followed, all members will be reimbursed for their participation as a List Developer with one dollar each. Your name will move up the list geometrically so that when your name reaches the #1 position you will be receiving thousands of dollars in CASH!!! What an opportunity for only $6.00 ($1.00 for each of the first six people listed above) Send it now, add your own name to the list and you're in business!!!
*****DIRECTIONS FOR HOW TO POST TO NEWS GROUPS!!!*****
STEP ONE: You do not need to re-type this entire letter to do your own posting. Simply put your cursor at the beginning of this letter and drag your cursor to the bottom of this document, and select 'copy' from the edit menu. This will copy the entire letter into the computer's memory.
STEP TWO: Open a blank 'notepad' file and place your cursor at the top of the blank page. From the 'edit' menu select 'paste'. This will paste a copy of the letter into the notepad so that you will add your name to the list.
STEP THREE: Save your new notepad file as a text file. If you want to do your posting in different settings, you'll always have this file to go back to.
STEP FOUR: You can use a program like "postXpert" to post to all the newsgroups at once. You can find this program at <http://www.download.com>. If you don't understand how it works you can email me at: mailto:email***@***.com (this is only when my name is in the list, so send a copy of my address as well. put this in the header: make millions very easy + my full name)
Use Netscape or Internet Explorer and try searching for various new groups (on- line forums, message boards, chat sites, discussions.)
STEP FIVE: Visit message boards and post this article as a new message by highlighting the text of this letter and selecting paste from the edit menu. Fill in the subject, this will be the header that everyone sees as they scroll through the list of postings in a particular group, click the post message button. You're done.
Congratulations!!!!!!
THAT'S IT!! All you have to do, and It Really works!!!
Best Wishes
$A
- 11
- swing - styled document - paragraph attributeHello,
1) I assign a document style by
style = myDefaultStyledDocument.addStyle("myStyle" , null);
StyleConstants.setAlignment(style, 1); //1 for center
myDefaultStyledDocument.setLogicalStyle(pos, style);
2) Then, I try to read the style :
AttributeSet attributeSet = myDefaultStyledDocument.getAttributes();
Enumeration attrEnum = attributeSet.getAttributeNames();
while ( attrEnum.hasMoreElements() ) {
Object attrObj = attrEnum.nextElement();
System.err.println("attrObj:"+attrObj.getClass());
}
I read only classes of StyleConstants.ResolveAttribute!...
Strange no ?
For all other StyleConstants that's ok !!
Is there something special to do with Alignment ?
FLD
- 12
- major version 49?It looks like the JRE classes that come with the 1.5.0 beta have their
major version set to 49. Does anyone know of any documentation
available for this new version of the class file format? It appears
that the signatures can now have "+" prepended to them, which I am
assuming has something to do with generics. I have no idea what other
changes may be in there.
- 13
- where are file pointer fields?Hello
Where do top level IO classes like InputStream and OutputStream
store the file pointer? I could not find any fields section in
the java api docs.
Does java uses some different method or these
class members are not documented?
Homepage
http://madhur.netfirms.com
- 14
- Spring tutorialHi!
Does anyone knows for a good and free SPRING tutorial?
Please send me some links.
I tryed to google it, but all I find is very poor tutorials.
Thanks!
Marko
--
Remove MakniMe from e-mail address
-----------------------------
SAILING IS A POETRY OF MOTION
-----------------------------
- 15
- Deadlock... i thinkI apologize in advance for the length of the note, and the source code
included.
I posted earlier under the title "Double streams", where i wanted to
use an RMI object as a sort of proxy for two clients to exchange data
via streams. I kinda failed, but now i'm trying something new. This
doesn't work either, but this time i think someone might be able to
solve it, since i'm not adept at using threads and i think that's
where the problem is. :)
The source for ByteHolder and RemoteByteHolder is included below. A
server is run, making a ByteHolder, BH, available via RMI.
Client A obtains the reference to BH, and passes this on to its
FooOutputStream, which extends OutputStream and implements the
write(int b) method by calling putByte(b) on BH.
Client B also gets BH, passes this to FooInputStream, which extends
InputStream and implements read() by calling getByte() on BH.
What i did to test was:
- run the server
- client A wraps the FooOutputStream in a PrintWriter, and
println("foo") is called on it
- client B wraps FooInputStream in a InputStreamReader, which is
then wrapped in a BufferedReader, and readLine() is called on that
The data then goes, one byte at the time, from client A to client B.
Client A stops running, but Client B just sorta hangs around... in a
deadlock i presume. I can make it return and print out the read line
by doing one of two things:
- kill the server
- manually send a -1 to client B
When i've used streams before, i didn't have to send a -1 in order to
get the reading side to get on with it - it just happened magically. I
also don't understand why killing the server make things better...
Can anyone explain this or, as an alternative, suggest a better way to
exchange bytes via RMI. I just really wanted to make streams work. :)
Oh, another thing. To make the server available, i've made it Runnable
and in the run i have a while(true) loop, that makes the thread sleep
for a chunk of time. Maybe that is a problem, too?
Regards,
Carsten H. Pedersen
----------- SOURCE BELOW -------------
package streams.holder;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface RemoteByteHolder extends Remote {
int getByte() throws RemoteException;
void putByte(int b) throws RemoteException;
}
...
package streams.holder;
import java.rmi.RemoteException;
public class ByteHolder implements RemoteByteHolder {
private int theByte;
private boolean stored = false;
public synchronized int getByte() throws RemoteException {
while(!stored) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("hb: get: "+theByte);
int i = theByte;
stored = false;
notifyAll();
return i;
}
public synchronized void putByte(int b) throws RemoteException {
while(stored) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("bh: put: "+b);
stored = true;
theByte = b;
notifyAll();
}
}
|
|
|