 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- FYI: A new open source/free O/R mapping tool and server page frameworkAnnounce:
A new open-source O/R mapping tool has just been released. There
are many such programs out there...but this one is very
special because it's simple (no xml configuration ! yay) and has
been tested extensively with postgres (and a bit with mysql).
This tool has been used in production enviroments so the
generated code has most bugs squeezed out by now.
If you have a minute, you can check it out at:
http://www.mollypages.org/dbo/
There's also a server-side page type thingy (like JSP) but with
much cleaner syntax (and easy typing).
Enjoy !
- 1
- Calling a C routine from .dllHi friends,
I would like call a C routine from Java program that is into a .dll
library. I don't know if this is possible and if so, how can I do it.
Thanks in advance!
Salvador Huertas.
- 4
- How to get mozilla to download a jar file?
I can download jar files without difficulty using Internet Explorer,
but Mozilla instead "displays" them (i.e. fills the screen up with
gibberish).
Does anyone know how to configure Mozilla to download jar files
and save them to disk?
Or is this a server-side problem? (FWIW, I noticed that the server
serving the jar files in question put "text/plain" in the Content-Type
field.)
TIA,
-Irv
- 5
- Dynamic page creation using swingHello,
I have created a user interface using swing which takes a file as input
from the user and has a button for submission purpose. Once the user
clicks on the submit button i want the file to be fed to a particular
server. How do i do this? Is there a way to use scripting languages
like Perl, JavaScript with swing?
Please give your suggestions.
Thanks,
nisha
- 6
- Need help creating a grid.Hello I am new to Java AWT/Swing and have a question.
I would like to create a 10x10 grid, where each "cell" can handle mouse
events. So if I click on cell with a coord A4 then it would change color.
I was thinking of using JButtons but I want the "cells" to look more like
Excel-like in appearance. I also found a component called JTable but I do
not think that it can handle mouse events. Any suggestions??
- 8
- JCheckBox problem Please helpHi All
My question is how to remove the border from inner rectangle of a
JCheckBox.
A JCheckBox has 2 rectangles,it is possible to remove the boder from the
outside one ,but what about the rectangle where the user clicks.(I am
referring this rectangle as inner rectangle)
Hoping a quick reply
Praveen
--
Message posted via http://www.javakb.com
- 8
- Bug#438188: RFP: schemaspy -- Graphical Database Schema Metadata BrowserPackage: wnpp
Severity: wishlist
* Package name : schemaspy
Version : 3.1.1
Upstream Author : John Currier <email***@***.com>
* URL : http://schemaspy.sourceforge.net/
* License : LGPL
Programming Lang: Java
Description : Graphical Database Schema Metadata Browser
SchemaSpy is a Java-based tool (requires Java 1.4 or higher) that
analyzes the metadata of a schema in a database and generates a visual
representation of it in a browser-displayable format. It lets you click
through the hierarchy of database tables via child and parent table
relationships. The browsing through relationships can occur though HTML
links and/or though the graphical representation of the relationships.
It's also designed to help resolve the obtuse errors that a database
sometimes gives related to failures due to constraints.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 9
- BZip2-Files & JavaOk two things:
I'm trying to get the Apache BZip2 Library to work, but I always get a
NullPointerException. My code looks like this:
[CODE]
void load(String filename) throws FileNotFoundException, IOException {
FileInputStream fis = new FileInputStream(filename);
CBZip2InputStream = new CBZip2InputStream(fis);
}
[/CODE]
As soon as the creation of the CBZip2InputStream is reached, a
NullpointerException is thrown. Why?
Secondly: if the library is corrupted (e.g. doesn't work stable) is
there an alternative to it (Googleing did not help me very much)?
Snyke
- 10
- Problem with RMI in LinuxI'm a newbie in the RMI programation.
I downloaded the sample code in Java tutorial in java.sun.com and
tried to compiled it. First, I compiled the interface class and was
going to compile the stub and skeleton. However, after typing "rmic -d
. engine.ComputeEngine" the following exception appeared:
ComputeEngine_Stub.java:40: error:Syntax error: found '{'
java.lang.Exception: exited with errorcode 1
at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
at java.lang.Throwable.<init>(Throwable.java:38)
at java.lang.Exception.<init>(Exception.java:24)
at kaffe.tools.compiler.Compiler_kjc.compile(Compiler_kjc.java:53) at
kaffe.rmi.rmic.RMIC.compile(RMIC.java:828)
at kaffe.rmi.rmic.RMIC.processClass(RMIC.java:91) at
kaffe.rmi.rmic.RMIC.run(RMIC.java:74) at
kaffe.rmi.rmic.RMIC.main(RMIC.java:53)
I'm working with the lastest version of jdk for Linux.
Can you help me please??????
- 10
- pushlet applicationHi
i am now involved in a telnet application.i am using struts frame
work for the application.using some jsp i have to display the contents
retrieved when a telnet connection is established.the program is
working fine for a single command.but if i have to supply multiple
commands then the connection with the action servlet should exist
forever.how is this possible? using some pushlet framework is this
possible? if anyone has any idea pls do tell me.Thanks in advance
- 11
- (WWW.CN-CIRCLE.COM) cheap wholesale prada Shoes,Customized Gucci Shoes,Lacoste trainers ,jordan 23 outlet shoes, and hoodies ,jeans.(WWW.CN-CIRCLE.COM) cheap wholesale prada Shoes,Customized Gucci
Shoes,Lacoste trainers ,jordan 23 outlet shoes, and hoodies ,jeans.
Nike Jordan Discount Shoes at (www.cn-circle.com)
Discount Jordan Basketball Shoes
Discount Jordan Sneakers
Discount Jordans Price Wholesale
Discount Jordan V
Discount Air Jordans
King James Discounts Jordans
nike wholesale distributors
customized nike "tennis shoes"
Cheap Jordan Sneakers
Cheap Jordans and Air Force 1s
online wholesale suppliers of air forces
(www.cn-circle.com) wholesale china
Air Jordans Wholesale Factory Direct
wholesale adidas china
wholesale nike sneakers by bulk
cheap kobe trainers
cheap trainers
(www.cn-circle.com) WHOLESALE JORDAN'S TENNIS
gucci tennis sneakers
Women Customize Air Force Ones
customized sneakers
China Wholesale Nike Sneakers Factory
cheap kobe trainers
Wholesale Custom Air Force One
Jordans Wholesale
Cheap Jordans Wholesale
Jordans Retro Wholesale
Air Jordans Wholesale Custom made Nike Dunks
Nike Shoes Wholesale China
Discount Jordans Price Wholesale
(www.cn-circle.com) Wholesale Nike Distributor
Wholesale Nike Sneaker
Wholesale Nike Air Force 1
Air Clear Force One Wholesale
Nike Air Force Wholesale
Buy Jordans Wholesale
(www.cn-circle.com) Wholesale Nike Tennis Shoes
Jordans Retro Wholesale
Cheapest Nike Web Wholesale
Wholesale Kid Jordans
Wholesale Nike Dunk
Authentic Jordans Wholesale
Nike Shoes Wholesale China
Wholesale Custom Jordans (www.cn-circle.com)
Air China Jordans Wholesale WOMENS NIKE AIR FORCES
Jordans Retro Wholesale
Air China Jordans Wholesale
Nike Air Jordan Wholesale
Wholesale Nike Distributor
Nike Golf Wholesale
Wholesale Jordans
Wholesale Nike Shox
Wholesale Basketball Shoes Nike
Air Jordans Price Wholesale
Jordans Kid Wholesale
Wholesale Air Force One And Jordans (www.cn-circle.com)
Jordans Shoes Wholesale
Wholesale Air Jordans
Air Jordans At Wholesale Price
Wholesale Nike Tennis Shoes
Nike T Shirt Wholesale
Air Force Jordans One Wholesale
Nike Shoes Wholesale Womens
Authentic Jordans Wholesale
Wholesale Air Force One And Jordans (www.cn-circle.com)
Discount Jordans Price Wholesale
Sock Wholesale Nike
Nike Wholesale Outlet
Wholesale Air Force One
China In Jordans Wholesale
Jordans Wholesale
Bulk Wholesale Air Force One
(www.cn-circle.com) Wholesale NIKE Sneakers from our Nike factory to
Nike shop & Nike
store,sale and Wholesale all of Nike stock Shoes,we have many type of
NIKE Sneakers :Nike discount Shoes,Nike cheap Shoes,Nike stock
Shoes(Nike Trainers, Nike Sneakers,Nike Running Shoes,Nike Basketball
Shoes,Nike Discount Shoes,Nike Cheap Shoes,footwear, Sports
Shoes)Nike
Shoes Wholesale sizes include:Nike men's Shoes,Nike women's
Shoes,Nike
mens Shoes,Nike womens Shoes, Nike men Shoes,Nike women Shoes,Nike
kids Shoes, Nike child Shoes.Nike discount Shoes,Nike cheap
Shoes,china Nike Shoes,Nike Shoes Wholesale,Jordan SHOES,Air Force
one
1s,Nike Shox,Nike shoe Air max wholesale price.china wholesale
sneakers Nike celebrates 25 birthday of Air Force Ones BUY SELL NIKE
SHOX JORDAN MAX TIMBERLAND AIR FORCE PRADA TN PUMA
red monkey evisu bapes bathing ape lrg clh jeans hoodies shoes
sneakers wholesale,jordans and nike from china
authentic jordans wholesale
Our webside: www.cn-circle.com and http://nikesneakertrade.photo.163.com
- 13
- JSP listing bean propertiesIs it possible to list all Java bean properties with JSP tag?
When some java bean component is chosen than new jsp site must appear with
his properties, events...
- 14
- Using Unicode symbolsI'm trying to use some of the "Miscellaneous Symbols" from the Unicode
character set in a program but getting absolutely nowhere. Can someone
please point me in the right direction for starters?
Thanks
Jim
- 15
- byte data typehello,
I am confused with byte data type. I want to know how following code
gives result as -12?
byte b = (byte) 0xf4;
System.out.println("b=" +(byte)b);
regards,
rahul
- 15
|
| Author |
Message |
Bala Shanmuga Priyan

|
Posted: 2007-3-7 1:23:00 |
Top |
java-programmer, TCP protocol in Java
Hi all,
I would like to know is it possible to implement a transport
layer protocol such as TCP in java. Although its available in java.net
package, i like to create my own. Also is there any detailed
explanation for source code of java.net package.
Thanks in advance
|
| |
|
| |
 |
Christian

|
Posted: 2007-3-7 2:07:00 |
Top |
java-programmer >> TCP protocol in Java
Bala Shanmuga Priyan schrieb:
> Hi all,
> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own.
You can implement your own transport protocol by utilizing UDP .. UDP
gives you basically the Network layer and has nearly no data on
Transportlayer. Forming your own packets directly may not be allowed
based on what OS and what userrights you have, so there is no
implementation in java.
> Also is there any detailed
> explanation for source code of java.net package.
>
> Thanks in advance
>
|
| |
|
| |
 |
Chris Uppal

|
Posted: 2007-3-7 2:47:00 |
Top |
java-programmer >> TCP protocol in Java
Bala Shanmuga Priyan wrote:
> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own. Also is there any detailed
> explanation for source code of java.net package.
If you don't want to layer over UDP (as Christian has already suggested) then
you should be able to do it using a Java wrapper for the pcap library (pcaplib
or WinPcap).
I don't know whether pcap has Java wrappings available yet for sending packets
yet. I not then you'd have to write your own -- but in comparison to
designing, implementing, and testing, a transport-layer protocol, that should
be a doddle ;-)
-- chris
|
| |
|
| |
 |
