| Eclipse Internal Web Browser option disabled |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Switch on StringsHello, I have code that looks like this:
switch(myColor){
case "blue":
{
this.setForeground(Color.blue);
break;
}
case "red":
{
this.setForeground(Color.red);
break;
}
case "green":
{
this.setForeground(Color.green);
break;
}
default:
{
this.setForeground(Color.blue);
}
}
myColor is a String being read in from an HTML file PARAM line.
The above code doesn't work, because switch doesn't work with strings.
So I was wondering how else I can do this...
ttyl
- 4
- Eclipse + Tomcat plugin: problem with automatic class reloadingHi all,
I am having a problem using the DevLoader that comes with the eclipse
plugin for Tomcat from sysdeo.
It is loading classes okay from locations.
But it is not reloading them when they change.
The reloading works okay for a class that is WEB-INF/classes.
Here are the details:
Versions:
eclipse version 2.1.1
eclipse Tomcat plugin V 2.2.1
Tomcat version 4.1.29
JDK 1.3.1_04
I have extracted the DevLoader zip into [Tomcat Home]/server/classes
directory.
The tomcat server is using this DevLoader to load the classes.
I set the debug level in my web-app Context in conf/server.xml for the
loader to 4.
(<Loader className="org.apache.catalina.loader.DevLoader"
reloadable="true" debug="4"/> )
Logging is redirected to the console.
I can see output in the console that shows that it added my classes
location:
[DevLoader] added file:/C:/dev/workspace/Test/classes/
This is the location to find a class ims.test.TestServlet.
And it is able to find this class:
WebappClassLoader: loadClass(ims.test.TestServlet, false)
WebappClassLoader: Searching local repositories
WebappClassLoader: findClass(ims.test.TestServlet)
WebappClassLoader: findClassInternal(ims.test.TestServlet)
WebappClassLoader: loadClass(javax.servlet.http.HttpServlet, false)
WebappClassLoader: Delegating to parent classloader
WebappClassLoader: Loading class from parent
WebappClassLoader: Returning class class ims.test.TestServlet
WebappClassLoader: Loaded by WebappClassLoader
available:
delegate: false
repositories:
/WEB-INF/classes/
required:
I find it strange that my location
(file:/C:/dev/workspace/Test/classes/) is under the repositories.
If change the code (recompile) ims.test.TestServlet it is NOT
reloaded.
However, if I have a class that is to be found in WEB-INF/classes
e.g. I have a different class ims.TestServlet that is in
WEB-INF/classes/
WebappClassLoader: loadClass(ims.TestServlet, false)
WebappClassLoader: Searching local repositories
WebappClassLoader: findClass(ims.TestServlet)
WebappClassLoader: findClassInternal(ims.TestServlet)
WebappClassLoader: Returning class class ims.TestServlet
WebappClassLoader: Loaded by WebappClassLoader
available:
delegate: false
repositories:
/WEB-INF/classes/
required:
Then if I change ims.TestServlet it IS reloaded.
WebappClassLoader: Resource '/WEB-INF/classes/ims/TestServlet.class'
was modified; Date is now: Tue Dec 23 10:33:32 GMT 2003 Was: Tue Dec
23 09:28:57 GMT 2003
thank you for any help you can give,
and best wishes for Christmas + the New Year,
Grainne Coghlan
- 4
- 4
- Mail APIi wrote program for sending mail from one server to another but while
comile time it shows an error like Mail API is not found.. i was
downloaded it from sun..but i dont know where to install this API..so,
can u please tell me...?
- 4
- Open File componentThe usual file open component on a form consists of a label describing
the file, a text field that accepts a file name and a command button
that brings up a file chooser.
Is there a "standard" component that does this preferably a bean that
can be added to NetBeans?
- 4
- Getting ResultSet From Cursor Too SlowAll,
I have a method that calls an Oracle Stored Procedure from an Oracle
Package. Everything works fine but the last two lines in my code below
where I get the Cursor from the procedure and cast it to a ResultSet is
a huge bottleneck. Does anyone have any ideas on how to make this
transition faster for large resultSets?
Thanks in advance.
Corey
ResultSet rs = null;
Result r = null;
String sql = "{call SECINQ.GetUsersBasic(?, ?, ?, ?, ?, ?, ?, ?," +
"?, ?, ?, ?, ?, ?, ?, ?," +
"?, ?, ?, ?, ?, ?, ?, ?," +
"?, ?, ?, ?, ?, ?, ?, ?, ?)}";
open();
CallableStatement call = (CallableStatement)con.prepareCall(sql);
call.registerOutParameter(1, OracleTypes.CURSOR);
call.setString(2, name1);
call.setString(3, name2);
call.setString(4, name3);
call.setString(5, name4);
call.setString(6, geid1);
call.setString(7, geid2);
call.setString(8, geid3);
call.setString(9, geid4);
call.setString(10, ssn1);
call.setString(11, ssn2);
call.setString(12, ssn3);
call.setString(13, ssn4);
call.setString(14, userId1.toUpperCase());
call.setString(15, userId2.toUpperCase());
call.setString(16, userId3.toUpperCase());
call.setString(17, userId4.toUpperCase());
call.setString(18, userId1.toLowerCase());
call.setString(19, userId2.toLowerCase());
call.setString(20, userId3.toLowerCase());
call.setString(21, userId4.toLowerCase());
call.setString(22, userId1);
call.setString(23, userId2);
call.setString(24, userId3);
call.setString(25, userId4);
call.setString(26, phone1);
call.setString(27, phone2);
call.setString(28, phone3);
call.setString(29, phone4);
call.setString(30, flName1);
call.setString(31, flName2);
call.setString(32, flName3);
call.setString(33, flName4);
call.setFetchSize(200);
call.execute();
rs = (ResultSet)call.getObject(1);
r = ResultSupport.toResult(rs);
- 8
- 2d String in a BoxHi,
I want to draw a string of varying size inside a box.
g.drawString("........string....", x, y)
g.drawBox(x, y, w, h);
-------
|String| h
-------
w
Is there a good way to calculate the size of the box?
- 10
- jsp grid creationi want to use a grid in my front end using java. in this grid i want to
fetch the information from the database. can i make such a grid using
jsp.
if yes, can anybody tell me how?
ashutosh
- 11
- Help with XtagsI am using jakarta's xtags library. I have put the xtags.tld file
unser /WEB-INF and the taglibs-xtags.jar in the /WEB-INF in the lib
directory. I am using
java version 1.4.2-b28 and tomcat 4.1. IN my jsp i use the following
tags
<xtags:style xml="/test.xml" xsl="/article-html.xsl"/>
when i run the jsp, i do not get anything ..blank page... Rethere some
file i am missing...
any help would be appreciated.
THanks
Mohit
- 13
- Getting images in appletI have an applet that reads jpg's. It works in AppletViewer but I get a
permission block for reading the file when I load it in my browser (all the
files in this case are local). How would I get permissions for it it to run
in a browser, and what would I need to do if I were to upload this to a
website?
- 13
- getBytes() returning too much dataHi,
I'm running postgreSQL 7.2.1 and java se version 1.4.0_01
I'm storing some images in the database as bytea. When I use
result.getBytes() to fetch the data back it ends up being a larger
size than that which is stored in the database. (I'm sure that the
value stored in the database is the correct size) I was testing it out
with a single entry in the table like this: -
rs = stmt.executeQuery("SELECT imageid, name, gender, image,
length(image) FROM images");
And tried this: -
System.out.println(rs.getInt(5));
byte[] imgBytes = new byte[rs.getInt(5)];
imgBytes = rs.getBytes(4);
System.out.println(imgBytes.length);
Even in this case where the first println displays the expected output
the imgBytes array somehow ends up being about 10k too big (the size
increase is consistent)
Does anyone have any idea whats going on and how I might fix it?
Thanks,
Conor
- 13
- Teaching Children (was Re: Help, where to start learning Java)"Roedy Green" <email***@***.com> wrote in
message news:email***@***.com...
> I was lead counselor at a computer summer camp. I interviewed all the
> kids and discovered most of them wanted more than anything to write
> their own video games. There were programming novices. But within a
> week nearly every kid had written a game or animation. I was utterly
> blown away how fast they learned. In the breaks they DEMANDED to learn
> trigonometry, which blew the mind of a math prof who was watching the
> production.
>
> The other thing was the kids wrote nothing but commented/structured
> code. They never saw anything else, so it never occurred to them to
> do other wise.
Now this I didn't realize.
I had no idea you had experience in teaching children? I have been
looking for ideas to teach and stimulate desire to learn logic and
mathmatics in younger children. It is my belief that subjects which are
typically reserved for higher education such as trig, calculus, discrete
math, deductive logic could all be started before children ever leave
elementary. The trick would only be to interest the children, and present
the material in a way that it could be absorbed.
Can you offer any insight into this matter? Into teaching children how to
make games? What engine did you use (I suppose you were using Java).
--
LTP
:)
- 13
- Assignment Linked List HelpCan some please implement a class called MyList to finish this off?
public class MyList<E extends Comparable<E>> extends List<E> {
}
----------------------------------------------------------------------------------------------------
It must be implemented with this List.java:
public abstract class List<E extends Comparable<E>> {
protected class Node<T extends Comparable<T>> {
protected Node(T data) {
this.data = data;
}
protected T data;
protected Node<T> next;
}
public abstract void insert(int index, E data) throws ListException;
public boolean isEmpty() { return head == null; }
public abstract E remove(int index) throws ListException;
public void reverse() { head = reverse(head, null); }
protected abstract Node<E> reverse(Node<E> curr, Node<E> prev);
public abstract int search(E data) throws ListException;
public int size() { return size; }
protected Node<E> head;
protected int size;
}
I need help for this assignment ......
Thanks...
- 14
- About JEditorPaneI wrote a plugin to NetBeans 5.0 which displays html pages in a
JEditorPane, when i clicked a file in explorer.
JEditorPane is in the topcomponent class.Also JTree(Explorer) in a
other topcomponent class.
I use setPage(URL url) method. But its not working properly.That means
the editor pane displays the html code of the file
But i wrote it as standalone application, it displays correctly.
Explain what is the problem here.
- 14
- traversing through arraysSuppose I've got the following code
public class EmployeeData
{
public static void main(String [] args)
{
String [] [] employeeInfo = { { "Alex" ,"Joe" , "James" , "Tom"}
,
{" Manager" , "Clerk" , "Analyst"
,"Manager"} };
double[] salary = { 2000 ,540 , 6321 ,1999.99};
// how do I traverse through that multidimensional array to display the
employee name and title and those who earn more than 2000
// I was trying to use a for loop ( int i = 0 ; i< employeeInfo.length ;
++i)
then use the if statement but it doesnot work ,
Anyone can help me on this problem
thanks
boen
|
| Author |
Message |
JM

|
Posted: 2006-1-3 23:54:00 |
Top |
java-programmer, Eclipse Internal Web Browser option disabled
I am using Eclipse 3.1.1 for some reason
Window->Preferences->General->Web Browser does not allow me to select
the "Use internal Web browser" option. Only "Use external Web browser"
underneath which nothing is listed. How do I enable or install the
internal web browser? The radio check box is currently disabled.
Thanks in advance.
JM
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Webstart and Flash PlayerI have a Webstart application and I want to be able to invoke the Adobe
Flash Player for display in the app of *.swf files. Can anyone point
me in the direction of some code examples where this is implemented?
Many thanks in advance
- 2
- ResourceBundle.getBundle from Tomcat, to "external" directoryI have a servlet running under Tomcat. I'd like to load a
ResourceBundle that resides outside the servlet's context (directory).
I know how to get it from WEB-INF/classes:
ResourceBundle.getBundle("Basename", locale);
and I know how to get it out of some deployed package directory,
relative to WEB-INF/classes:
ResourceBundle.getBundle("com.company.package.Basename", locale);
But I was hoping I could load it from a directory that is not in the
webapp context -- for example, /opt/local/config/Basename.properties.
I tried the following two permutations, but both throw
MissingResourceException:
ResourceBundle.getBundle("/opt/local/config/Basename", locale);
ResourceBundle.getBundle(".opt.local.config.Basename", locale);
I suspect that I need to somehow get /opt/local/config on my classpath,
but not sure if that is it or not...
Anyone seen anything like this before?
thanks
scott
- 3
- Mono .netRecently I learned that Mono .net will run MS .net applications. This
came as a bit of a suprise to me because I thought Mono was a different
implenteation of .net and therefore incompatible.
So this raises some interesting questions. Since Microsoft still
retains copyrights and patents to .net is Mono .net governed by the
MSDN EULA. Or can Microsoft revoke the license to the ECMA at a future
date. If that were possible it would not seem inconcievable that
Microsoft could theaten to withdraw if they did not agree to adhere to
a MS EULA. On the otherhand Microsoft could demand a fee for each
transaction. Awhile back Bill Gates said that Microsoft was not making
enough money from the internet and wanted to use .NET as a chargeback
mechanism to force them to pay 1 penny for each transaction.
Alternatively speaking however Mono .NET could be used as a migration
platform to move people to Linux. One possible advanate to Mono .NET is
that SE Linux gives the administrator more granularity to lock down the
OS.
In any case there is a lot to ponder.
- 4
- SeekJob keywords (was: How much should I charge for fixed-price...)> From: Tim X <email***@***.com>
> in larger organisations, the initial culling of applications is
> usually done by some junior staff member from the HR department - they
> know nothing about programming, computer or IT. They have a list of key
> words or criteria which they look for - those that have it get to the
> next stage, those that don't get filed in the round filing cabinet
> under the desk!
So would you recommend the keywords be listed in logical sections, such
as programming languages in one list, platforms in another list,
application areas in another list, etc., or should I just mix all the
unrelated keywords together in one huge alphabetical list to make it
easy for the junior staff member to find the keywords he/she is looking
for?
Given my experience, which keywords from my various resumes should I
keep, which should I flush, and which keywords do I not yet have but
based on my experience I should include as synonyms for the non-keyword
descriptions I already have? To save you the trouble of looking through
my dozen resumes, here's the complete list currently:
1620
360/370
6502
68000
8080
acia
algol
altair 8800a
anti-spam
applet
archie
arpanet
assembler
awt
bachelor of science degree
balanced binary trees
bitmapped image of graph to parameterized lineaments
bitnet
blockade puzzles for 3-yr-olds or dan quayle
bnf-driven type-checking
c
c++
cai
calculus
canonical representations
card input
cgi
class-assignment
client/server telecommunications
clustering
cmucl
cobol
college graduate
combinatorics
computer-assisted instruction
console typewriter
consumerism
cross-reference
data compression
ddt
dec pdp-10
destructuring
device interfaces
diablo disks
diet optimization
differential algebra
differential polynomials
dm2500 emulator
docindex
dom
eqd
expert system
file maintenance and indexing
finger
flashcard drill
forth
fortran
four-phase iv/70
fractals
frontpanel
ftp
gcd
generalized computer dating
graph hockey
gui
hashing
heapsort
help-net
hermes
high-level languages
html
hypercard
hypertalk
i/o device interrupt handlers
ibm 1130
ibm 1620
ibm 360/370
image processing
imsss
indexing
info-nets
information retrieval and indexing
intel 8080
interval arithmetic
interval refinement stochastic mapping
inventions
its
j2ee
j2se
java
javadoc
javascript
jdbc
jsax
jsp
jsys
kermit
large prime numbers
lattice manipulation
laying out text
linux
lisp
listserv
maasinfo
machine language
macintosh
macintosh allegro common lisp
macl
maclisp
macsyma
mail
mainsail
mathematical research
mathematical-formula printer
mathematics
mathprinter
mensa
meta-index
microsoft windows
mos 6502
ms-windows
natural language understanding
net-relaxation
netnews
netscout
nmr relaxation
note
nuclear magnetic resonance relaxation
numrel
nutritional diets.
odbc
opacs
os traps
packet-based data communication
packet-based telecommunications
pacs-l
payroll
pcnet
pdp-10
perl
permutations
php
pnews
pocket forth
portable standard lisp
porting
pre-registration
prettyprinter
principal differential ideals
processing and rendering remote-sensing multi-spectral images
programmer/analyst
proofreading
proximity-hashing
pseudo-random numbers
psl
putnam contest
pvm
rdrlist
redhat linux
reduce
rlisp
rmail
rmi
rn
rsa cryptosystem
rscs
s-expressions
sail
save/restore environment
sax
segmat
servlets
sesame c
shortanswertests
single-step debugger
sl
software engineer
sokoban puzzles for 3-yr-olds or dan quayle
sort/merge
space exploration
sprouts
standard lisp
stanford
stipple
sunos
svc202 commands
swing
syntax&semantics checking
syscalls
telecommunications
telnet
tenex
terminal emulation
text compression
toolbox traps
topindex
toplevel meta-index
tops-10
uci-lisp
university payroll
university pre-registration
unix
us citizen
usenet
uuo
vb
versaterm
virus detection and removal
visual basic
visual c/c++
vm/cms
waits
wilbur
word problems
wordprob
writing & public info
www
xml
zmodem
zterm
So which of those are so grossly obsolete that there's no chance anyone
will ever want somebody with such experience, so I should permanently
delete them from my keywords list? Which new keywords did I overlook?
> All of that could have been summarised as something like x years
> assembler programming.
Which is better keyword for that: assembler or assembly-language?
Or should both be included in case the junior staff member is looking
for the other one and doesn't realize they mean the same thing?
(Splitting my reply here, in case anyone stopped reading at that list
of keywords and wouldn't see the rest of the topics I'm discussing
later in the second part of this reply.)
- 5
- Questions about code signing cert.Martin Chan wrote:
> 2. What will happen when if people use my application after my
> certificate has expired?
After the expiration date the certificate
cannot be used to sign applications.
The date has no implications for the execution
of already signed applications.
- 6
- JAXM DaemonI'm a J2EE newbie. I'm searching for the correct technology, within a
J2EE framework (or not), to do this thing I need to do. I'm hoping one
of you vets has done this already or has some good ideas.
I need a daemon-like process or thread that fools the J2EE server-side
environment into thinking that it is a user's browser. At a high
level, his deamon will:
- hold a session
- process a cookie
- issue commands via Web Services
- recieve responses from the server side
- manage a deterministic state based upon the messaging
Is JAXM a good choice? It kinda seems from a cursory look at the
architecture that JAXM clients talk to JAXM servers. Everybody knows
they are JAXM, No?
Please ask if I need to be more specific. Thanks.
- 7
- something about SSL?HI
I am not quite understand SSL, but as i see so far, i need to put
the two identical keystore files belong to server and client program.
If somebody get that keystore file (which is very possible, because
i just embed all my class files in a jar), he may able to write a
client program to connect to my java server and do some hacking things.
Why don't we just encrpt the transfer data by a key and that key is
stay inside in both server/client code. I think it is much more
security than SSLsocket because 1) no keystore file 2) no one is able
to de-compile your class file and take your key(which stay in your
code).
Am i correct? If no, any better security solution for my server/client
software?
thanks
from Peter (email***@***.com)
- 8
- RedHat9 + Sun JDK 1.4.2_1 + NPTL = issuesThis is a multi-part message in MIME format.
Hi,
These 2 newsgroups (redhat.kernel.general, comp.lang.java.programmer)
seem like the apropriate place for my contemplations, if I'm at the
wrong place please direct me to the right one.
I'm trying to get as many Java threads as possible running on my Linux
box. Using RedHat 7.2 (2.4.18-24.7.xsmp) and with the right JVM (Sun
1.4.2_1) parameters (-Xss, -Xms, -Xmx) I have a fairly stable production
system that will scale up to 800 threads without significant problems.
This however is not enough for me on the long run.
I'm a loyal reader of The Volano Report [http://www.volano.com/report/]
and The C10K problem [http://www.kegel.com/c10k.html] for some time now
and after running across this victorious article about the latest JDK
and the NPTL in RedHat9
[http://developer.java.sun.com/developer/technicalArticles/JavaTechandLinux/RedHat/]
I thought that the scalability problem of Java on Linux was solved.
After some testing (see attached Test.java) I was disappointed to see
that after creating just a little under 3000 threads (that basically do
nothing) the JVM threw this dreaded "java.lang.OutOfMemoryError: unable
to create new native thread" exception again while 'free' still reports
loads of free memory. The -Xss, -Xms or -Xmx parameters to the JVM don't
seem to do anything for me (any parameter value still causes the
Exception at roughly 3000 threads).
What gives? The article about the new JVM with the new RedHat promises a
lot (eg. No limits on the number of threads), but when put into test
does not yet deliver. Do I need to tweak kernel parameters to allow for
more threads? If so, where do I do this?
For those that wonder why I need so many threads; I run a java HTTPD
where any request is a call to a servlet, each call needs a Thread. I
handle a lot of requests. For the CPU this is not an issue, the calls
are very thin. However, the Thread management in Linux does not seem to
be suitable for this kind of scaling (yet?).
I would be glad to come across someone with the same problem and other
views on this issue. I've been working with Java for more than 5 years,
starting on OS/2 and now using Linux as host OS. And my needs always
seem to just a tad ahead of the possibilities.
Sacha
- 9
- getConnection in strutsHi,
I hope the question is addressed to the appropriate forum :)
First of all I'd like to say I'm new to struts. My question is how
should I getConnection to DB. I know how to read parameters for
connection but I'd like to make conections more robust. I mean I should
use ConnectionPool. I've some idea how to achieve it but..if I split my
application into tiers (presentation, conntroller, bo and dao) how can I
get Connection from DAO tier since I don't have access to server
context. I'm looking for some advice how to cope with such problems. Of
course I could pass in constructor these parameters but I don't think it
was good solution.
How did you solve problem with accessing db from your struts applications?
Rgs
- 10
- break removal
Let's say you have some code like this:
case 1:
if ( x )
if ( y )
return a;
else return b;
else return c;
break;
Jva will insist you take out the break because it is not needed.
then later you inadvertently meddle with the code say like this:
case 1:
if ( x )
if ( y )
return a;
else return c;
now you need the break back in there again, but of course Java wont't
tell you.
What is the best way to handle this to make sure you have covered all
possibilites and that you truly can't ever fall through?
You can't even put debug code in there to catch the problem. Java
will make you take it out if the prgram is CURRENTLY working.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
- 11
- 12
- How to make a s/w producthi,
I am having some JAVA Applets which will simulate a mechanical
Engineering Lab Set Up. I want to make this as a software Product which
is having some set up files and Register Variables etc.. I want to make
this as an evaluation copy for a particular period of time and a full
fledged software also. Can any one tell me how to make this and the
requirements for doing this.
Thanks in advance,
sarath
- 13
- Web Services Specifications for Systems ManagementThe Web services architecture is based on a suite
of specifications that define rich functions and that may
be composed to meet varied service requirements. A crucial
application for these services is in the area of systems
management. Read about it here:
http://developers.sun.com/techtopics/webservices/management/?ssobm=ng
- 14
- Dates in a sql StatementHello,
I have the following sql statement:
SELECT code,fname,lname FROM employee WHERE datestarted = '02/12/2001'
This works fine when executed through dbaccess, but when I use JDBC to get a
ResultSet nothing is returned.
I am using JDBC.2.21.JC5, my back end eis is Informix Universal server.
Also, the query executes fine when I remove the date part:
SELECT code,fname,lname FROM employee
Can any one tell me what am I doing wrong since I am new to JDBC.
Thanks in advance.
-r
- 15
- any way to simulate HTML hot text to pop up a JOptionPane?Hi - I would like to put some HTML-look-like hot text inside JTextArea
setText text so that clicking on the hot text words will pop up a
JOptionPane message box. I want to do it by hot text so that: (1)
users will be totally familiar with it from all their web browsing;
and (2) the nearby text can be edited by me from time to time without
worrying about what coordinates the hot text will move to. Is this
possible in Java?
- Pete
|
|
|