The Artima Developer Community
Sponsored Link

Java Answers Forum
How to run Real time java program on XP

7 replies on 1 page. Most recent reply: Aug 5, 2008 7:05 AM by hamid usofian

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 7 replies on 1 page
sidd shah

Posts: 3
Nickname: sidd
Registered: Jul, 2006

How to run Real time java program on XP Posted: Jul 16, 2006 11:42 PM
Reply to this message Reply
Advertisement
I m using XP professional. I m able to compile my real-time java program, but not able to run it. So if antbody have any idea how to run real-time java program please answer me as soon as possible.Thanking you...

-Sidd


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: How to run Real time java program on XP Posted: Jul 16, 2006 11:51 PM
Reply to this message Reply
java -cp . MainClassName

What exactly is you problem?

sidd shah

Posts: 3
Nickname: sidd
Registered: Jul, 2006

Re: How to run Real time java program on XP Posted: Jul 17, 2006 12:09 AM
Reply to this message Reply
Respected sir,

I have searched more than 3 days for java real-time packege and got the following link.

http://java.sun.com/j2se/1.5.0/download-netbeans.html
http://www.netbeans.org/kb/articles/java-rts.html

I have installed RTjava from the above link. According to that have set all paths and try different program but we are not able to run.
I can compile the programs without any error but every time we got following error at run time.

E:\class>java hello1
Exception in thread "main" java.lang.UnsatisfiedLinkError: registerNatives
at javax.realtime.RealtimeThread.registerNatives(Native Method)
at javax.realtime.RealtimeThread.<clinit>(RealtimeThread.java:26)
at hello1.main(Hello1.java:5)

I am not able to run any of the program so it may be case that some of the file is missing from the package.

Sir, I request you to help me for the same.

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: How to run Real time java program on XP Posted: Jul 17, 2006 1:08 AM
Reply to this message Reply
Looks to me like a classical "ClassPathNotSet" error.

Since you didn't specify any classpath the standard classpath is used.
Make sure, the jar files containing the "javax.realtime.RealtimeThread" class are in your classpath or in the ext dir of your runtime.

sidd shah

Posts: 3
Nickname: sidd
Registered: Jul, 2006

Re: How to run Real time java program on XP Posted: Jul 17, 2006 1:44 AM
Reply to this message Reply
Respected Sir ,

As u said i have already set CLASSPATH in which javax.realtime pakage lying . So I m able to complie my program but there is some error which comes at run time.Error is as follows.

Exception in thread "main" java.lang.UnsatisfiedLinkError: registerNatives
at javax.realtime.RealtimeThread.registerNatives(Native Method)
at javax.realtime.RealtimeThread.<clinit>(RealtimeThread.java:26)
at hello1.main(hello1.java:5)


Sir , have you any idea to solve this type of error?

Thanking You,
Sidd

Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: How to run Real time java program on XP Posted: Jul 17, 2006 6:22 PM
Reply to this message Reply
You get "UnsatisfiedLinkError" when there is a problem in linking to DLLs. Please make sure, you have also downloaded all DLLs that come with the real time packages and placed those DLLs in a folder that is in library path.

Thanks
Kishori

aki siren

Posts: 1
Nickname: akisiren
Registered: Jun, 2008

Re: How to run Real time java program on XP Posted: Jun 28, 2008 8:17 AM
Reply to this message Reply
hello. i have the same problem. is there any one to help me? pleas send a mail to me at 'akisiren@gmail.com".

very tanks.

hamid usofian

Posts: 1
Nickname: hrusofian
Registered: Aug, 2008

Re: How to run Real time java program on XP Posted: Aug 5, 2008 7:05 AM
Reply to this message Reply
hello .
I Have one problem in Real-time programs by Java.
I have install Netbean5 and Real-time module and then write this simple example :
//------------------------------
package rtj2;
import javax.realtime.*;


class Demo{
public static void main(String args[]){

AbsoluteTime oldTime, newTime;
RelativeTime interval;
try{
Clock clock = Clock.getRealtimeClock();
oldTime = clock.getTime();
oldTime = new AbsoluteTime(System.currentTimeMillis(),0);

System.out.println(oldTime);

Thread.sleep(1000);

newTime = clock.getTime();
System.out.println(newTime);
interval = newTime.subtract(oldTime);
}catch(InterruptedException e){
}
}
}
//-------------------------------------
if debug this project this message is appear:

init:
compile:
Compiling 1 source file to D:\Arshad project\J-proj\RT_Clock\build\classes
java.lang.NoClassDefFoundError: javax/realtime/Clock
Exception in thread "main"
Java Result: 1
debug:
BUILD SUCCESSFUL (total time: 2 seconds)

and if Run this project this message is appear and this program isn't Run correctly :

init:
compile:
Building jar: D:\Arshad project\J-proj\RT_Clock\dist\RT_Clock.jar
jar:
run:
FAILONERROR is false
TEST_MODE is false
EXECUTION_MODE is true
Deployment data missing. Set up a deployment profile in Tools/Java Platform Manager.
Remote session finished.
BUILD SUCCESSFUL (total time: 0 seconds)


please help me as soon as posible , to run real-time java programs in netbean5.
thank you

Flat View: This topic has 7 replies on 1 page
Topic: WHY is finding a JAVA/POS specialist so hard? Previous Topic   Next Topic Topic: trying to improve code to avoid java.lang.OutOfMemory error

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use