|
Hi..
I am searching for java codes that uses JAVA NATIVE INTERFACE (JNI) for opening MSWORD 2003.
To be brief.
I created HTML form called Employee_data.
if i click on Submit button a word document should be opened.This should be using JNI.
I have also created a servlet in jsp to process the form data and store it into database(mysql).;
Please help me to find the codes to open MSWORD on submit click and to write the database entries into word file.Can i get the full code for that.This is so urgent.
Thanks in advance.
|
|
|
|
|
|
I m working for project in Java. It works like answering machine for telephone. But when all connection(modem, telephone)are done and after trying to run it shows Above screen.
Please tell me someone what is problem in connections.
Terminal is Physical endpoint of connection.
i'm confused it is argent
|
|
|
|
|
Hi,
I have to display UP and Down arrows in the JSP,in such a way that if the user selects the Up arrow then the selected row should move up and the above row should move down and the arrows displaying must change with respect to their positions.Like the first row sould come up with only DOWN arrow and middle rows with UP and Down arrows and last row with UP arrow.
Please can anyone help me out in solving.
Waiting for your replies..
Thanks.
|
|
|
|
|
Hi,
I have developed couple of java utilities (.jar) for java enabled mobiles.
1. Digit.jar
2. Muhurt.jar
These utilities are developed using J2ME SDK.
For more details and download these utilities please visit
Thanks,
Sandeep
modified on Thursday, April 24, 2008 1:31 AM
|
|
|
|
|
Hi,
It should be possible to get the scoll lock key status(ON or OFF) in javascript. any one help me out.
thanks in advance!
Have A Nice Day!
Murali.M
|
|
|
|
|
Like this:
scrollLockStatus=confirm("Please click OK if scroll lock is on, CANCEL if it is off.");
allwrong.wordpress.com[^]
|
|
|
|
|
First, I see that java isn't a topic of much discussion. Is there any place on CP that has real articles on java programming?
Onto my question,
I am semi-familiar with threads in java. At least with running a single one.
class whatever implments Runnable{
public void init(){
Thread t=new Thread(this);
t.start(); //starts(obviously) the thread, calling run()
}
public void run(){
//this is where the code in my thread goes
}
}
So what if you want two threads at the same time? Say...Thread t1 and t2. Because I don't see a way of differentiating the different run() functions once t1.start() and t2.start() were called. Any input on how to do this? Thanks
Chris
-- modified at 21:39 Wednesday 10th May, 2006
|
|
|
|
|
You probably figured this out by now
But just to keep this secret place alive:
class Thread1 implements Runnable
{
public void run()
{
System.out.println("Thread 1 running");
}
}
class Thread2 implements Runnable
{
public void run()
{
System.out.println("Thread 2 running");
}
}
class Program
{
public static void main(string[] args)
{
try
{
Thread thread1 = new Thread(new Thread1());
thread1.start();
Thread thread2 = new Thread(new Thread2());
thread2.start();
}
catch(Exception e)
{
System.error.println(e);
}
}
}
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
How to create a jar file
I’m new to java. I have created a jar file. When I run it by double clicking it, it displays a error message
Failed to load Main class manifest attribute from E:\Test1.jar
I do not know, how to create a manifest file .
Regards,
Chatura Dilan
|
|
|
|
|
|
Make sure the runtime environment has an information of which class within the JAR file is the application's entry point.
To indicate which class is the application's entry point, you must add a Main-Class header to the JAR file's manifest.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I'm new to java and i'm really struggling with this problem to the point of chucking my computer off the roof and burning it
I have to write a program to normalise some data, by getting the largest value in each column and dividing every other value by this so that the data is in the range [0,1].
example of data:
6, 148, 72, 35, 0, 336, 0627, 50, 2
1, 85, 66, 29, 0, 266, 0351, 31, 1
8, 183, 64, 0, 0, 233, 0672, 32, 2
1, 89, 66, 23, 94, 281, 0167, 21, 1
0, 137, 40, 35, 168, 431, 2288, 33, 2
5, 116, 74, 0, 0, 256, 0201, 30, 1
so say for the first column i would divide everything by 8.
I know i should put each column into an array then perform the calculations and then write it back to the file. i just have no idea how to code this. can anybody help please?
|
|
|
|
|
do you get to use java 5? if so it's easy. (sorry for the late post, since this board is dead I don't check it often) anyways, let me know if you still need help....
Brian Van Beek
Inside this room, all of my dreams become realities, and some of my realities become dreams. -Willy Wonka
Sports, geekdom, and all things else, on my blog![^]
|
|
|
|
|
I know this is a shot in the dark because there are only a few people that check this forum but here goes. I was wondering if anyone knew of a good table class that I could use in place of JTable. I see that Qwest has a good table that is part of there JClass, however I was looking for something that was free of charge. Does anyone know of any tables that I could use that would be free?
Thanks!!
We shouldn't assume something's debugged just because everyone in the whole world has access to the source code.
|
|
|
|
|
Hy
Use a DefaultTableModel. with this Model you can make changes.
Then put the DefaultTableModel int the JTabel Constructor. and finish. Now you can work on the Model like every other array and it will change on the gui.
See you
|
|
|
|
|
OMG, a java forum on Code Project... (first I thought is a usual joke,
a spoofed page or things like that, but I ended checking the hosting
domain and things like that, and now is clear).
Running out quickly...
|
|
|
|
|
haha.... some of us must still use java..... so I actually wish there was a link off of the message board pages. If more people knew about this board, and posted here. I would actaully be able to stay on Code Project all day, instead I now have to give my precious time to other web sites...ahhhh!!!
Brian Van Beek
Here's my boring blog! [^]
|
|
|
|
|
hey, HEY!, yeah you in the curly shirt. You forgot you coffee...
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
Have a LAN that my program runs on. I want it to broadcast out information so that any client
on any computer on the same subnet can receive it. The clients will have no idea what IP the
server is running on. I just want them to listen on a port. How do I go about this in a simple
way? If that's possible. The closes thing I've found is multicast but is that over-kill? Is
there a simpler way to do it than multicast?
Thanks,
Rex
I know you can't become if you only say what you would have done and you'll miss a million miles of fun." - Len
Work hard, play hard. Don't forget who you are and don't forget where you're from. Do all these things well and you won't have to wonder where you are going.
|
|
|
|
|
There are several divisions within any network solution. Multicast is a very efficient use of network infrastructure compared to broadcast. When you deal with multiple computers you can unicast to each in small numbers, but then as you said elsewhere you have to know your IPs and configure them appropriately.
Broadcast is the next step[^], which your network admit will kick your behind if you use it on a non-private network.
The design of a broadcast system has the clients listening to a port when the server broadcasts all computers receive the same message network-wide, even those not running your software. It's been ages since I did java broadcast, I do C/C++ right now, but my software still uses unicast/broadcast/multicast in different networks as appropriate.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Okay, that's about what I figured would be involved. Now I want to add the twist. In theory this works (in my head) what do you think? I'd like to bundle the program as one piece of code. If the server broacasts every 1 second then this is how I'd like to make the program run.
StartProgram{<br />
if(serverRunning)<br />
{<br />
assumeClientRole()<br />
}else{<br />
assumeServerRole()<br />
}<br />
<br />
serverRunning<br />
{<br />
ListenForServerWaitThreeSeconds<br />
}<br />
<br />
assumeClientRole<br />
{<br />
BeListenerAndListen <br />
}<br />
<br />
assumeServerRole<br />
{<br />
BeServerAndBroadcast<br />
}<br />
}
I know you can't become if you only say what you would have done and you'll miss a million miles of fun." - Len
Work hard, play hard. Don't forget who you are and don't forget where you're from. Do all these things well and you won't have to wonder where you are going.
|
|
|
|
|
About the only problem I can see is two computers starting software at about the same time. This produces a wait of three seconds of about the same time, network delays could make up for less than a second startup time. This may not be a problem as long as not tasks are started by autoscript.
I prefer a change in serverRunning to provide tertiary:
serverRunning
{
RequestServerIdentification
ListenForServer
if (replyfrom server) return true; // server online
RequestToBecomeServer
if (replyfrom server) return true; // deny server role, server online
VerifyServerRole
if (replyfrom server) return true; // deny server role, server online
}
It's somewhat overkill for most projects, however it also allows extension to design. For instance in a very important application you may want redundant networks with redundant servers. So one machine could be server on one network, another machine on the second network, all machines tie to both networks. This design allows you to make decisions based on that by validating server role by network. Even if a server exists on one network the server can ignore the request for server info on the other network thus allowing another machine to become server for that network. Once coded it's pretty easy to put logic in each decision process, and you have a double check in case one computer becomes the server while the other is going through the process. Time tagging time up in the message means that others receiving a time-online message longer than theirs drop out of the running for server, they see multiple machines vying for the server role and simply say a server exists because they see other clients trying to be promoted to server.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Yeah! I like that idea. Giving it a go now. Thanks for the advice that seems like a good way to go.
I know you can't become if you only say what you would have done and you'll miss a million miles of fun." - Len
Work hard, play hard. Don't forget who you are and don't forget where you're from. Do all these things well and you won't have to wonder where you are going.
|
|
|
|
|
code-frog wrote:
Yeah! I like that idea. Giving it a go now.
One other case you may consider, or not depending on app. I do redundant systems often, so the concept of computer failure is always on my mind.
Think on this scenerio:
You have a server, all is well.
Server machine dies, and comes back, this design allows it to return to being the server.
But what if the machine does not return. All clients are on the network, no one is the server. Do you declare the oldest client app as server afer x amount of time without a server?
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|