Need help for java and linux
Hi, guys,
I am being involved in a project.My current task is to build an interface using java. This interface will obtain some information from a linux-based software called NistNet, which is done by C and has GUI as well. My question is, can I use this java-based interface to obtain some information that is typed in this NistNet'GUI? If I can, how can I do that?
Any hint available?
Thanks!
You can bridge between Java and C using the "Java Native Interface" (JNI). There used to be a good tutorial on this site but it vanished for no apparent reason in some resent update, so try a websearch.
See also
http://java.sun.com/j2se/1.4/docs/guide/jni/
http://java.sun.com/j2se/1.5.0/docs/guide/jni/
Similar Messages
-
Need help for Update and cancel SalesOrder
Hi All,
I written java code for create sales order based on salesquotation,now i want to update and cancel sales order ,i need help to update and cancel salesorder.
can give any related links for update and cancel salesorder.
Thanks and Regards,
SrinivasHi srinivas.L
It is simple, here is some sample code. You must use getbykey to get the document. Then once you got it you can make whatever changes you need. Then update it. where i have oOrder.Update() you can have oOrder.cancel
Dim oOrder As SAPbobsCOM.Documents
oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
If oOrder.GetByKey(530) Then
oOrder.Lines.SetCurrentLine(1)
oOrder.Lines.WarehouseCode = "01"
If oOrder.Update() <> 0 Then
MsgBox(oCompany.GetLastErrorDescription)
End If
Else
MsgBox("Nothing found")
End If
Hope this helps -
Need Help w/ Java and Mozilla on SuSE 8.2
I am completely and totally new to Linux. Until not very long ago the only computer I ever worked with was MS. I'm running SuSE 8.2 Professional.
I used (after much trial and error) the rpm program to remove Mozilla 1.2 (which is installed by default). This is a machine at home so I have root access and regular access. I downloaded Mozilla 1.3 and installed that without a problem. I download j2sdk 1.4.1.02 (I'm pretty sure those are the numbers). I followed the instruction on how to install java and it appears to have worked correctly. I don't know how to test but there is now a directory called j2sdk1.4.1_02 which has several files and directories inside of it (including jre). I also followed the instructions and installed the java web start program.
Anyway, I've searched the forum for information that would explain how to make mozilla work on website that use java. Most of what I read was greek to me. But there was one that said I should copy the libjavaplugin_osi.so file into the mozilla plugins directory. I did that and when I looked at the "about plugins" page (from Help in Mozilla), it showed a lot of java files. But when I go to any pages that are using java, the page starts to load and then closes. This happened on about 6 different pages (all different web sites). So I think something went wrong. A friend had told me I'm going to have to make a "symlink" (which I don't know how to do). But he's on vacation and won't be back for 2 weeks.
Can anyone help?
Here are the directories where everything is stored. Oh, by the way, when I installed mozilla, java and javaws, I did all of it from the root account. If that was wrong, tell me and I'll fix it.
mozilla is in:
/usr/local/mozilla/
java is in:
/usr/local/java/j2sdk1.4.1_02/
javaws is in:
/usr/local/java/javaws/
Again, as I'm sure you can tell, I'm lost, totally new to linux, mozilla and java. So if you can help, please explain as clearly as possible.
Thanks in advance.Your friend is correct, instead of copying the .so file you should have made a symbolic link. To do that, first remove "libjavaplugin_oji.so" from "/usr/local/mozilla/plugins"; it's on the way. Then create the symlink with the "ln -s <source> <destination>" command, with your configuration it should be something like:
ln -s /usr/local/java/j2sdk1.4.1_02/jre/plugin/i386/ns610/libjavaplugin_oji.so
/usr/local/mozilla/plugins/
(you need to be root to do that)
To set up web start in mozilla, it might be easiest to go to the demo page and try to launch one of the applications:
http://java.sun.com/products/javawebstart/demos-nojavascript.html
When the "what should mozilla do with this file" dialog pops up, click on the "Advanced" button and make Mozilla handle it with the javaws application. Optionally remove the cross in "Always ask before opening .." -
Need help with JAVA and Listeners
Thanks to all the people who have been helping me so far. I really appreciate it. I have another question.
I am bulding a GUI where it will consist of buttons and textfields. I want the textfields to display data but also permit the user to interact, i.e. enter data into the textfield and then when the enter key is depressed my program will evaluate the data and determine to use it or throw a pop up error window. If the data is acceptable than that textfield will change accordingly and depending on the data might possibly update the two other textfields.
I know there is an ActionListener for JButtons and a MouseListener. Is there a Listener for the enter key? What would be a simple method to implement my logic? Thanks again! I really appreciate, hopefully I can become more fluent in JAVA!Swing related questions should be posted in the Swing forum.
enter data into the textfield and then when the enter key is depressed my program will evaluate the data and determine to use it Well, JTextField supports an ActionListener, which means an ActionEvent is fired when focus is on the text and and the Enter key is used.
However, what happens if the user uses the Tab key to move from field to field, then no event is fired and the Action Event is not generated. Maybe you can use an InputVerifier which will cause the text field to be validated when the text field loses focus.
Or, maybe you are talking about activating the "Enter" button when the enter key is pressed no matter what component has focus. In this case you should be using getRootPane().setDefaultButton(...);
Your need to clarify your requirement. -
Need help for Java Certification
Hello friends,
I am preparing for SCJP 1.4. Those who have passed this exam pl help in prepration. Which books I should follow and some usefull sites which can help in preparing for the exam.
I will appreciate any kind of help.
Thanks,
Regards,
Nitin GoyalHello friends,
I am preparing for SCJP 1.4. Java certification, what do you need it for?I hear it's a new requirement to become a cab driver in Jakarta. -
I need help for cloud and ios5
Help me for cloud and ios5
Sounds like I have a similar problem. I just updated iPad, and iPhone to iOS5. I synced these devices with my iMac on iCloud. Calendars and contacts synced just fine. However for some strange reason I can no longer sync any music on my 32 GB iPhone. iTunes is telling me that I am beyond the phone's capacity with an "Other" item that is nearly as large as my music collection. Am I missing something here? Your help will be greatly appreciated.
-
Hi,
I need help with my web application. When i tried to run it using
localhost:8080
it's giving me error that
signup.do file is not available.
can someone tell me what could be wrong with my code?
I want to know what is .do file and what needs to do to have remove the error
I have also used struts config file.
Please help me.
Message was edited by:
star4588See struts documentation here http://struts.apache.org/1.2.9/userGuide/building_controller.html#action_mapping_example
you should have something like that :
<action-mappings>
<action
path="/signup"
type="org.apache.struts.webapp.example.SignupAction"
name="signupForm"
scope="request"
input="/signup.jsp"
unknown="false"
validate="true" />
</action-mappings>in your struts-config.xml.
Hope That Helps -
Need help for ACL and NAT for VoIP
Dear experts
I configure my PBX server to work with one VoIP provider. When I put the server in blank network, mean that without VLANs.
The IP PBX server can register to the VoIP provider system normally and I can make call out and receive calls normally.
However, when I put the PBX behind the Cisco router with some configuration. The PBX cannot register with the VoIP provider system.
Eventhough I can receive calls from outside but can not make a call from inside to outside, because of the PBX cannot register.
Could you please help me to point out what is wrong with my Cisco router configuration.
Thanks a lot
Building configuration...
Current configuration : 1982 bytes
! Last configuration change at 17:18:27 UTC Mon Feb 24 2014
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname Router
boot-start-marker
boot-end-marker
enable secret 5 $1$ZJEF$8np0QvQTD1nTaOosa9yGW1
no aaa new-model
memory-size iomem 20
no ipv6 cef
ip source-route
ip cef
multilink bundle-name authenticated
crypto pki token default removal timeout 0
license udi pid CISCO2911/K9 sn FTX1603AH9C
interface Embedded-Service-Engine0/0
no ip address
interface GigabitEthernet0/0
description internal-LAN
ip address x.x.x.4 255.255.0.0
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
interface GigabitEthernet0/1.1
encapsulation dot1Q 11
ip address 172.x.x.1 255.255.240.0
interface GigabitEthernet0/2
description internet
ip address 50.x.x.93 255.255.x.x
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
ip forward-protocol nd
no ip http server
no ip http secure-server
ip nat inside source list 100 interface GigabitEthernet0/2 overload
ip nat inside source static udp x.x.x.8 5060 50.x.x.93 5060 extendable
ip route profile
ip route 0.0.0.0 0.0.0.0 50.x.x.94
ip route 172.16.240.0 255.255.x.0 x.x.x.5
ip route 172.16.242.0 255.255.x.0 x.x.x.5
access-list 100 permit ip x.x.0.0 0.0.255.255 any
access-list 100 permit ip 172.16.240.0 0.0.0.255 any
access-list 100 permit ip 172.16.242.0 0.0.0.255 any
access-list 100 permit udp any any range 5004 5090
access-list 100 permit udp any any range 10000 20000
control-plane
line con 0You really don't want to use NAT with SIP. Odds are it won't work. This is because SIP embeds hostnames/IP Addresses inside the packets, and standard NAT does not look inside packets.
If you want a NAT-type functionality for SIP, you need something called a session border controller. Look up Cisco CUBE
http://www.cisco.com/c/en/us/products/unified-communications/unified-border-element/index.html
https://supportforums.cisco.com/docs/DOC-17964
http://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-border-element/99863-cube-config.html
GTG
Please rate all helpful posts. -
Hi ppl,
i hav a code which has to do some actions on the strings retrieved from the database. The code is in java swings
I need to know, how do i check if there is a space between strings.
For eg Kevin Dcosta. (There is a space between Kevin Dcosta)
Please can someone provide me with the Java code for the same so tat i can append to my code. Or is there any readymade method in Java for the same??
Thanks
Divya..Hi,
Go thr StringTokenizer Class it will help u out!........place whatever string u r reading in pu those in stringtokenizer like
StringTokenizer str=new StringTokenizer(tmpmessage, " ");
while(readTokenizer.hasMoreTokens())
String name=readTokenizer.nextToken();
/****** do whatever the action u want to do*************8
} -
Hi all
I setup a router 2911 with the configuration below for the phone system inside handle all calls in and out from and to the outside provider VoIP.
I can receive the calls from outside all time but I cannot make the call from the inside to outside.
I think that I miss some configuration in router.
The 172.a.b.c is the IP phone system.
Please give me any advice
Thanks a lot.
The router configuration:
interface Embedded-Service-Engine0/0
no ip address
interface GigabitEthernet0/0
description internal-LAN
ip address 172.x.x.4 255.255.x.x
ip accounting output-packets
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
interface GigabitEthernet0/1.1
encapsulation dot1Q 11
ip address 172.16.208.1 255.255.240.0
interface GigabitEthernet0/2
description internet
ip address 50.x.x.93 255.255.x.240
ip accounting output-packets
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
ip forward-protocol nd
no ip http server
no ip http secure-server
ip nat inside source list 100 interface GigabitEthernet0/2 overload
ip nat inside source static udp 172.a.b.c 5060 50.x.x.93 5060 extendable
ip route profile
ip route 0.0.0.0 0.0.0.0 50.240.226.94
ip route 172.16.240.0 255.255.254.0 172.10.0.5
ip route 172.16.242.0 255.255.254.0 172.10.0.5
ip access-list extended VLAN-voice
access-list 100 permit ip 172.x.0.0 0.0.255.255 any
access-list 100 permit ip 172.16.240.0 0.0.0.255 any
access-list 100 permit ip 172.16.242.0 0.0.0.255 any
control-plane
line con 0
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
login
transport input all
scheduler allocate 20000 1000
endYou really don't want to use NAT with SIP. Odds are it won't work. This is because SIP embeds hostnames/IP Addresses inside the packets, and standard NAT does not look inside packets.
If you want a NAT-type functionality for SIP, you need something called a session border controller. Look up Cisco CUBE
http://www.cisco.com/c/en/us/products/unified-communications/unified-border-element/index.html
https://supportforums.cisco.com/docs/DOC-17964
http://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-border-element/99863-cube-config.html
GTG
Please rate all helpful posts. -
Hi i'm Alex and im having problems setting up my email and bbm on my blackberry curve 8520. i'm with orange as a dolphin plan and just wondering if any one can help set up my bbm and enterprise Activation Password.
Hello !
It seems you dont have BlackBerry Internet Service (BIS) Plan activated on your device.
Please contact your Service Provider for activating it.
Hope this resolves your Problem!
If your problem has been resolved then would request you to Click on "Like" and accept as "Solution" so that other Advisors doesnt invest their time on this Message anymore.
Thanks. -
Need Help for Java Homework Assignment, Can someone Please help me ?
This is the program that I am supposed to write, and I am terrible confused, as it takes at least 3 different files.
Write a class named GroceryList that representss a person's list of items to buy from the market, and another class named GroceryItemOrder that represents a request to purchase a particular item in a given quantity. (I.E. four boxes of cookies).
**The GroceryList class should use an array field to store the grocery items, as well as keeping track of its size (number of items in the list so far). Assume that a grocery list will have no more than 10 items. A GrocerList object should have the following methods:
public GroceryList()
Constructs a new empty grocery list.
public void add(GroceryItemOrder item)
Adds the given item order to this list, if the list is not full (i.e., has fewer than 10 items).
public double getTotalCost()
Returns the total sum of all grocery item orders in this list.
The GroceryItemOrder class should store an item quantity and a price per unit. A GroceryItemOrder object should have the following methods:
public GrocerItemOrder(String name, int quantity, double pricePerUnit)
Constructs an item order to purchase the item with the given name, in the given quantity, which costs the given pricer per unit.
public double getCost()
Returns the total cost of this item in its given quantity. I.E. 4 boxes of cookies that cost 2.30 per unit, have a total cost of 9.20.
public void setQuantity(int quantity)
Sets the grocery item's quantity to be the given value.
Any suggestions would be sincerely appreciated.
Thanks.Pete,
I having difficulty with the main class, and getting console to store a users input into a string array ... I will post the code that I have so far. Sorry I am trying real hard to learn ... and just having a frustrating time.
This is what I have in the main file.
import java.util.*;
public class Chapter_8 {
public static void main(String []args){
Scanner console = new Scanner(System.in);
System.out.println("Please enter the first item of your list");
String[]GroceryList = console.next();
System.out.println("Please enter the next item of your list");
String[]GroceryList = console.next();
System.out.println("How many would you like to buy?");
int quantity = consolenextInt();
}This is what I have in the GroceryItem Class file:
public class GroceryList{
public GroceryList(){
Static String []GroceryList ={"beans", "macaroni", "milk", "cheese", "bread", "eggs","hamburger","Hotdogs","peas","cookies"};
for(int i=0;i<5;i++){
System.out.println(GroceryList);
And the final file that I have is the GroceryItemOrder Class file:public GroceryItemOrder(String name, int quantity, double pricePerUnit){
this.name = name;
this.quantity = quantity;
this.pricePerUnit = pricePerUnit;
public double getCost(){
public void setQuantity(int quantity){
Sorry, I know it isn't much, that's why I am frustrated.
Thanks. -
Need help for Java Programming asap plzzzzzzzzzzzzz
Here is the work: (Im writing it coz I wasn't able to attach it)
Introduction
In geometry, a straight line is the shortest distance between two points.
A line may be characterised by its end points and its length.
A line connects the points P1 and P2.
The point P1 has coordinates {X1,Y1}.
The point P2 has coordinates {X2,Y2}.
The length of the line joining P1 and P2 is given by the equation:
{ (X2 - X1)2 + (Y2 - Y1)2 }1/2
Those of you who are familiar with geometry will recognise the equation as being the well known Pythagoras equation for the hypotenuse of right angled triangles.
Requirements
Develop a class specification for the class Point.
Write a short test program and test plan for this class.
For example:
//pointTest.java
main(...)
Point P1;
P1.create(24,16); // create a point with coordinates {24,16}
P1.display(); // display the {X,Y} coordinates of P1
Develop a class specification for the class Line.
Write a short test program and test plan for this class.
For example:
//lineTest.java
main(...)
Point P1 = new Point();
P1.create(24,16); // create a point with coordinates {24,16}
Point P2 = new Point();
P2.create(33,42); // create a point with coordinates {33,42}
Line L1 = new Line();
L1.create(P1,P2); // create a line using points P1 and P2
System.out.println( L1.length() ); // display the length of line L1
Line L2 = new Line();
L2.create(12,30,28,16); // create a line using coordinates {12,30}, {28,16}
L2.display(); // display the coordinates of both points and the length of the line
Application
We wish to determine the length of the boundary of any regular or irregular polygon .
The polygon may have up to 6 sides.
The user should be prompted to enter the number of sides and the coordinates of each vertex point.
The program should then calculate and display the total length of the boundary.
You should write an application to implement this using your Point and Line classes.
What I should have at the end
The following:
? A listing of the files Point.java, the class test program and results.
? A listing of the files Line.java, the class test program and results.
? The application program and results.
Note 1: All code must be written in java.Point P1 = new Point();
P1.create(24,16); // create a point with coordinates {24,16}That's a terrible idea. If that was actually in your requirements, then whoever wrote it should stop teaching Java right now.
We have constructors to initialize objects with sensible, meaningful values. Creating a new Point object without any values and then calling a "create()" method to set the values is a pretty stupid approach. Not only does it ignore the usefulness of a constructor, it also ignores the convention that methods called "create" should actually create something (and not just set values). -
Need help for coding and designing
Hi All,
Problem Statement
A financial institution is in the verge of automating their existing “customer data management” system. Currently they are maintaining their
customer data in a comma separated file (CSV) format. You, as a software consultant have been requested to create a system that is flexible,
extensible and maintainable. Your proposed system should also take care of moving the data from the old system to the new one.
Customer has following specific requirements
1.This is an internal offline application and need not be a web based solution
2.The new application should be cost effective
3.The application should have good response time as compared to the ones suggested by other vendors
4.Phase 1 work should concentrate mainly on building a simple system which moves the data from CSV to the new one and display the
moved data on the screen.
Sample CSV file containing customer data
<first name>, <age>, <pan number>, <date of registration>
Ramesh, 28, JWSLP1987, 30/01/2006
Rajesh, 32, POCVT2087, 23/10/2005
Shankar, 39, TRYUP3945, 24/7/2003
Shyam, 45 BLIWP5612, 15/3/2004
Requirements for coding DOJO
•Ensure that your solution is built around open source frameworks and tools to avoid licensing issues. (Ex: Eclipse, MySQL, etc)
•Please give me any idea to write code for this issue.
Thank you.
Edited by: user636482 on Oct 28, 2008 2:03 AMThe first requirement is to NOT use software like "Oracle".
The specifications are to use a CSV file as the "data source". The case asks you to "move" the data from CSV to "the new one" and display the moved data.
So this sounds more like a data load routine -- but not to load into Oracle.
You are in the wrong forum. -
Need Help For Java Card Development
I am a beginner in java card technology , I am working on a project in which i need to send some instructions to smartcard store in smartcard, i have created GUI in java swings, but don't how to start communication between java swings application and smart card . Please Guide me to Possible way. Thanks in Advance .
Hi,
what do you exactly wanna know?
The syntax of APDU sending to smart card and response or the way to communicate with card reader?
Also make clear if you wanna know about GP instruction (load, install, select,...) or calling methods of your applet on smart card
Regards,
Hana
Maybe you are looking for
-
Hi All, I have to design one dashboard of combination of diff Score card and Graphs. it's look like 6 tabs and per selection three scorecard and three graph for diff data. selection is look like ; Radio button 1: Current month / YTD / Annual Forecas
-
Problems with XP Home on Macbook Pro... please help!!!
I have had these issues on my new Macbook Pro 17" and had to spend hours on the phone with Apple (well actually my assistant did)installing XP Home. Now that it has been working a few weeks I have developed other issues. 1. My track pad sporatically
-
I didn't have a fire fox before and uses the IE only which work well for over 2 years but towards the end of 2010 encountered a new problem on my email on yahoo which i have never before known the problem happen like this: when i open my email on yah
-
when i go to itunes>preferences>advanced to set my file size setting for choosing what kind of file i want my song to be on import, i see no tab for import settings like before....... also checked itunes help and it didn't say it was in a different p
-
Transparent space on TitleWindow under clicked Button when TitleWindow is removed from PopUp.
Dear Forum, I'm having an issue. I'm using a title window with 2 s:buttons on it. Once I'm clicking on my left button that is closing this title window I'm getting this strange effect. For a fracton of second button disappears and I can what is under