| getting starting with ... |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- java/121420: Java applet fails to find class
>Number: 121420
>Category: java
>Synopsis: Java applet fails to find class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-java
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 06 08:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Andrew Reilly
>Release: FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD duncan.reilly.home 7.0-STABLE FreeBSD 7.0-STABLE #3: Sat Mar 1 17:44:29 EST 2008 root@duncan:/usr/obj/usr/src/sys/DUNCAN amd64
A 3G Athlon64-X2.
>Description:
An attempt to use a java client from within firefox,
while connecting to a Juniper ssl VPN service fails with
this message in the java log. (The same service works OK
with firefox on a MacOS-X laptop.):
Java Plug-in 1.6.0_03-p4
Using JRE version 1.6.0_03-p4 Java HotSpot(TM) 64-Bit Server VM
User home directory = /usr/home/andrew
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class de.mud.jta.Applet not found.
java.lang.ClassNotFoundException: de.mud.jta.Applet
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:626)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:780)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2074)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:709)
at sun.applet.AppletPanel.run(AppletPanel.java:363)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Invalid argument
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at sun.net.NetworkClient.doConnect(NetworkClient.java:155)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:271)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:328)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:284)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:173)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:170)
... 9 more
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
- 1
- Vowel Counter ProgramHey,
I am trying to write a basic program that counts how many lowercase
vowels and non-vowels are in a string. I'm trying to use the
StringTokenizer function. Also, I have to prompt the user again by
using a do while loop. The string ends with the string "DONE".
Here's my code. If anyone could help me, please do. Thanks.
import cs1.Keyboard;
import java.util.StringTokenizer;
class vowelCounter;
{
public static void main(String[] args)
{
// Initialize Answer to Zero
int answer = 1;
do // Start the do loop
{
// Declare all variables and set counters to zero
int aCounter = 0;
int eCounter = 0;
int iCounter = 0;
int oCounter = 0;
int uCounter = 0;
int nonVowelCounter = 0;
String line, temp;
int letter;
StringTokenizer tokenizer;
// Prompt the user for String and read string
System.out.print ("Please enter text (Type DONE to quit):
");
line = Keyboard.readString();
while (!line.equals("DONE"))
{
tokenizer = new StringTokenizer (line);
while (tokenizer.hasMoreTokens())
{
temp = tokenizer.nextToken();
letter = temp.length();
for (int i=0; i<=letter; i++)
{
// Increment vowel counters
if (line.charAt(i) == 'a')
aCounter++;
else if (line.charAt(i) == 'e')
eCounter++;
else if (line.charAt(i) == 'i')
iCounter++;
else if (line.charAt(i) == 'o')
oCounter++;
else if (line.charAt(i) == 'u')
uCounter++;
else
nonVowelCounter++;
}
}
line = Keyboard.readString();
}
// Print out number of vowels and non-vowels
System.out.println ("Number of 'a': " +aCounter);
System.out.println ("Number of 'e': " +eCounter);
System.out.println ("Number of 'i': " +iCounter);
System.out.println ("Number of 'o': " +oCounter);
System.out.println ("Number of 'u': " +uCounter);
System.out.println ("Number of non-vowels: "
+nonVowelCounter);
// Prompt the User About Continuing
System.out.print ("Do you want to continue?
(0=exit/1=continue) ");
answer = Keyboard.readInt();
System.out.println ("");
}while (answer == 1);
}
}
- 1
- Get installed appHi,
I want to write an app but I'm not sure if I should use Java.
The app is a crossed platform.
My questions:
1.Can Java return me the name/position of install app on the OS it
supports?
2. Does Java supports the following OS:
Unix/GTK+ , Unix/Motif and X11 , Mac OS , MGL and OS/2 ?
TIA.
Eran
- 3
- 3
- Sunspot: Java Virtual Machine Implementation Vulnerability``SUN Java Virtual Machine Implementation Vulnerability
We have found a security vulnerability in the SUN's implementation of
the Java Virtual Machine, which affects the following SDK and JRE
releases:
- SDK and JRE 1.4.1_03 and earlier
- SDK and JRE 1.3.1_08 and earlier
- SDK and JRE 1.2.2_015 and earlier.
SUN was informed about this issue on June the 2nd 2003 and has already
addressed it in their latest SDK/JRE versions. Please, see Sun Alert
Notification numbered 57221 for more information about the patched
SDK/JRE releases. [...]
The described vulnerability allows for the creation of a malicious
applet that could *completely* bypass applet sandbox restrictions. We
developed proof of convept code which successfully exploited this
vulnerability in Netscape 6 and 7 as well as Mozilla web browsers
environment using vulnerable versions of JRE Plugin. [...]''
- http://www.net-security.org/vuln.php?id=3018
Sun's page on the problem:
``A Vulnerability in JRE May Allow an Untrusted Applet to Escalate Privileges''
- http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsalert%2F57221&zone_32=category%3Asecurity
--
__________
|im |yler http://timtyler.org/ email***@***.com Remove lock to reply.
- 3
- Corrupted JPEG: DataInput/OutputStreamHi!
I download a JPG and write it to disk; this is rather old code which
certainly worked. The only thing I'm aware of that changed is JDK 1.4 ->
1.5b2. The written file is corrupt:
URL u = new URL ("http://foo/bar.jpg");
DataInputStream in = new DataInputStream
(u.openConnection().getInputStream());
File f = new File (foo);
FileOutputStream fs = new FileOutputStream (f);
DataOutputStream out = new DataOutputStream (fs);
for (int b; (b = in.read ()) != -1;)
{
out.write (b);
}
in.close();
fs.close();
out.close();
What's wrong? And, can I repair the corrupt files?
- 8
- Phara3omacy news
o C t i q a i I x i i s $9 u 9 (1 Iy 0 h p p i d l r l l s a )
m V m a i I e i m u i m $1 t 05 ( jk 30 r p m i s l l l j s o )
m V q i z a j g j r t a $ f 69 ( l8 10 u p e i p l b l n s x )
Many oth I1 er, Vis nh it our sit Vn e <http://dapi42.taurantome.com>
and Sa Pw ve o 29 ver 5 YL 0%
- 12
- People Favourite SitesDear Friend,
I have found some websites:
for msn messenger,
http://www.hotmailpk.com/
For
entertainment,spotlight.articles,interviews,dailyupdate;Wrestling;gosips;amazing
pictuers;cookingrecipes;lifestyle;
htttp://www.familyandtwist.com/
for sms messeges, smsjokes,
http://www.smstwist.com/
Visit these websites:
For Myspace.Com users visit:
http://www.myspacepk.com/
To learn a language visit:
http://www.codedcode.com/
To download world's best wallpapers for your computer visit:
http://picture-gallery.dnspk.com/
Thanks
- 12
- jsp:setProperty, java.io.File, and I thoroughly confusedHi,
I'm writing a webapp based on JSP technology. I've been doing
some reading and from what I've read, it isn't possible to use
jsp:setProperty to set a File property. So, I created a BeanInfo class
for the Bean I had the File variable in. I also created a class that
extended PropertyEditorSupport to assign the BeanInfo class to the
Bean. But, those don't appear to get called. I CAN, however with
Tomcat 5.0.28 on Windows XP, simply set a File property with
jsp:setProperty. The Bean ends up looking for the file in the Tomcat
bin directory, and I can thus set a relative path to the file. So, I'm
completely confused. What is going on? Is this expected behavior?
Thanks,
Jason Mazzotta
- 12
- Creating MouseEventsHi,
I'm trying to dispatch interaction with a touch screen as a MouseEvent, but
I can't get java to register an event on components like the drop-down list
from a combo box, or invisble components that accept normal mouse click
events.
Thanks,
Andrew
- 12
- optimizing java compilerHi!
As the -O option of javac does nothing and Sun obviously think it can affort
not to do so, which compiler is known to optimize bytecode well? Jikes?
eclipse? What about AspectJ?
Regards
Timo
- 12
- java with swinghello to all,
I have done a java component in Swing
I have included the java component as plugin and
embedded in applet for web based access. But it is not
visible in other clients.
It is visible in Only the server.
I read javaweb start's JNLP can do that (since I
didnot want to install anything jre like in client )
is it possible.
thank you in advance,
vishnu.
- 15
- illegalMonitorStateExceptionhello everybody!
it is well known that one has to be in the monitor of an object to call
myObj.wait(), f. E. by putting it into a synchronize(myObj) block.
my questions:
- is it bad programming style to just catch the exception without doing
the synchronize? because if i do this my program still perfectly does
what it should.
- why does this exception exist?
thanx a lot,
moritz.
- 15
- Open Source quality better then closed?hi...
i just wondered, does the fact you write a product as open source,
forces you to write better code, in the hopes (fears?) that who ever
may see you code in the future will be impressed (shocked?)
- 16
- Make Java plugin SysTray icon visible ?I have a java plugin (for IntExp) browser which is currently for version 1.4.2_14b05
On some machines I noticed that the plugin shows an icon in the SysTray
on others not. How can I hide/unhide this Java plugin SysTray icon ?
Where are the files for this java plugin physically stored (in which directory) ?
Lars
|
| Author |
Message |
Mixo Shiburi

|
Posted: 2004-5-5 21:31:00 |
Top |
java-programmer, getting starting with ...
... Java
I am newbie of sorts: I'm familiar with java to a some extent, but I have
never had the chance to use it. Which means, I'm not as comfortable with
it as I am with other languages (php,asp,python,c,perl,etc). What is the
best way to get comfortable? Is there any particular direction I should be
heading? I never read a book from start to end, unless it's a novel, so
with other programming languages I've learnt the fundamentals, and the
bits and pieces here and there as needed. Database connectivity, web
(server based) apps are of interest as most work I do is related to these.
Current projects include pulling stats from a database (Postgres,mysql) in
python and, a web credit card payment system in php. Im also maintaining
one of our "legacy" systems in perl.
I have lots of time, and I want use doing something productive in java,
that is my aim.
Directions will be helpfull....
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Please Please Help!!WocBSe1QFHLRlEH2Ki+Gl8DIjHmu9wcQ
Hi all,
Dont know if this is the right place to submit questions. but i need
help :(
I need to convert this pl/sql function to java function so that i can
use it my jsp page.
FUNCTION countItem(adminUser IN STRING,
m_menu IN NUMBER)
RETURN NUMBER IS
cno NUMBER := 0;
CURSOR cAdminMenu(adminUser VARCHAR2 ) IS
SELECT M.menuid,G.pageid,M.description,G.name,G.url
FROM useraccess P, pages G, menues M, submenues T
WHERE P.userid = adminUser
AND T.menuid = M.menuid
AND T.pageid = G.pageid
AND P.pageid=G.pageid
AND G.publicaccess = 'N'
UNION
SELECT M.menuid,G.pageid,M.description,G.name,G.url
FROM groupaccess P, pages G, menues M, submenues T
WHERE P.grpid IN (SELECT GRP_ID FROM GROUPUSERS WHERE USR_ID =
adminUser)
AND T.menuid = M.menuid
AND T.pageid = G.pageid
AND P.pageid=G.pageid
AND G.publicaccess = 'N'
UNION
SELECT M.menuid,G.pageid,M.description,G.name,G.url
FROM pages G, menues M, submenues T
WHERE T.menuid = M.menuid
AND T.pageid = G.pageid
AND G.publicaccess = 'Y'
ORDER BY 1,2;
BEGIN
FOR t IN cAdminMenu(adminUser) LOOP
IF t.menuid = m_menu THEN
cno := cno + 1;
END IF;
END LOOP;
RETURN cno;
END;
I would really appreciate your help.
Regards,
Ayeda
- 2
- Eclipse 3.08 problemEclipse show not problems, it means when I write code must every time
rebuild to view compiler errors.
How it fix?
- 3
- Interested in ai project in java ??hi, anybody interested in long term artificial intelligence software
project to develop an intelligent bot for stock market trading in india
?, the project is to be implemented in java using the bea weblogic
application server platform on almost all paltforms
(windows/linux/solaris/bsd), with a capability of handling the trading
accounts of thousands of clients with their perferances. if u r
interested plz let me know. i will put all the project requirements and
tools and programming languages required for the project in my project
page at http://www.aistockbot.ravichoudhari.worldfreeweb.com after 22nd
jan 2k6. if u r interested then send me a mail at
email***@***.com.
- 4
- log4j - openning a new fileHi,
I need to open a new log file in a specific location in the code, how
can I do that?
Log file size and number of records are unknown so I cannot use this
information.
- 5
- Anonymous inner Classes accessing final variables?Hi
When a write an inner class inside a method , it can access the
variables in the enclosing method if and only if they are final ...
Why is the compiler enforcing this ??
What might be the reason for java doing this ?? Is it that these Local
Variables will be cached for Inner class usage ??
Thanks a lot in advance!
- 6
- JDK 1.5.0_05 won't load applets from the Internet?I'm setting up a new PC with a brand-new installation of Windows XP and
Fedora Core 3 (each with all the latest updates).
I'm having trouble with the Java plug-in: it won't load any applets
from the Internet (from the local filesystem works fine). I'm behind a
SOCKS v4 proxy; the browsers and DNS are configures appropriately and
surfing the net works fine, using Mozilla and IE under Windows and
using Mozilla under Linux -- but trying to load a page with an applet
just displays the pretty coffee mug image where the applet should be,
and when I try to leave the page, the browser hangs, presumably because
the JVM is stuck trying to download the applet.
I tried reconfiguring the gateway to use plain NAT, so I could take the
proxy out of the picture, but this did not fix things.
I never had problems like these with JDK 1.4.2.*, but with 1.5.0_05, I
just can't get it to work at all. Web Start doesn't work either -- just
sits there "checking for latest version" indefinitely.
I have Java configured to use the browser's settings; configuring the
proxy settings manually makes no difference. (Of course when I use NAT
on the gateway, there is no proxy involved at all, but that does not
work either.)
N.B. The applets themselves do not appear to be the problem -- I tried
some really simple ones, including samples from the Java Tutorial;
nothing even gets pulled across the network.
I'm hoping someone can shed some light on this -- I'm stumped!
Thanks,
- Thomas
- 7
- Java Developer - Oracle, UML, Spring, Hibernate -HOT HOT OPENINGSTitle: Java Developer - Oracle, UML, Spring, Hibernate
Company: Trinity Consultancy Services
Skills: Java Developer, Software Engineer, Java Programmer, Software
Developer, Software Programmer, Java Engineer, UML, Hibernate, Spring
- Java Developer, Software Engineer, Java Programmer, Software
Developer, Software Programmer, Java Engineer, UML, Hibernate, Spring
Trinity Consultancy Services is seeking applications from qualified
and experienced software engineers with above skills for various
requirements with their Clients.
Job description and Skills:
* Java Developer, Software Engineer, Java Programmer, Software
Developer, Software
* Programmer, Java Engineer, UML, Hibernate, Spring
* Java Developer- Oracle, UML, Spring, Hibernate
* 4+ years of Java experience
* Oracle expertise
* Knowledge of Spring and/or Hibernate and/or Tapestry
* UML experience
* Experience in creating database intensive applications from the
ground up
* Full life cycle software development
* Design and deliver complex web applications
Trinity Consultancy Services is a leading source of Information
Technology, Engineering and Management Experts that corporations of
all sizes turn to, from Global 2000 corporations to mid-sized and
small organizations nationwide. With the commitment to excellence, is
subtly managed to find, recruit, screen, submit and effectively
organize a technical workforce anywhere in the United States for
various Technical needs of corporation irrespective of its size.
Trinity Consultancy Services is one of its unique kind of the leading
information technology consulting services, and business process
outsourcing organizations committed for excellence.
Trinity provides business consulting, systems integration, application
development, staffing services and managed services to Global 2000
Corporations, medium-sized businesses, and government organizations
throughout the United States.
Trinity can mobilize the right resources, skills and technologies to
enable our clients to reach their dreams by enhanced performance. With
deep industry and business process expertise and broad global
resources, Trinity Consultancy Services is committed for excellence.
Please contact our Human Resource Manager Ms. Ann and send your
detailed Resume with your work authorization status, current salary
and expectations.
Mention the position you are applying in the subject line.
Email: email***@***.com
www.trinityconsultancy.com
- 8
- thread status jdk 1.3How can I know thread status with jdk 1.3?
It doesn't have thread.getStatus().
How can I do?
Thanks
Palmis
- 9
- Protected inner classes and inheritanceApologies if I am missing something obvious, but here's the situation. I have
a top-level class with a protected inner class. I have a second-level class
in a different package that extends the top-level class. For example:
package somePackage;
public class TopLevel
{
protected class Inner
{
protected int intField = 0;
protected Inner()
{
// constructor
}
protected void innerMethod()
{
return;
}
}
}
package somePackage.otherPackage;
import somePackage.TopLevel;
import somePackage.TopLevel.Inner;
public class SecondLevel extends TopLevel
{
public SecondLevel()
{
// constructor
}
public void someMethod()
{
Inner inner = new Inner();
inner.intField = 1;
inner.innerMethod();
}
}
When I compile the second class, I get at least 4 errors:
The type somePackage.TopLevel.Inner is not visible
The constructor TopLevel.Inner() is not visible
The field TopLevel.Inner.intField is not visible
The method innerMethod() from the type TopLevel.Inner is not visible
I thought I read the Java docuementation clearly when is says
"The protected modifier specifies that the member can only be accessed within
its own package (as with package-private) and, in addition, by a subclass of
its class in another package."
and
"You can use the same modifiers for inner classes that you use for other
members of the outer class. For example, you can use the access specifiers --
private, public, and protected -- to restrict access to inner classes, just as
you do to other class members."
If I simply make TopLevel.Inner a public class, the errors go away. But I
don't really want to do that... Anything obvious??
thanks
scott
- 10
- Reading data from a file using AntHi Everyone,
Im new to Ant and I am encountering some problems.
I have a text file which contains a value in there. I need that value
to be set into another file.
I tried using Javascript but Javascript does not support I/O for files.
Is there any command in Ant that can read a value from a text file (
eg. output.txt ) and then use that value to replace into another file (
eg. jsp ).
Thanks,
Marvin
- 11
- Instant dragging from JTreeHi NG,
I cannot drag an unselected element of a JTree. First I have to select
it, then I can drag it. Is there a way to implement that? I think I can
spare that extra click.
Best regards, Christoph
- 12
- Hiding table columns?Hi,
I'm no professional programmer, but I suppose I know enough about the
Table API to do most of the things I need. Now I'm trying to figure
out a good way to implement a functionality into my apps to toggle the
visibility of table columns.
I wonder if anyone here can provide some tips on how to handle this as
the TableColumn class doesn't seem to provide a setVisible() method.
All my tables use a TableModel, so I suspect that's where I need to do
most of the stuff. I'm thinking of setting up some kind of
two-dimensional array to hold the column names, and a visibility flag
for each column. In the TableModel methods I could then use that flag
to determine what columns and data should be processed.
Any help is much appreciated.
--
Luc Van Bogaert
- 13
- ANNOUNCE: Ice 2.0 releasedHi,
we've just released Ice 2.0 with quite a lot of new features:
- new language mappings for Visual Basic and Python
- a new light-weight and super-efficient firewall
- a streaming API that allows you to control the encoding and decoding of
objects in arbitrary formats (or the native Ice format)
- dynamic invocation and dispatch interfaces, so you can write generic
clients and server that do not require compile-time type knowledge
- new chapters in the documentation for the new features
- numerous other improvements and bug fixes
See http://www.zeroc.com/vbulletin/showthread.php?s=&threadid=987
for more info.
Cheers,
Michi.
- 14
- 15
- type Map does not take parameters ?Hi all,
I got a strange error message from the java 1.5.0 compiler:
"type Map does not take parameters" which Map certainly does.
The complete code was this mini class:
import java.util.*;
class AAA {
public static void main(String[] args) {
Map<Integer, String> map = new HashMap<Integer,String>();
System.out.println(map);
}
}
NB, it does not compile with the original compiler, but compiles happily
within an Eclipse 3.1 environment.
And it does also compile with the original compiler when I change the
reference type from Map to HashMap.
How can this be?
Yours,
Bu.
|
|
|