Arne Vajh鴍

|
Posted: 2007-3-12 11:13:00 |
Top |
java-programmer >> TCP protocol in Java
Bala Shanmuga Priyan wrote:
> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own. Also is there any detailed
> explanation for source code of java.net package.
Java does not support raw sockets so you would need
to do something in C++ and use JNI.
Maybe look at http://www.savarese.org/software/rocksaw/ !
If it is for a real world problem: forget it and
focus on the higher level problems.
Arne
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- JTable Header / CustomHi,
I'd like to change the L&F of the JTable Header but I'm not sure how to do
this.
Basically, I want the header columns to look flat instead of raised, with a
custom background color.
Thanks for any Tips.
WT-
- 2
- Announcement: Release of (X)Emacs CC Mode 5.31Release Announcement
CC Mode Version 5.31
Martin Stjernholm, Alan Mackenzie
This message announces the availability of a new version of CC Mode,
an Emacs and XEmacs mode for editing C (ANSI and K&R), C++,
Objective-C, Java, CORBA's IDL, Pike and AWK code.
A list of user visible changes is detailed in the NEWS file and in the
URL listed below. More information, including links to download the
source, are available on the CC Mode web page:
<http://cc-mode.sourceforge.net/>
Send email correspondence to
email***@***.com
For a list of changes please see
<http://cc-mode.sourceforge.net/changes-531.php>
--
Alan Mackenzie (Munich, Germany)
Email: email***@***.com; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
- 3
- retrieving CPU Usage and Memory Usage information in JAVAHi All,
I 've been searching through this group for information on CPU and
Memory usage retrieval on Windows machine using JAVA. After following
so many previous threads on the same subject, the possible solution I
've observed was using JNI calls to native libraries for these OS
specific information retrieval.
Later I found that java management libraries already has it, native
libraries and some jmx classes.
Sharing the code, hope this may help group members in their
requirements.
Code:
com.sun.management.OperatingSystemMXBean mxbean =
(com.sun.management.OperatingSystemMXBean)
ManagementFactory.getOperatingSystemMXBean();
System.out.println("********* CPU & MEMORY USAGE OF \\harsh
*********");
System.out.println("OS : "+mxbean.getName());
System.out.println("Available Processors :
"+mxbean.getAvailableProcessors());
System.out.println("Commited Virtual Memory :
"+mxbean.getCommittedVirtualMemorySize());
System.out.println("Free Physical Memory :
"+mxbean.getFreePhysicalMemorySize());
System.out.println("Free Swap Space Size :
"+mxbean.getFreeSwapSpaceSize());
System.out.println("Process CPU Time : "+mxbean.getProcessCpuTime());
System.out.println("Total Physical Memory Size :
"+mxbean.getTotalPhysicalMemorySize());
System.out.println("Total Swap Space Size :
"+mxbean.getTotalSwapSpaceSize());
Problem:
getProcessCpuTime() method returns the CPU time used by the process on
which the Java virtual machine is running NOT the '%CPU Usage' time
which i was hoping to get.
If anyone is having idea about how to obtain '%CPU Usage' of windows
machine using java program, kindly post the message.
Regards,
- 4
- static hashtable with conent?Did not find out the answer after some google:
how can we create a static hashtable with some initial values there?
static Hashtable ht = new Hasthable();
will only create a empty one. Suppose I want to put some Integer
values as keys and values of this hashtable, how can I do that?
The reason for it is that I am writing a "utility" class, with all the
functions as static. These functions will need to check a fixed
hashtable for some operations.
Thanks a lot. :-)
- 5
- Offset not calculated properlyI'm trying to move a second window so that it is directly above another,
hugging it closely. I'm using the below code, but for some reason, its not
always consistent.. sometimes my second window falls just below the title
bar, sometimes its pretty far below the title bar.
void resetPositionComboTD()
{
Point loc = this.getLocationOnScreen();
int newY = loc.y - sw.getHeight();
int newX = loc.x;
sw.setLocation(newX, newY);
}
I tried playing with insets, but no matter what I did, it didn't seem to
help much (or at all)
Any help is appreciated, I'm driving my self nuts with this
- Craig
#! rnews 572
Xref: xyzzy rec.autos.makers.mazda.miata:150315
Newsgroups: rec.autos.makers.mazda.miata
Path: xyzzy!nntp
From: "Xavier" <email***@***.com>
Subject: Any Mazda3 owners around here?
X-Nntp-Posting-Host: e165148.nw.nos.boeing.com
Message-ID: <email***@***.com>
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Msmail-Priority: Normal
Lines: 3
Sender: email***@***.com (Boeing NNTP News Access)
Organization: The Boeing Company
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
Date: Fri, 4 Mar 2005 00:15:29 GMT
Great car...
- 6
- How to let a user put objects in a scene?x-no-archive: yes
Hello, all.
I'm about to write a 3D-editor for neuronal morphologies.
Picking in existing morphologies works, now I'm trying to get it
to enable an user to interactively create and place new objects
in the scene, thus building new models from scratch.
When clicking at the Canvas3D, I receive 2D-coordinates, as expected.
But for placing a new object, I'd obviously need 3D-coordinates.
Is there any way for me to have the objects appear at a "somehow
reasonable" depth regarding any existing morphology? It does not
necessarily have to be the exactly correct placement, since the user
will be able to adjust it after it has been created.
But in most cases one will of course want to add a new object close
to an other.
I could imagine to create any new object in a given distance to
the near clipping plane (or just half the distance 'tween the near
clipping plane and the model itself) as a quick hack.
Is there any better way to solve this?
Can one somehow determine the SGO that is closest to where the
MouseEvent occurs /without/ picking? Picking (of course) only works
when clicking on SGOs that are already present.
In my case, I'd have to calculate some position in 3-space without
the picking engine, since I've got nothing to click on, but the raw
Canvas3D.
Thanks in advance for any answers.
Regards,
Andr?
- 7
- Embedded DB or XML storage optionsHi,
We are trying to determine what is the best storage method for our
application. We are partial to XML and would prefer a solution based on
this format.
Or maybe going from an RDBMS, like this one:
http://hsqldb.sourceforge.net/ to XML (through a Save operation or
Export) is a better choice for speed? (storing XML data on the fly is
probably slower then RDBMS?).
Any suggestions would be appreciated.
Thanks,
-Justin
- 8
- IBM human resources may be stealing from youIf you are a minority at IBM check your credit cards carefully, IBM human
resources may be stealing from you. I found $370 of charges on my card, it
was done by human resources and it took me 5 months to get it back
- 9
- null pointer at run timeWhen I run my program the first time, the cookie must be a null.
So, for the following statement, why I will get null pointer exception at
runtime? How can I fix it?
if(cookie.getValue()!=null){
...
}else{
...
}
Thanks
- 10
- Hotkeys questionAll,
I am currently looking at doing the following. Using a JtextArea/field
create a box that will allow the users to enter hotkeys/shortcut keys.
When you click the box it will only take in the key pressed and display
that (e.g. if you press "a" A will appear, if you press crtl, alt,
shift and b "Crtl + ALT + SHIFT +B" would be displayed.
Does this class exist already (GPL pref).
Ta
Jaj
- 11
- I am interestedHi My name is Mike and I am interested in the field of Computer
Science.
I want a career in this field and I am wondering do you have any
helpful hints or words of encouragement for me at this point in time.
I know a little bit about this subject, but I could always use some
help, so if you can help me please do so. Email me back with your
ideas and thoughts of this matter.
Thank you and I greatly appreciate it.
Michael
- 12
- Servlet-to-JSP using Tomcat 4.1Im running Tomcat 4.1 with JDK 1.4.2 on Win XP SP1
I have made a simple database search page (using MSAccess) that fetches
records using jdbc odbc drivers.
A servlet does the database processing, puts the finished search results
into a vector (each result is represented by a javabean) and i use the
following code in doPost():
session.setAttribute("results",l_vecTmp); // l_vecTmp is the vector
ServletConfig sc=getServletConfig();
ServletContext sx=sc.getServletContext();
RequestDispatcher rd=sx.getRequestDispatcher("/results.jsp");
rd.forward(req, res); //the 2 params are the standard httpservlet request
and response objects that were passed to the servlet
In the JSP, I use the following code:
<%! int i;
Vector l_vecTmp;%>
<%! SearchResultBean l_srb;
int l_iSize=l_vecTmp.size(); %>
<% try
{
l_vecTmp=(Vector)request.getAttribute("results");
}
catch(Exception e)
{
e.printStackTrace();
}
%>
The directory structure is as follows-
Location of results.jsp:
<tomcat-root>\webapps\studentsearch
Location of servlet:
<tomcat-root>\webapps\studentsearch\WEB-INF\classes
When I run the application, I get a JasperException in the servlet, at the
requestdispatcher line.
Does it mean the servlet cant find the JSP?
Do i have to add the JSP to the web.xml deployment descriptor?
ANy help appreciated
Rex
- 13
- JDBC QuestioComing from the world of VisualBasic, I'm not find Java too hard to catch on
to. After just a couple of weeks of real coding, I'm even cranking out some
code to access a MySQL database. I've got something of a conceptual hill to
jump over, and that's about the Statement class. In VB, I'm used to using
ADO, and just opening a connection and then running queries against it
(either record sets or update-style queries). Is it just the case that any
code I'm translating I just need to insert the lines dealing with the
Statement class, and that's it? What is the purpose of Statement?
--
Aaron Clausen
email***@***.com
- 14
- tomcat 5 and apacheHi all;
Can anyone point me to the documentation for getting Tomcat 5 to work with
Apache? I have just gotten Tomact running on my test server (RH Linux 7.3),
Apache's there also. I Can't find the Docs on the jakarta site. The links
that come with tomcat point to the download page. All the documentation I
can find is about Tomcat 4. Is Tomcat 5 too new to use? Am I losing my
mind? Perhaps.
- 15
- Fixing and Continuing feature for Java IDE?I read that NetBean have it, I try simple main code:
public static void main(String[] args) {
// TODO code application logic here
int a=3;
a=9; <<<<<<<
}
I try to change the Value assignment to "a" at last line. and I realize
that no way to execute this line again. in short no way to step
reverse. so for this cases we need to change current value in watches
window and change the source code for next run. it's true?
but what we can do if have a complicate algorithm and have fix with
some parameters, how we suppost to use with this featurse?
I read about stack call, but I try this code:
static int aa(){
return 6;
}
public static void main(String[] args) {
// TODO code application logic here
int a=3;
a=9;
a=aa();
a=5;
}
but the call stack on run menu stil grayed and not available. and bad
from this, the debugger point to wrong line when i step into aa()
function?
Have some one to help? or have another group for NeBean
Maybe have some another IDE with this feature?
thanks
|
|
|