NEW TO HASHTABLE in java
HI all,
Am new to hashtable concept.I would like to know abt hashtables from the scratch.would like to read from theoritical point and write programs on hashtables....
can anybody help me in this regard(like....urls,materials to go thro as first step....).i shld b able to be through with hashtables with in 4 days.......
how to map...what is a key...what is the logis....everything shld b clear......at the end of 4 days.....
Thanks in advance
rose
http://java.sun.com/docs/books/tutorial/collections/index.html
Similar Messages
-
Calling New Function Module from JAVA ISA b2b
I need to call a new function module which accepts some parameters as input and
returns some result parameters back as output.
These returned value needs to be displayed on the JSP pages of ISA B2B applications.
Can someone please guide me and provide code snippet on how to do this?
Thanks in advance.
Points will be awarded for all relevant and helpful answers.Stride,
I did this on CRM ISA 4.0... I used the dev and extension guide as a basis - I think the ISA 5.0 guide has the examples and tutorials in a separate document that can also be downloaded from service.sap.com.
Heres some info on how to do it although I can't guarantee this is the full solution or that it will work the same for ISA 5.0, and I will probably forget a lot of stuff as its been a few years since I did it! I also cant guarantee it is the correct way to do it but it worked! Basically, we built a link into the order overview page to display urls to order tracking websites using an RFC on the backend CRM system. Hope it helps anyway.
1. Create RFC enabled function module in backend.
2. Edit file backendobject-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification:-
[code] <backendobject
xmlns:isa="com.sapmarkets.isa.core.config"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<configs>
<!-- customer changes in backendobject-config should be done here by extending/overwriting the base configuration-->
<xi:include
href="$
Template for backend object in customer projects
Concrete implementation of a backend object
This implemenation demonstrates how a backend object
is used to communicate with the CRM system
@see com.ao.isa.backend.boi.Z_AOFuncBackend#getOrderDeliveryTrackingData(java.lang.String)
Interface used to communicate with a backend object
The purpose of this interface is to hide backend implementation details
from the business objects
Returns a vector of Z_OrderDeliverTracking objects containing data to link
to external delivery tracking websites
@param orderNo The sales order document number
@return A vector of order tracking objects
@return
@return
@return
@return
@return
@param string
@param string
@param string
@param string
@param string
/modification/backendobject-config.xml#xpointer(backendobject/configs/*)"/>
<!-- This is an example customer extension. A new Backend Object is registered in the framework using XCM extension mechanism. -->
<!-- If you write customer extensions you should register your backend objects in the same way. -->
<!-- Please make sure that you use the correct base configuration (e.g. crmdefault for CRM or r3default, r3pidefault for R/3) -->
<config
isa:extends="../config[@id='crmdefault']">
<businessObject
type="Z_AO_Custom"
name="Z_AO_Custom"
className="com.ao.isa.backend.crm.Z_AOFuncCRM"
connectionFactoryName="JCO"
defaultConnectionName="ISAStateless"/>
</config>
</configs>
</backendobject>
[/code]
File com.ao.isa.backend.crm.Z_AOFuncCRM.java looks like this :-
[code] package com.ao.isa.backend.crm;
//jco imports
import java.util.Vector;
import com.ao.isa.backend.boi.Z_AOFuncBackend;
import com.ao.isa.businessobject.order.Z_OrderDeliveryTrackingItem;
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.JCO.ParameterList;
import com.sapmarkets.isa.core.eai.BackendException;
import com.sapmarkets.isa.core.eai.sp.jco.BackendBusinessObjectBaseSAP;
import com.sapmarkets.isa.core.logging.IsaLocation;
public class Z_AOFuncCRM
extends BackendBusinessObjectBaseSAP
implements Z_AOFuncBackend
// initialize logging
private static IsaLocation log =
IsaLocation.getInstance(Z_AOFuncCRM.class.getName());
/* (non-Javadoc)
public Vector getOrderDeliveryTrackingData(String orderNo)
Vector urlData = new Vector();
try
// get Java representation of function module
JCO.Function func =
getDefaultJCoConnection().getJCoFunction(
"Z_BAPI_CRM_ORDER_TRACKING_URLS");
// provide export parameters
ParameterList params = func.getImportParameterList();
params.setValue(orderNo, "ORDER_NO");
func.setExportParameterList(params);
// execute function
getDefaultJCoConnection().execute(func);
// get result table
JCO.Table table =
func.getTableParameterList().getTable("TRACKING_DATA");
int numRows = table.getNumRows();
for (int i = 0; i < numRows; i++)
// get row
table.setRow(i);
// create a new Z_orderdeliverytracking object
Z_OrderDeliveryTrackingItem trackItem =
new Z_OrderDeliveryTrackingItem(
table.getString(0),
table.getString(1),
table.getString(2),
table.getString(3),
table.getString(4));
urlData.addElement(trackItem);
trackItem = new Z_OrderDeliveryTrackingItem();
return urlData;
catch (BackendException bex)
// The following key has to be added to WEB-INF/classes/ISAResources.properties
// in order to see the exception correctly
log.config("ao.b2b.order.error.getOrderTrackingURLs", bex);
return null;
[/code]
And file com.ao.isa.backend.boi.Z_AOFuncBackend.java looks like this:-
[code] package com.ao.isa.backend.boi;
//package java.ao.com.ao.isa.backend.boi;
import java.util.Vector;
import com.sapmarkets.isa.core.eai.sp.jco.JCoConnectionEventListener;
public interface Z_AOFuncBackend
public Vector getOrderDeliveryTrackingData(String orderNo);
[/code]
Whilst file com.ao.isa.businessobject.order.Z_OrderDeliveryTrackingItem.java looks like this:-
[code]
package com.ao.isa.businessobject.order;
// Referenced classes of package com.sapmarkets.isa.businessobject.order:
// PaymentType
public class Z_OrderDeliveryTrackingItem // extends SalesDocument implements OrderData
private String deliveryDocNo;
private String goodsIssuedDate;
private String consignmentNo;
private String status;
private String url;
public Z_OrderDeliveryTrackingItem()
public Z_OrderDeliveryTrackingItem(
String delDocNo,
String GIDate,
String consNo,
String status,
String url)
this.setDeliveryDocNo(delDocNo);
this.setGoodsIssuedDate(GIDate);
this.setConsignmentNo(consNo);
this.setStatus(status);
this.setUrl(url);
public String getConsignmentNo()
return consignmentNo;
public String getDeliveryDocNo()
return deliveryDocNo;
public String getGoodsIssuedDate()
return goodsIssuedDate;
public String getStatus()
return status;
public String getUrl()
return url;
public void setConsignmentNo(String string)
consignmentNo = string;
public void setDeliveryDocNo(String string)
deliveryDocNo = string;
public void setGoodsIssuedDate(String string)
goodsIssuedDate = string;
public void setStatus(String string)
status = string;
public void setUrl(String string)
url = string;
[/code]
3. Edit file bom-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification :-
[code] <BusinessObjectManagers
xmlns:isa="com.sapmarkets.isa.core.config"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<!-- customer changes in bom-config should be done here by extending/overwriting the base configuration-->
<xi:include
href="$/modification/bom-config.xml#xpointer(BusinessObjectManagers/*)"/>
<!-- This is an example Business Object Manager. It can act as template for customer written Business Object Managers -->
<BusinessObjectManager
name="Z_AO-BOM"
className="com.ao.isa.businessobject.Z_AOBusinessObjectManager"
/>
</BusinessObjectManagers>
[/code]
File com.ao.isa.businessobject.Z_AOBusinessObjectManager.java looks like this:-
[code] package com.ao.isa.businessobject;
// Internet Sales imports
import com.sapmarkets.isa.core.businessobject.management.BOManager;
import com.sapmarkets.isa.core.businessobject.management.DefaultBusinessObjectManager;
import com.sapmarkets.isa.core.businessobject.BackendAware;
Template for a custom BusinessObjectManager in customer projects
public class Z_AOBusinessObjectManager
extends DefaultBusinessObjectManager
implements BOManager, BackendAware {
// key used for the backend object in customer version of backendobject-config.xml
public static final String CUSTOM_BOM = "Z_AO-BOM";
// reference to backend object
private Z_AOFunc mCustomBasket;
constructor
public Z_AOBusinessObjectManager() {
Method is called by the framework before the session is invalidated.
The implemenation of this method should free any allocated resources
public void release() {
Returns custom business object
public Z_AOFunc getCustomBasket() {
if (mCustomBasket == null) {
mCustomBasket = new Z_AOFunc();
assignBackendObjectManager(mCustomBasket);
return mCustomBasket;
[/code]
And uses file com.ao.isa.businessobject.Z_AOFunc.java which looks like this:-
[code]
package com.ao.isa.businessobject;
// Internet Sales imports
import com.sapmarkets.isa.core.businessobject.BOBase;
import com.sapmarkets.isa.core.businessobject.BackendAware;
import com.sapmarkets.isa.core.eai.BackendObjectManager;
import com.sapmarkets.isa.core.eai.BackendException;
import com.sapmarkets.isa.core.logging.IsaLocation;
// custom imports
import com.ao.isa.backend.boi.Z_AOFuncBackend;
import java.util.Vector;
Template for business object in customer projects
public class Z_AOFunc extends BOBase implements BackendAware
// initialize logging
private static IsaLocation log =
IsaLocation.getInstance(Z_AOFunc.class.getName());
private BackendObjectManager bem;
private Z_AOFuncBackend backendAOBasket;
Returns a reference to the backend object. The backend object
is instantiated by the framework.
@return a reference to the backend object
private Z_AOFuncBackend getCustomBasketBackend()
if (backendAOBasket == null)
//create new backend object
try
backendAOBasket =
(Z_AOFuncBackend) bem.createBackendBusinessObject(
"Z_AO_Custom");
// the backend object is registered in customer version
// of backendobject-config.xml using the 'Z_AO_Custom' type
catch (BackendException bex)
// The following key has to be added to WEB-INF/classes/ISAResources.properties
// in order to see the exception correctly
log.config("ao.b2b.order.error.getOrderTrackingURLs", bex);
return backendAOBasket;
This method is needed when a business object has a corresponding
backend object.
public void setBackendObjectManager(BackendObjectManager bem)
this.bem = bem;
Returns a vector of url links for tracking
@return vector of urls
public Vector getOrderDeliveryTrackingData(String orderNo)
// the call is delegated to the CRM aware backend object
return getCustomBasketBackend().getOrderDeliveryTrackingData(orderNo);
[/code]
4. Edit file config.xml in folder project_root\b2b_z\WEB-INF to add custom actions (the section below is just the custom stuff added at the end of the file the Z_orderTracking is the relevant one) :-
[code] <!-- Begin of custom AO action definitions -->
<action path="/b2b/Z_orderTracking" type="com.ao.isa.order.actions.Z_OrderTrackingAction">
<forward name="success" path="/b2b/order/Z_orderTracking.jsp"/>
</action>
<action path="/catalog/Z_displaySVGPage" type="com.ao.isa.catalog.actions.Z_SVGPageAction">
<forward name="success" path="/catalog/Z_SVG_fs.jsp"/>
</action> [/code]
Which points at Java file com.ao.isa.order.actions.Z_OrderTrackingAction.java which looks like this :-
[code] package com.ao.isa.order.actions;
// internet sales imports
import com.sapmarkets.isa.core.BaseAction;
import com.sapmarkets.isa.core.UserSessionData;
// struts imports
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
// servlet imports
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
// Internet Sales imports
import com.ao.isa.businessobject.Z_AOBusinessObjectManager;
import java.util.Vector;
This action acts as a template for customer extensions
public class Z_OrderTrackingAction extends BaseAction
This method is called by the ISA Framework when the
action is executed
public ActionForward doPerform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException
// get user session data object
UserSessionData userSessionData =
UserSessionData.getUserSessionData(request.getSession());
// gettting custom BOM
Z_AOBusinessObjectManager myBOM =
(Z_AOBusinessObjectManager) userSessionData.getBOM(
Z_AOBusinessObjectManager.CUSTOM_BOM);
// get the order number being processed
String orderDocNumber = request.getParameter("orderNo");
// pass the order number back to the page
request.setAttribute("orderNo", orderDocNumber);
if (orderDocNumber != null)
// Get a vector of delivery tracking objects from lower layers (Business Object layer =>
// Business Logic Service Layer)
Vector trackingTable =
myBOM.getCustomBasket().getOrderDeliveryTrackingData(
orderDocNumber);
String error = "";
if (trackingTable != null)
if (trackingTable.size() == 0)
error = "true";
else
error = "false";
else
error = "true";
request.setAttribute("errorMessage", error);
request.setAttribute("trackingTable", trackingTable);
return mapping.findForward("success");
[/code]
5. I added the call to the function module for page orderstatusdetail.jsp in folder project_root\b2b_z\b2b\order to display a custom page Z_orderTracking.jsp in the same folder. To do this I added a link into the HTML to call a JavaScript function that passed the current order number to the /b2b/Z_orderTracking.do actionhandler mapped in the config.xml file.
So, in summary! Create an RFC; define business managers for it in the XML files; create a new Strut action and supporting Java class; create all the Java class for the managers.
I hope this makes some sense!
Gareth. -
Any news or comment on Java to H.264
Is this forum of the used Forum on JMF?
I would like to hear more news and comments on Java to H.264? Any codec developed by anyone to this new standard? Is Java fast enough to run H.264 codec on moderate computer, like PC with P3 800Mhz? Anyway, the more information, the better.Do you know if somebody have already implemented java apis for H.264? I need to estract a video flow from MPEG-4 streaming coded with h.264.I'm also interested in purchasing that implementation.
Regards
Fabrizio Scimia -
Can someone explain the use of a hashtable in java?
can someone explain the use of a hashtable in java?
Hashtable allows us to store values along with keys.
One other advantage is, it provides Synchronised methods.
Hope you got it. -
Adding new method into String.java (just for personal usage)
For some reason, it kept bringing in the old String.class, even I updated it the rt.jar with the new String.class. I even checked it with jar -tvf rt.jar. It has the new String.class. However, it seemed to constantly loading in the old one. Unless I use bootclasspath. The followng is the test :
1. I add a new function to String.java
a. : goody() { return this is a test method; }
2. To compile:
a. javac -bootclasspath ".\;C:\Program Files\Java\jdk1.6.0_03\jre\lib\rt.jar" String.java
jar uf rt.jar java/lang/String.class
3. To test with file test.java where it calls String.goody()
a. To make sure it is not pulling in old code, I had to copy the new rt.jar to my test directory:
i. copy "C:\Program Files\Java\jdk1.6.0_03\jre\lib\rt.jar .\
4. compile my test.java:
a. javac -bootclasspath .\rt.jar test.java
5. Execute the jvm:
a. java -Xbootclasspath:.\rt.jar;.\; test
6. I got output : this is test method
=========================
if I use the regular : java classpath where the new classpath does indeed reside in, it claims the symbol not found. I have to copy the rt.jar to my local and use -Xbootclasspath. Suggestion? Or, this is really the only way to be able to call a new method installed in String.class?eproflab wrote:
a. To make sure it is not pulling in old code, I had to copy the new rt.jar to my test directory:
i. copy "C:\Program Files\Java\jdk1.6.0_03\jre\lib\rt.jar” .\That will not work.
You must replace it in the VM directory or use the bootpath options. There is no other way.
Note that you mess up with what you are doing (replacing the rt.jar way) that not only will you not be able to run, not even to get an exception, but you will not be able to compile either. -
How to launch a new JVM from a java class?
I want to update a runing java applicaton. Before updating it, I have to shut down this application and open a new JVM (launch another java class with main method inside another JVM). Then update this application. After updating, restart this application. How to do it?? Thanks. Gary
Hi!
I'm using an applet to upload a library in the ext directory and then opening another applet that uses that library...
If I manually upload the library the second applet works
but if I try to load it at runtime with the first applet the file is saved correctly but the second applet doesn,t work :((
the second applet works only if I close the browser and open it again...:((
I need to reaload the JVM at runtime or maybe opening a new one...
can anyone help me?
please reply me if you found anything similar,
ciao!
fabibu -
Mixing two mp3 files and generating new mp3 file in java
HI,
I have problem, I have 2 mp3 files I have some defined times for both file. On particular time i want to mix both mp3 file sound and generate new mp3 file by mixing audio from both files.
As i am new to mp3 in java , Please guide me from where should i start or any other good suggestion.
Thanks & Regards
AkhnukhThanks a lot for ur reply....
But my actual task is to mix two mp3 files and generate a new file where in i should be able to list the two mp3 files playing simultaniously......
So can u please help me in writing the j2me code for mixing of two mp3 files.....
Thank u very much
Navya -
hi I am new to Web Dynpro java, From where should i have to start
where can i find examples and documnets on web dynpro java.
regards
beardenrickHi,
Web Dynpro is the SAP programming model for user interfaces (UIs).
It provides a programming framework within which you can achieve a:
u2022 Clear separation of business logic and display logic
u2022 An application specification that is both:
Client neutral and
Backend neutral
It consists of a runtime environment and a graphical development environment with special Web-Dynpro tools that are integrated in the SAP NetWeaver Developer Studio
The Web Dynpro technology provides a development and runtime environment for Web applications and enhances classical Web development to build easily adaptable user interfaces. SAP's Web Dyn-pro technology closes significant gaps between typical Web development tools and the needs of cost-effective, responsive, easy-to-use, maintainable, and professional browser-based user interfaces for business solutions. Web Dynpro uses design principles similar to SAP's Dynpro technology, but it is a completely new technology geared exclusively towards Web applications. Its main features include the following:
u2022 Usability
u2022 Abstract modelling
u2022 Personalization and customization
u2022 Separation of presentation layers and business logic
u2022 Generic services
u2022 Portability
Web Dynpro applications run in the SAP Enterprise Portal.
See https://www.sdn.sap.com/irj/sdn/nw-ui for more information.
please refer this beloe link for web dynpro java.
Introduction to Web Dynpro Java?
Basics of WebDynpro ( What is WDPro? )
https://www.sdn.sap.com/irj/sdn/?rid=/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143
Sample Applications and Tutorials
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#32
More Links On Web Dunpro
The following links will give you introduction to Web Dynpro,Getting Started with Web Dynpro & WebDynpro Benefits
/thread/358673 [original link is broken]
/thread/353819 [original link is broken]
Tutorials and PDFs
Also see:
WEB DYNPRO?
what is webdynpro?
What is Webdynpro?
What is Web Dynpro?
Webdynpro Sample Applications and Tutorials
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
SAP WebAs Samples And tutorials
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143
Basic Webdynpro tutorials....
http://help.sap.com/saphelp_erp2005/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e9/1fc0bdb1cdd34f9a11d5321eba5ebc/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/d08342a7d30d53e10000000a155106/frameset.htm
http://searchsap.techtarget.com/searchSAP/downloads/SAPPRESS.pdf
Go through the following documents for step by step procedure for developing an application in wdjava.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a361a890-0201-0010-c0bc-8f16de527cde
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/efe7a790-0201-0010-7894-cfd79d02bb7e
the following document will give you some idea of webdynpro concepts
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a815cf90-0201-0010-8481-da495d68294c
The following document gives some introduction in nwds
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f637ae90-0201-0010-ccab-81f3ec35f85e
the following document will give you some idea of WAS concepts
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e1515a37-0301-0010-b2bb-99780cb4cafa
Check the following thread u can get lot of materials,
WeB Dynpro Documents
All Web Dynpro Articles
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7082f9fc-070d-2a10-88a2-a82b12cea93c?startindex=221
Refer these linkshttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20tutorial%20and%20sample%20applications.faq
Why WebDynpro ?
Why WebDynpro ?
Why webdynpro and not BSP or JSP?
What kind of applications are being developed with Web Dynpro?
http://www.sappro.com/downloads/OptionComparison.pdf
Developing Java Applications using Web Dynpro Configuration Scenario
http://www50.sap.com/businessmaps/8F5B533C4CD24A59B11DE1E9BDD13CF1.htm
Integrating Web Dynpro and SAP NetWeaver Portal Part 1: Creating Web Dynpro-Based Portal Content
http://www.octavia.de/fileadmin/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Tutorial_1.pdf
The Structural Concepts of Web Dynpro Components
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a048387a-0901-0010-13ac-87f9eb649381
Web Dynpro:Context Mapping & Model Binding
http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/presentations/14-Web_Dynpro_dataflow.pdf
Web Dynpro:Getting Involved
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c193252d-0701-0010-f5ae-f10e09a6c87f
Refer the following links also
1.Tutorials & Samples for Web Dynpro Java
2.https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60e5add3-8349-2a10-9594-bcb7d1b4bd2d
3.http://help.sap.com/saphelp_nw04/helpdata/en/80/c12041aa7df323e10000000a155106/frameset.htm
4.https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d599690-0201-0010-12bb-b9ea3ea32d22
5.http://help.sap.com/saphelp_nw70/helpdata/EN/dd/0e2a41b108f523e10000000a155106/frameset.htm
6.What is Web Dynpro? What is the use?
7.Everything you wanted to know about Web Dynpro but were afraid to ask, including...
Elearning Webdynpro For Java
https://www.sdn.sap.com/irj/sdn/ui-elearning
Articles On Webdynpro For Java
https://www.sdn.sap.com/irj/sdn/nw-ui?rid=/webcontent/uuid/4005b711-9f9b-2a10-ebae-a1c7ab7ed39d
Blogs On Webdynpro For Java
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/43
Wiki's On Webdynpro For Java
https://www.sdn.sap.com/irj/sdn/wiki?path=/x/iau
Documentation On Webdynpro
https://www.sdn.sap.com/irj/sdn/nw-wdjava
The following links will give you introduction to Web Dynpro:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/webcontent/uuid/8921447c-0501-0010-07b4-83bd39ffc7be
WebDynpro Benefits
The following link will give you basics of how to build applications in Web Dynpro:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/efe7a790-0201-0010-7894-cfd79d02bb7e
Following link is the comprehensive link for numerous tutorials on Web Dynpro from SDN itself:
Tutorials & Samples for Web Dynpro Java
Following are some threads where you can get links to practice examples on Web Dynpro:
/thread/358673 [original link is broken]
/thread/353819 [original link is broken]
Tutorials and PDFs
Also see:
WEB DYNPRO?
what is webdynpro?
Regards,
H.V.Swathi -
HT5568 Will the new update uninstall any Java applications I am currently running?
Will the new update uninstall any Java applications I am currently running?
Safari? Removing your existing Java applications? No. That won't happen.
What will happen is the Java run-time and the Java plug-ins that were part of Safari. You will be using the Oracle web site, and you'll be downloading and configuring and operating and managing the Java environment and the Java plug-ins for Safari and other browsers more directly, and usually with downloads from Oracle.
Apple deprecated Java a while back, and they're now finishing the work and the transition of support over to the folks at Oracle, and of securing OS X from attacks against stale versions of Java. -
Hashtable problem - java.io.NotSerializableException
I'm having trouble writing a hashtable out to a file. I know that the writeObject() method in ObjectOutputStream requires whatever it writes to be serializable, so I made the PlayerScore class implement serializable.. Now it gives "Not serializable Exeption: java.io.NotSerializableException: PluginMain" where PluginMain is the class that contains the hashtable. If I have it Implement Serializable I get the same error with what I would guess is a super class of mine named BotCore.
All the source is here: www.witcheshovel.com/WartsStuff/PluginMain.java
Here are what I believe to be the offending portions of the code:
private Hashtable<String, PlayerScore> scoreTable;
private void saveScores() {
try {
out.showMessage("Hash a a string: " + scoreTable.toString());
String scoreFile = getSetting("8. Score File");
FileOutputStream fileOut = new FileOutputStream (scoreFile);
ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);
Object scores = (Object)scoreTable;
//objectOut.writeObject(scores);
objectOut.writeObject(scoreTable);
objectOut.close();
fileOut.close();
catch (NotSerializableException a) {out.showMessage("Not serializable Exeption: " + a);}
catch (Exception e) {out.showMessage("Failed to save file with error:" + e);}
public class PlayerScore implements Serializable { //Class for keeping player scores
String playerName;
int longestStreak=0;
int totalCorrect=0;
public PlayerScore() {}
public PlayerScore(String name) {
playerName = name;
public void setTotalCorrect(int newCorrect) {
totalCorrect = newCorrect;
public void incTotalCorrect() {
totalCorrect++;
public void setLongestStreak(int streak) {
longestStreak=streak;
public void incLongestStreak() {
longestStreak++;
public String getName() {
return playerName;
public int getStreak() {
return longestStreak;
public int getTotalCorrect() {
return totalCorrect;
}Does it look like this:
class PluginMain
class PlayerScore implements Serializable
}If PlayerScore (or anything else you try to serialize) is an inner class it has a hidden reference to its containing class (i.e. PluginMain.this), so serializing it will try to serialize the containing class. You can make the nested class static, or place it outside the scope of the containing class. If it still needs a reference to the containing class put it in explicitly and make it transient, but you will have a problem at the receiving end. -
New error after recent java update on Mac
Hi,
We run a learning management system that uses LiveConnect to communicate between the elearning module and the LMS.
Recently all sorts of things started going wrong, around the time of the latest update.
I just tried it from my Leopard-OS imac running Safari 3.1.2
Learning modules will no longer launch, and the following errors show up in the console.
If I launch from Safari, I get:
Java Plug-in 1.5.0
Using JRE version 1.5.0_13 Java HotSpot(TM) Client VM
User home directory = /Users/ellenm1
network: Loading user-defined proxy configuration
network: Done.
network: Loading proxy configuration from Netscape Navigator
network: Done.
network: Loading direct proxy configuration
network: Done.
network: Proxy Configuration: No proxy
basic: Cache is enabled
basic: Location: /Users/ellenm1/Library/Caches/Java/cache/javapi/v1.0
basic: Maximum size: unlimited
basic: Compression level: 0
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@9444d1, refcount=1
basic: Loading applet/u2026
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@4ac216
basic: Initializing applet/u2026
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@9444d1, refcount=2
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@9444d1, refcount=1
basic: Starting applet
basic: Loading http://lmserver.com/pathto/apiadapter_lms.jar from cache
basic: No certificate info, this is unsigned JAR file.
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.adl.lms.client.DocentAPIAdapterApplet.initServlet(Unknown Source)
at org.adl.lms.client.APIAdapterApplet.init(Unknown Source)
at org.adl.lms.client.DocentAPIAdapterApplet.init(Unknown Source)
at sun.applet.AppletPanel.run(AppletPanel.java:380)
at java.lang.Thread.run(Thread.java:613)
liveconnect: Java: Obj is <org.adl.lms.client.DocentAPIAdapterApplet>
liveconnect: Java: method is <public java.util.Properties org.adl.lms.client.DocentAPIAdapterApplet.pingLMS()>
liveconnect: Java: method has 0 arguments.
liveconnect: JavaScript: caller and callee have same origin
liveconnect: JavaScript: default security policy = http://lmserver.com/pathto/docentisapi.dll/lms,APPSERVER01.ourserver.com,2151/SQN%3D-57596664/
Exception caught In DocentServletProxy::DoHACPRequest()
null
liveconnect: Java: Returning a nullWe're facing the same trouble, we have a very similar stack trace and the error occurs only with Safari v 3.2.1; no firewalls and no domains, the issue is related with this snippet of java applet code compiled against jdk v 1.4.12:
new PropertyResourceBundle(MyToolbar.class.getResourceAsStream("toolbar.properties"));
where the execution of getResourceAsStream throws a NPE.
"toolbar.properties" is a property file within the applet jar, the applet tries to acces such file with the execution of this line but fails.
This error happens with Safari and Google Chrome,
while it works fine with IE7, Firefox 2 and 3
the stacktrace contains the following lines:
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
hope someone can help
thanks,
Paolo -
Hi,
I am new programmer and have been assigned the task of replacing an old system with a new one . The old system was done using Access 97 VBA. Both the backend(database) and the frontend ( in Access VBA). It is basically a database system which, retrives information, does computation and all that.
Now we plan to change it with a server running linux , mysql database on the same server. I was thinking of doing the whole thing in Java . There will be like 45 people working on the system at the same time , some on the web .. which i plan to use JSP. I want most of the things to look the same so that people using it will not have too much trouble becasue they are used to the old system.
I just need to know if this a good idea ..
I would be very glad if someone could help me with this .. I don't want to make a blunder here ..
Thanks,
sdsouzaHi,
I think it's a gd idea... I would also like to take the chance to point out some issues that you might face during your development and some of my suggestions in solving them...
1) mySQL data types are not ez to use with Java... what i mean is data types like blogs...You must be very familiar with mySQL if you wanna use it...
2) JSP is web-based, Access is application-based. You might want to consider doing the whole application in Java instead of JSP.
3) How "expert" are your developers? JSP to me is kinda average.... You might face some problems during integration...
my 2 cents worth...
Best Wishes -
PLZ help me out i'm very new and confused to java
Hi~
I'm very new to java and I just brought a phone (Nokia 6670). It's capable of J2ME, as it says in the instrusction book, but I'm not so sure which Java to download. (THERE ARE SO MANY). Please help me out, I'm not sure what to do, since I'm putting games in Java.you want to develop your own game or just want to have some games on your new device?
your phone has java runtime already, and that's all you need to run java games .. you can download them from several locations
if you want to develop your own game then download Sun's J2ME Wireless Toolkit; also have a look at Nokia Developer's Suite and emulator for your device... -
Opening up a new browser window in java
So, i'm trying to open up a browser window to download the mac runtime for java, if the system is a mac. but because of microsoft not letting java to javascript communication i can't do it. anyone got any ideas?
thanks,
PeteHi,
you may check the platform in your applet with
System.getProperty("os.name"); and then open new browser window with
getAppletContext().showDocument(url_to_download, window_name);Regards,
Martin -
Problem with new-line-character and java.io.LineNumberReader under AIX
Hi folks,
I got the following problem: I wrote a little parser that reads in a plain-text, tabulator-separated, line-formatted logfile (and later on safes the data to a 2-dimensional Vector). This logfile was originally generated by an AIX ksh script, however, I copied it on my Windows machine to work with it (for I'm using a Java editor that runs under Win Systems).
For any reason, Windows, and what is worse Java too, seems not to recognize correctly the new-line character (in the API it is written that this should be a newline '\n' or a carriage-return '\r' or one followed by the other) that marks the end of a line in the logfile.
Also, when I'm opening the logfile with the "Notepad"-editor, this special character does not seem to be recognized, every line is inserted right after the other.
On the other side, when I open the logfile with the built-in editor in the CMD-Shell ("Dos-shell"), the newline chars seem to be recognized correctly.
But when start my parser on the AIX-machine the newline does not seem to be recognized correctly again.
I tried to read in the logfile with MS-Excel and safe it as a plain-text, tabulator-separated, line-formatted logfile again, with such files my parser works fine both on the AIX as it does on Windows.
Any ideas? Anybody got over the same problem already?
Greetz FKUnder windows, text files' lines are usually delimited by \r\n,
under Unix/Linux/AIX etc. \n
and under Mac \r.
I recommend to use the following editors, which are capable to handle files with Unix and Windows-styled line-delimiters or convert between these types:
Programmer's File Editor (PFE; available on Windows)
The Nirvana Editor (http://www.nedit.org/; available on Unix, MAcOS, Windows)
(BTW good old vim can handle that too. Transferring text files to windows in order to edit them, even using Excel for this purpose means your being a UNIX newbie, (I mean no offense by writing this) so vim is probably beyond your reach for the moment.)
Java normally assumes the platform's line delimiters where it is running, so if you transferred the file from Unix to Windows might be distrurbing.
Maybe you are looking for
-
Why can I no longer export images in Numbers to Excel?
Numbers 3.2.2 MacBook Air 1.3GHz i5; Memory 4Gb 1600MHz DDR3 OS X updated 24 September 2014 In previous versions I have been able to export images within the Numbers file to and Excel file. I was able to do this up to three weeks ago! Now when I ex
-
Image preview thumbnails fail to load
I open a folder full of tifs, they all render their thumbnails immediately, I open the folder within that and some render but the rest freeze. Why is this? On my old Windows machine the same folder all renders instantly, that machine is 4 cores and 8
-
Hi! What would be the easiest way to generate a simple password? We're implementing a "User-Login" - the login name is the users e-mail address. At the first time a new password is generated and then its send to the user so he can change it. So - how
-
Hi, I have a wifi + 3G iPad, I am visiting the USA from the UK and was wondering if I could purchase a AT&T 3G micro sim from an AT&T store or apple store so I can take advantage of the 3G network. Cheers
-
Scanner Sharing through Image Capture, 10.6.4
Just got a new G5 with 10.6.4, upgrading from a non-intel G5 running 10.5.8. Under 10.5.8 I could share our Art Department's Epson Perfection V600 Photo scanner with other Macs in our network simply by selecting the Sharing feature in Image Capture's