How to compile the java code into machine execution code?
Does anyone can tell me how to compile java code into machine execution code on specific OS platform such as Windows2000 , UNIX �Ketc.
Thanks a lot !
Hi SIR
It is very kind of you to give me so great informatin!
Thanks a lot!
Caton
Similar Messages
-
How to compile the Java classes generated in JAXB
I am using Windows 2000 Operating System. I found a xjc
batch file on the sun's java forum.
I used that to generate classes from XML. After generating
the classes I could not compile
the classes each depends on other AND THEY REQUIRE BOTH
CLASS FILES.
I will attach the schema file and dtd . Can you explaine me the problem.
#<transactions.dtd>
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT transactions (cardtocard*)>
<!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
>
<!ELEMENT tocard (#PCDATA)>
<!ELEMENT fromcard (#PCDATA)>
<!ELEMENT fromcardver (#PCDATA)>
<!ELEMENT amount (#PCDATA)>
<!ELEMENT transdate (#PCDATA)>
<!ELEMENT transid (#PCDATA)>
transactions.xjs
<xml-java-binding-schema>
<element name="transactions" type="class" root="true"/>
<element name="cardtocard" type="class"/>
</xml-java-binding-schema>
XML file
?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
<transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
<cardtocard>
<tocard>1111222233334444</tocard>
<fromcard>6666777788889999</fromcard>
<fromcardver>567</fromcardver>
<amount>100.00</amount>
<transdate>2002-06-04 00:00:00.000</transdate>
<transid>1111222202</transid>
</cardtocard>
</transactions>
the XJC compiler for windows is
@echo off
echo JAXB Schema Compiler
echo --------------------
if "%JAVA_HOME%" == "" goto errorJVM
if "%JAXB_HOME%" == "" goto errorJAXB
set JAXB_LIB=%JAXB_HOME%\lib
set JAXB_CLASSES=%JAXB_HOME%\classes
echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
%JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
goto end
:errorJVM
echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.
echo For example:
echo set JAVA_HOME=c:\jdk1.4.0_01
goto end
:errorJAXB
echo ERROR: JAXB_HOME not found in your environment.
echo Please, set the JAXB_HOME variable in your environment to match the
echo location of the JAXB installation directory.
echo For example:
echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
:endWhen you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!
-
How to pass the java object into the spring controller
Hi Friends
When I hit the url at the first time my call goes to the spring controller and sets the userDetails objects in the modelAndView.addObject("userDetails", userDetails.getUserDetails()) and returns the userDetails.html page. if I click any link in the same page i want to pass same (userDetails) object thru javascript or jquery and calls the another(controller) method and returns the same (userDetails.html) page.
It means how can i pass the java object thru javascript or jquery and calls the controller. if i get the same object in my controller i can avoid calling the db again. please help me out to resolve this issue. i am tired of fixing this issue.
Regards
Sherin PoojaIf you want to avoid calling the database again then cache the data.
However before you do that make sure that calling the database, in the context of YOUR system, is going to be an actual problem.
For example there is absolutely no point in caching a User object when only one user an hour is actually using the system. -
How to compile the DB lookup code for XI:
Dear All,
i am very new to java and XI. Please let me know how to compile a Java Code for DB lookup and put in the imported Archive in IR. is there a seperate way to do it? Please guide me step by step. for performing Communication channel DB lookup.
I have gone through the Communication channel lookup of siva,
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
but i am not understanding how to compile the given code in Advanced user functions area without any mandetory .jar files and header files. and put it into XI .
please guide me.
I mean i use a jdk1.4.2 Compiler as my XI server has 1.4.2 compiler.
Regards,
prakash
Edited by: senthilprakash selvaraj on Jun 17, 2008 4:03 AM
Edited by: senthilprakash selvaraj on Jun 17, 2008 4:04 AMHi,
You don't have to worry about compliation. XI will automatically comple it when you create the udf, activate it and test your mapping. In case of any error it will give compliation error there itself.
Regarding all the mandatory jar files which are required for compilation is already available in XI server.
If you are using any third party libraries(jar files) you just need to add the jar file in your external definition and need to import the necessary packages in User Define Function. I hope it answers all your questions.
Thanks
Amit
Reward point if answer is helpful -
How to copy the table1selected records into table 2 in webdynpro java.
Hi
how to copy the table1selected records into table 2 in webdynpro java.
venkat
Edited by: venkatpvr on Sep 23, 2011 11:53 AMHi Venkat,
You have 2 Value Nodes one for Table1 and second for Table2.
Table1 node having one more Value Attribute i.e check Box data type is Boolean. Now you are requirement are select records from Table1 Node and click on One Method that records will moves to Second Table2 Node.
Create One Method for getting the Records from 1-Table to 2-Table
CopytoTable2 ()
In this method you have to write code like this
If (wdContext.nodeTable1.Checkbox(true))
If(1. Check the Table1 Value Node Size()>0)
Get the Table1 records and set to table2 Value node.
Else
Please select check box// Error message
Hope this helps!!
Regards
Vijay K -
How to make the java files compile for a project created outside of Eclipse
Hi^^,
I have created a project outside of Eclipse. It has the following folders
1. config
2. source
3. WEB-INF
I want to execute the project on remote server. Will it compile automatically creating a new folder for .class files corresponding to the source folder or do i need to include a build.xml to enable the project to create a new folder for .class files. Also pls tell me how do I write this build.xml
Please advise.Hi^^,
Actually I have created a project without using eclipse.
My source files are inside WEB-INF/source
Now I want to compile the files using build.xml so that I can create class files. I am using the following build.xml
<project name="jsp" default="all" basedir="./">
<property environment="env"/>
<property file="ArmorJSP.properties"/>
<!-- set global properties for this build -->
<property name="source" value="."/>
<target name="all" depends="copy, jspc, testservlet"/>
<!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
APP and places the compiled jsp classes into it -->
<target name="jspc">
<!-- Run ejbc to create the deployable jar file -->
<java classname="weblogic.jspc" fork="yes">
<arg line="-webapp ${APPLICATION_HOME} -compileAll -d ${APPLICATION_WEB_CLASSES} ${source}/*.jsp"/>
<classpath>
<pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
</classpath>
</java>
</target>
<!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
APP and places the compiled Servlets classes into it -->
<target name="testservlet">
<!-- Run ejbc to create the deployable jar file -->
<javac destdir="${APPLICATION_WEB_CLASSES}" srcdir="${source}" includes="*.java">
<classpath>
<pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
</classpath>
</javac>
</target>
<target name="copy">
<copy todir="${APPLICATION_HOME}">
<fileset dir="${source}">
<include name="*.jsp"/>
</fileset>
</copy>
</target>
</project>I do not know how to compile the project using this build.xml
The motive of doing all this is to understand how is Eclipse doing the build project step. I simply cannot find any build.xml inside any of my projects created in Eclipse however when right click on the project and choose build project, it compiles excellently. ???
Edited by: pksingh79 on Nov 24, 2008 1:19 PM -
How to Use the JAVA SCRIPT code in .htm page of the component
Hi .
In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
thank you
B.ManiCheck this document [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
Regards
Kavindra -
How to get the java code of the message mapping
how to get the java code of the message mapping,
I mean to ask how to get the background java code of the message mapping(graphical mapping).
And where to view it?Hi Satya,
The JAVA code for graphical msg mapping is in below folder:
\usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
Here all the mapping jars are there in this folder.
Just decompile these jars and you can see the code.
Thanks,
Rajeev Gupta
Message was edited by:
RAJEEV GUPTA -
How to view the java code of the message mapping,
Hi Experts,
<b>how to view the java code of the message mapping,</b>
how to get the background java code of the message mapping(graphical mapping).
And where to view it?Hi sowmya,
Open any Message mapping in IR. Press <b>CtrlShift0(zero)</b> to open a new menu.
There you will find an option "Is Java Source Code Available?"
There will be an export button nearby. Use it to get the code.
Open it in a zip , you will see the hide java code.
The JAVA code for graphical msg mapping is in below folder:
\usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
Here all the mapping jars are there in this folder.
Just decompile these jars and you can see the code. -
How to get the java code of the standard functions
How to get the java code of the standard functions in xi
Example , hoh get the java code for a node function - removeContext.hi
Click on the Standard Function.
Hold Ctrl+Shift
right click on the standard function to view the context menu. You will see options to view the source code by exporting
regards
krishna -
How to retrieve the java object in a proxy service in osb -- Plz help
Hi all,
I have a singleton java class which runs whenever the weblogic server gets started and store the output in its object. I need to access this java object from a proxy service in osb.
We tried using java call out and retrieved that object but we couldn't know how to parse that object into XML.
We are not sure of using the java call out in osb to solve this purpose because whenever we use a java callout, that particular java code will run which is not the case of singleton class.
So kindly help us how to retrieve the java object which holds the output without running the java code every time because its already run and holding the output in its object.
Regards
Prabhuhere the doc http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656
but I guess you are already at the stage of getting a POJO in a first Java Callout and passing the POJO to a second Java Callout, which should then return it to OSB as a XMLObject.
My recommendation is to write a Java function which returns a XMLObject and uses a XMLCursor to populate it with the values of the POJO.
An XMLObject returned to the OSB is automatically transformed in a "XML" variable (which in reality is represented as a XMLObject in the Pipeline context)
Here some code sample:
http://www.javamonamour.org/2010/09/how-to-create-xmlobject-using-xmlcursor.html -
How to compile a java file in J9 for windows mobile 5.0
I have downloaded J9 for windows mobile 5.0 and need help on how to compile a java file.
You can compile your source code using J2SE ;)
may be this is important for you:
http://awareness.ics.uci.edu/~rsilvafi/pocketPC/index.
html
Regards!!!Actually i am using some eSWT related classes also.. so is there any way to compile from the J9 environment using J9 console.. -
How to write the JTables Content into the CSV File.
Hi Friends
I managed to write the Database records into the CSV Files. Now i would like to add the JTables contend into the CSV Files.
I just add the Code which Used to write the Database records into the CSV Files.
void exportApi()throws Exception
try
PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
System.out.println("Connected");
stexport=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
rsexport=stexport.executeQuery("Select * from IssuedBook ");
ResultSetMetaData md = rsexport.getMetaData();
int columns = md.getColumnCount();
String fieldNames[]={"No","Name","Author","Date","Id","Issued","Return"};
//write fields names
String rec = "";
for (int i=0; i < fieldNames.length; i++)
rec +='\"'+fieldNames[i]+'\"';
rec+=",";
if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
writing.println(rec);
//write values from result set to file
rsexport.beforeFirst();
while(rsexport.next())
rec = "";
for (int i=1; i < (columns+1); i++)
try
rec +="\""+rsexport.getString(i)+"\",";
rec +="\""+rsexport.getInt(i)+"\",";
catch(SQLException sqle)
// I would add this System.out.println("Exception in retrieval in for loop:\n"+sqle);
if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
writing.println(rec);
writing.close();
}With this Same code how to Write the JTable content into the CSV Files.
Please tell me how to implement this.
Thank you for your Service
JofinHi Friends
I just modified my code and tried according to your suggestion. But here it does not print the records inside CSV File. But when i use ResultSet it prints the Records inside the CSV. Now i want to Display only the JTable content.
I am posting my code here. Please run this code and find the Report.csv file in your current Directory. and please help me to come out of this Problem.
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.*;
public class Exporting extends JDialog implements ActionListener
private JRadioButton rby,rbn,rbr,rbnore,rbnorest;
private ButtonGroup bg;
private JPanel exportpanel;
private JButton btnExpots;
FileReader reading=null;
FileWriter writing=null;
JTable table;
JScrollPane scroll;
public Exporting()throws Exception
setSize(550,450);
setTitle("Export Results");
this.setLocation(100,100);
String Heading[]={"BOOK ID","NAME","AUTHOR","PRICE"};
String records[][]={{"B0201","JAVA PROGRAMING","JAMES","1234.00"},
{"B0202","SERVLET PROGRAMING","GOSLIN","1425.00"},
{"B0203","PHP DEVELOPMENT","SUNITHA","123"},
{"B0204","PRIAM","SELVI","1354"},
{"B0205","JAVA PROGRAMING","JAMES","1234.00"},
{"B0206","SERVLET PROGRAMING","GOSLIN","1425.00"},
{"B0207","PHP DEVELOPMENT","SUNITHA","123"},
{"B0208","PRIAM","SELVI","1354"}};
btnExpots= new JButton("Export");
btnExpots.addActionListener(this);
btnExpots.setBounds(140,200,60,25);
table = new JTable();
scroll=new JScrollPane(table);
((DefaultTableModel)table.getModel()).setDataVector(records,Heading);
System.out.println(table.getModel());
exportpanel= new JPanel();
exportpanel.add(btnExpots,BorderLayout.SOUTH);
exportpanel.add(scroll);
getContentPane().add(exportpanel);
setVisible(true);
public void actionPerformed(ActionEvent ae)
Object obj=ae.getSource();
try {
PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
if(obj==btnExpots)
for(int row=0;row<table.getRowCount();++row)
for(int col=0;col<table.getColumnCount();++col)
Object ob=table.getValueAt(row,col);
//exportApi(ob);
System.out.println(ob);
System.out.println("Connected");
String fieldNames[]={"BOOK ID","NAME","AUTHOR","PRICE"};
String rec = "";
for (int i=0; i <fieldNames.length; i++)
rec +='\"'+fieldNames[i]+'\"';
rec+=",";
if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
writing.println(rec);
//write values from result set to file
rec +="\""+ob+"\",";
if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
writing.println(rec);
writing.close();
catch(Exception ex)
ex.printStackTrace();
public static void main(String arg[]) throws Exception
Exporting ex= new Exporting();
}Could anyone Please modify my code and help me out.
Thank you for your service
Cheers
Jofin -
How to use the Java embedding activity in BPel
hi all,
How to use the java embedding activity in BPEL
pls can u provide sample example1 Use [Oracle BPEL Process Manager Client Java API Reference|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/overview-summary.html] and especially [com.collaxa.cube.engine.ext|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/com/collaxa/cube/engine/ext/BaseBPELXExecLet.html]
Instead of System.Out.println use addAuditTrailEntry(java.lang.String message)
2. If you want to import a package write in code (Source View) of bpel process
+<bpelx:exec import="package_name"/>+ for example +<bpelx:exec import="java.util.regex.Matcher"/>+
example 1:
String bodyAsString;
StringBuffer myStringBuffer = new StringBuffer();
try {
bodyAsString = (String)getVariableData("BodyString");
addAuditTrailEntry("bodyAsString1: "+ bodyAsString);
Pattern pattern = Pattern.compile("goodDay");
Matcher matcher= pattern.matcher(bodyAsString);
while (matcher.find()) {
matcher.appendReplacement(myStringBuffer, "shitDay");
matcher.appendTail(myStringBuffer);
bodyAsString = myStringBuffer.toString();
addAuditTrailEntry("bodyAsString2: "+ bodyAsString);
} catch (Exception ex) {
addAuditTrailEntry("Failed+bodyAsString",ex.getMessage());
I put in code (Source View) the following
<bpelx:exec import="java.util.regex.Matcher"/>
<bpelx:exec import="java.util.regex.Pattern"/>
example2:
Object temp;
try {
temp = ((XMLElement)getVariableData("inputVariable","payload","/ns2:FiscalisMessage/ns2:Body")).getChildNodes().item(1);
setVariableData("AdjReceipt",temp);
addAuditTrailEntry("ok",temp.toString());
catch (Exception ex) {
addAuditTrailEntry("Failed :",ex);
I put in code (Source View) the following
<bpelx:exec import="oracle.xml.parser.v2.XMLElement"/> -
How to load the certificate authority into the keystore for the weblogic8.1
how to load the certificate authority into the keystore for the weblogic8.1
==================================================
Getting the message below when trying to improt the certificate to the weblogic 8.1 web server. Received this certificate from our internal IT certificate authority. Trying to import the certificate to our test sytem.
===================================================
keytool error: java.lang.Exception: Failed to establish chain from reply
Import failed. Verify that the Certificate Authority that signed 'certi.pem'
has been loaded into your keystore 'keystore\pskey'
To view keystore contents issue 'PSkeymanager -list -keystore keystore\pskey [-v
To preview a certificate file issue 'PSkeymanager -previewfilecert -file certi.pem'You need to populate that field using cmod code. Find out from which table that field is and go to transaction cmod then enter project name and select component radio button then display.
Now select the FM EXIT_SAPLRSAP_001 if your datasource is transactional dataource
EXIT_SAPLRSAP_002 for master data attibute
EXIT_SAPLRSAP_003 for Hierarchies
EXIT_SAPLRSAP_004 for text
then populate code .
After your code then delete data from ods then reinit to populate the enhanced field.
Hope it helps..
Maybe you are looking for
-
How do you remove photo albums from Iphone4?
I have been trying to remove photo albums from my Iphone4 which have been synced from my PC. Is there any way of doing this without taking the phone to the staff at the Apple Store?
-
Hi folks, The Fax_Printer fails to work after running "pacman -Syu". On; File --> Print --> Fax_Printer --> Print No response. The dialer does not popup for typing phone number On browser localhost:631/printers Fax_Printer Warning: "recoverable: Net
-
Hello to all! With iOS 7 coming out some time soon, this fall according to Apple, it's time to make sure we all have good backups to make sure we don't loose anything. This is just an overview of how I make sure my stuff is backed up and safe. All t
-
Network and socket programming in python
i want to learn network and socket programming but i would like to do this in python.Reason behind this is that python is very simple and the only language i know . anybody can suggest me which book should i pick. the book should have following spec
-
Swing: how do I launch a child window?
How do I open a child window or frame, get the user input on this window, and return to the parent window? I know JOptionPane has some static methods that triggers message windows, but they're too simple to meet my needs. What lines of code should I