Porting CLDC code to CDC
Hello,
i have been implementing an application using J2M2 MIDP2.0 CLDC1.1.
is it possible to run the midlet in a PDA(CDC profile) ?
Is it possible to somehow port to it to CDC profile with minor changes? or do i have to code everything from scratch suing CDC libraries?
thanks a lot
sebastien
The GUI will need redoing. Any RecordStore usage will need reworking to use java.io. Anything else from javax.microedition will need a substitute.
Similar Messages
-
Hello,
I want to port CLDC Hostspot VM to an OS running on ARM9 processor.
Where can I download CLDC Hotspot VM source code ?
Thanks In Advance,
Regards
SurendraIf you don't get a definitive answer here, you might try asking on the hotspot-dev (at) openjdk.java.net mailing list. That's where all the HotSpot developers hang out. I know there are people there working on an ARM9 port, though I don't know if it's for the full Standard Edition or CLDC.
-
So you have an embedded design all coded up for one microprocessor architecture and you’d love to take advantage of the significant additional processing power of the dual-core ARM Cortex-A9 MPCore processor/programmable logic combination available with the Xilinx Zynq SoC? Want some help porting that code?
Help is available with the new “Zynq-7000 All Programmable SoC Architecture Porting Guide,” UG1181. Following a quick overview of the ARM Cortex-A9 processor features found in the Zynq PS (Processor System), the guide gives the following handy table highlighting the differences among five processor architectures including the ARMv7 architecture, PowerPC, MIPS, Renesas-SH, and x86:
The document also includes a comparison of function-calling conventions, interrupt models, memory maps, register sets, and pointers to the ARM Web pages that provide detailed help in porting from these other processor architectures.Are you using the latest version of Silverkeeper? - v.2.0.2 is stated to be compatible with Snow Leopard.
http://www.lacie.com/silverkeeper/
If it's messing things up you could try asking LaCie Support for assistance. -
Porting C++ Code (with RogueWave) from Solaris 2.6 to Solaris 8
Hello,
I am trying to Port a C++ Code, which was written on Solaris 2.6 using Sun Workshop 4.2 to
Solaris 8 using Forte 6 Update 2.
The Code earlier used the roguewave , which came along with Sun Workshop 4.2. Now for the Soalris 8/Forte C++ 6.2 , I have Installed Rogue Wave Source Pro Core.
Can Any One Suggest Info on Doing the above.
When I tried doing it, I get some Linker related issue...( I have just pasted few of the errors below.)
+ /opt/SUNWspro/WS6U2/bin/CC -O3 -mt -D_THREAD_SAFE -features=no%conststrings -library=iostream -D_REENTRANT -mt -D_RWCONFIG=12d -DSYS_USES_SOLARIS_THREADS -DSVR4 -KPIC -I/amatools/3rd/SOLARIS8/RogueWave/workspaces/12d-32/rw/config -I/opt/SUNWspro/WS6U2/include/CC/Cstd
-I../../src/common/network/sdk/include
-I../../src/common/sdk/include
../../src/common/network/sdk/src/NET_TCPSocket.C
ld: warning: symbol `std::ctype_byname<char>::__vtbl' has differing sizes:
(file /amatools/3rd/SOLARIS8/RogueWave/workspaces/12d-32/lib/libstd2212d.so value=0x30; file /opt/SUNWspro/WS6U2/lib/libCstd.a(charby.o) value=0x34);
/opt/SUNWspro/WS6U2/lib/libCstd.a(charby.o) definition taken
Undefined first referenced
symbol in file
__RTTI__1nTRWTHRInvalidPointer_ /amatools/3rd/SOLARIS8/RogueWave/workspaces/12d-32/lib/libthread2212d.so
Thanx for the help!.
RameshHi we arr having our Rogue wave libraries built on Solaris 6 using Sun4.2 compilers. Can we use it in our code. We are using Forte 6 and solaris 8 now for coding . can we use the same old rogue wave libraries..
Regards
Saroj. -
Question about port C++ code to C
I have a newbie question about C++
I'm being ask to port a C++ sharelib into a kernel driver for work so from C++ => C. I'm not at all familiar with C++ but i'm making some leeway. However i'm a little stuck, what does the following line of code in bold mean in C++ and how would I translate it into C code?
#include <deque>
struct _buffer
UINT8* buffer;
UINT8 length;
typedef deque< struct _buffer* > MSGQUEUE;
I'm assuming it's type defining a deque of the struct _buffer??? but I'm confused by the <...>, what does that operator do in C++. Is it defining a struct _buffer pointer within the deque???
This might like a "DUH it means...." question to some people so sorry about the stupid question.
--Vincent<> is template syntax and is generally the type of object a container holds.. So it is defining that the MSGQUEUE type is a deque holding struct_buffer*'s.
-
I am trying to port some existing JNI code so that it can run on 64 bit platforms as well as the existing 32 bit platforms. The one issue I cannot seem to solve is what to do with variables which are linked to the platform size.
For example, a variable which is delared as size_t will be 32 bits on the 32 bit platforms, but will be 64 bits on the 64 bit platforms.
I cannot find any JNI defines that match this paradyme.What do you mean?
Are you trying to create a single compiled instance that runs on both platforms?
Or are you trying to create a code base that, when compiled appropriately, runs on one or the other?
Java types are java types. So you use what ever it gives you. If you want to translate it to a C/C++ type then you are going to have to do something different, possibly via preprocessor directives. -
hey people...
how u doin??
I m stuck up with a major problem I have no clues to which.
I need to port a java code to a device such as a router. Somebody kinly pull me outta this...
thanksClass ABC
class BarThread extends Thread
private int DELAY =0;
public BarThread(JProgressBar bar)
progressBar = bar;
public void run()
progressBar.setMinimum(0);
progressBar.setMaximum(uploadFiles.length*3);
Runnable runner = new Runnable()
public void run()
int value = progressBar.getValue();
System.out.println("Value: "+value);
progressBar.setValue(value + 1);
for (int i = 0; i < progressBar.getMaximum(); i++)
try
SwingUtilities.invokeAndWait(runner);
// our job for each step is to just sleep
DELAY=uploadFiles.length*3;
Thread.sleep(DELAY);
System.out.println("DELAY: "+DELAY);
catch (InterruptedException ignoredException)
catch (InvocationTargetException ignoredException)
JOptionPane.showMessageDialog(SnapsGallery.this,"All
Files Uploaded Successfully","Information",
JOptionPane.NO_OPTION);
progressBar.setString("SnapsGallery");
progressBar.setValue(0);
progressBar.setIndeterminate(true); //for playining
animation
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CU
RSOR));
} //end of inner class
private void jButton2_actionPerformed(ActionEvent e)
int flag=0;
for(int i=0;i<ccheckBox.length;i++)
if(ccheckBox.isSelected())
flag++;
if(flag><1)
JOptionPane.showMessageDialog(SnapsGallery.this,"Pleas
e Select Image(s)","Information",
JOptionPane.INFORMATION_MESSAGE);
return;
/*upload
* code
* goes
* here*/
int x = JOptionPane.showConfirmDialog(null, "Do You
Really Want To Upload The Selected Files?","Confirm",
JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE);
if(x==0)
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSO
R));
progressBar.setString("Uploading-in-progress");
progressBar.setStringPainted(true);
progressBar.setIndeterminate(false); //for playining
animation
int uploadSize=0;
for(int k=0;k<ccheckBox.length;k++)
if(ccheckBox[k].isSelected())
uploadSize++;
uploadFiles=new String[uploadSize];
for(int r=0,ri=0;r<ccheckBox.length;r++)
if(ccheckBox[r].isSelected())
uploadFiles[ri]=holdPat[r];
ri++;
upload(uploadFiles);
} //end of method
public void upload(String[] FilesUpload)
int holdStat=0;
int man=0;
Thread stepper = new BarThread(progressBar);
// JOptionPane.showConfirmDialog(null, "Please wait
while your files are uploaded","Confirm",
JOptionPane.CLOSED_OPTION,
JOptionPane.WARNING_MESSAGE);
for(int i=0;i<FilesUpload.length;i++)
System.out.println("Hello");
holdStat=i;
try
URL u = new
URL("http://196.158.0.153/newtest/ActiveUpload_FileHan
dler.php");
URLConnection c = u.openConnection();
// post multipart data
c.setDoOutput(true);
c.setDoInput(true);
c.setUseCaches(false);
// set some request headers
c.setRequestProperty("Connection", "Keep-Alive");
c.setRequestProperty("HTTP_REFERER",
"http://applet.getcodebase");
c.setRequestProperty("Content-Type",
"multipart/form-data; boundary=****4353");
DataOutputStream dstream = new
DataOutputStream(c.getOutputStream());
// write content to the server, begin with the tag
that says a content element is comming
dstream.writeBytes("--****4353\r\n");
// discribe the content, (in this case it's a file)
dstream.writeBytes("Content-Disposition: form-data;
name=\"myfile\";"+"filename=\"C:\\"+FilesUpload+"\"\r\
nContent-Type: application/octet-stream\r\n\r\n");
// open a file
File f = new File(FilesUpload);
FileInputStream fi = new FileInputStream(f);
// keep reading 1000 bytes from the file
byte[] bt = new byte[1000];
int cnt = fi.read(bt);
while(cnt==bt.length)
dstream.write(bt,0,cnt);
cnt = fi.read(bt);
// send the last bit to the server
dstream.write(bt,0,cnt);
// now close the file and let the web server know
this is the end of this form part
dstream.writeBytes("\r\n--****4353\r\n");
// send a form part named TargetURL with the value:
/myUploadDir/
dstream.writeBytes("Content-Disposition: form-data;
name=\"TargetURL\"\r\n\r\n");
dstream.writeBytes("/myUploadDir/");
// let the web server know this is the end of this
form part
dstream.writeBytes("\r\n--****4353\r\n");
// send a form part named redirectURL with the value:
http://none/none
dstream.writeBytes("Content-Disposition: form-data;
name=\"redirectURL\"\r\n\r\n");
dstream.writeBytes("http://none/none");
// this is the last information part of the multi
part request, close the request
// close the multipart form request
dstream.writeBytes("\r\n--****4353--\r\n\r\n");
dstream.flush();
dstream.close();
fi.close();
try
DataInputStream in = new DataInputStream(new
BufferedInputStream(c.getInputStream()));
String sIn = in.readLine();
boolean b = true;
// TODO: this will loop forever unless you make sure
your server page
// sends a last line like "I am done"
// than you can do wile(sIn.compareTo("I am
done")!=0){
while(sIn!=null)
if(sIn!=null)
if(man==0)
stepper.start();
man=1;
else
stepper.join();
System.out.println(sIn);
sIn = in.readLine();
stepper.stop();
catch(Exception e)
e.printStackTrace();
catch(Exception e)
e.printStackTrace();
} //end of for loop
}//end of method
} //end of main classthanks for that incredibly irrelevant post! -
Language experts: Port Java Code to AS3?
Hello out there,
I have been asked whether it would be feasable to translate Java code to AS3. This is a bit difficult since I am not really an expert in Java and only a beginner wrt AS3. Looking at some code samples it seems doable (at least in principle), but of course there might be hidden gotchas lurking. Hence:
- Are there Java features which do not have an equivalent in AS3?
- Does AS3 have prerequisites which do not exist in Java?
- Other aspects to consider?
Any comment or advice will be greatly appreciated.
Best regards
H.Thanks to you all.
In the meantime I read "Actionscript for Java developers"
http://www.javaworld.com/javaworld/jw-02-2009/jw-02-actionscript1.html
and it seems like the two languages are not too far apart.
Of course there are differences, but we only need to consider those features which Java has and AS has not (like method overloading) and modify our Java sources to not use these. Since the goal is not to have a universal tool which translates _any_ kind of Java source to AS but only our specific code base I think it will be worth a small effort to test how far we get with a machine translation.
Yes, libraries may well be an issue - but again, I would have to see which (library) functions are actually used and how to replace them.
Thanks again and best regards
H. -
Porting Alchemy code to FlasCC
Heya,
We have some old Alchemy code sitting around that I'd like to update - the original author is long gone, in fact, and I never actually wrote anything that used Alchemy. So before I start working on this I'd like to check my assumptions.
The C code is basically a really long method sprinkled with calls to flyield(). Am I correct in thinking that Alchemy supported some sort of cooperative multitasking between Alchemy code and Flash code? Furthermore, I don't think this kind of multitasking would work in FlasCC - I would either need to break apart the C code into smaller chunks that can run iteratively on the UI thread, or move it to a worker thread. Right?
Thanks!
--brianHi Brian,
You're right in both case. I test your second proposal (the worker one) for a demo. It works. My c++ code was compiled to a swc and run as a worker from my main as3 application (done with FB 4.6).
There is one worker for starling, and one for the simulation, you can test it live here, still in progress ! You can monitor it with scout and seing the 2 workers working together...
-swc workers demo-
Samuel -
Porting HTML CODE TO MAINFRAME
I am using Dreamweaver to develop HTML that will be used via
a Mainframe CICS web send transaction. When ftp-ing the source code
up to the M/F, I have a finite amount of characters that each line
may containe before it will wrap (currently set to 80 but will grow
to 130).
Dremweaver will format the code and force line-breaks at a
specified position. The only problem I have with this is inside
<input> tags. I need to force line-breaks inside a tag that
may look like this
<input name="diagamount2" class="amount" id="diagamount2"
value="0"maxlength="15">1. Firefox 4.0.1 is an old unsupported version. <br />
http://www.mozilla.org/en-US/firefox/fx/#desktop
2. https://support.mozilla.org/en-US/kb/how-clear-firefox-cache#w_automatically-clear-the-cache -
Hello Forum,
I'm trying to find an equivalent Java function for this MFC function int numPixels = GetDeviceCaps(LOGPIXELSY).
All it does is gets the number of pixels per logical inch along the screen height.
Is there away to get this in Java?
Thanks,
MikeNow THAT is a really good question...
I'd like to know too -
Hi guys,
I download CDC and some guide pdf files.
But I cannot find linux-arm directory.
So how can I port CDC to my ARM9 CPU?
I read some articles, they said CDC definitely support ARM.
I have been very frustrated for looking for this solution.
Any suggestion will be helpful.
Thanks in advance.hi,
please tell me from where I can get the source code of CDC,
I am also trying to do the same but didnt find the source code of CDC.
I got PhoneME -Advanced but not CDC.
Please help me,
Parag. -
Issue porting WebLogic 8.1 SSL Socket code to WebLogic 9.2
I did not write this code, but am trying to port the code from Weblogic 8.1 to Weblogic 9.2. The code comes from a custom OpenLDAPAuthenticator, that uses a SSL Socket to connect to an LDAP server.
The following lines are used:
Socket socket = SSLSocketFactory.getDefaultJSSE().createSocket(host, port);
if (socket instanceof SSLSocket) {
SSLContextWrapper sslcontextwrapper = SSLContextManager.getInstance().getDefaultSSLContext();
sslcontextwrapper.forceHandshakeOnAcceptedSocket((SSLSocket) socket);
}Does anyone know what this forceHandshakeOnAcceptedSocket method does, and if there is way to write this in WebLogic 9.2?
ThanksI did not write this code, but am trying to port the code from Weblogic 8.1 to Weblogic 9.2. The code comes from a custom OpenLDAPAuthenticator, that uses a SSL Socket to connect to an LDAP server.
The following lines are used:
Socket socket = SSLSocketFactory.getDefaultJSSE().createSocket(host, port);
if (socket instanceof SSLSocket) {
SSLContextWrapper sslcontextwrapper = SSLContextManager.getInstance().getDefaultSSLContext();
sslcontextwrapper.forceHandshakeOnAcceptedSocket((SSLSocket) socket);
}Does anyone know what this forceHandshakeOnAcceptedSocket method does, and if there is way to write this in WebLogic 9.2?
Thanks -
[SOLVED] usb serial port emulation
Hello
I'm an Arch newbie. I just purchased an HP Neoware CA21 thin client, replaced the small DOM unit by a 1GB module, and installed Arch on it. I would like to use this device as a kind of data logger, 24x7 continuous operation.
The device I'm reading is an ADC connected via a USB port, which provides a CDC/ACM interface. When I plug it into the CA21 USB port, /dev/ttyACM0 does appear. Under Ubuntu on a normal PC the same happens but I find I can only use it via the usbserial driver, which provides serial port emulation for a USB device, creating /dev/ttyUSB0. That's because I can't get the java serial port interface rxtx to recognise a ttyACMn device, for reasons I don't understand and am still investigating.
So, I have a couple of newbie questions about Arch ...
1/ is there an equivalent to usbserial, ie a serial port emulation for USB ports?
2/ if not, or perhaps more correctly, how can my java app interface to ttyACM0? The Arduino crowd may know about this.
3/ I'm kind of assuming rxtx works under Arch - is that right?
Thanks for any help.
Andrew
Last edited by mistertransistor (2011-11-12 16:43:03)Well, kind of solved. I found that
- adding the "options usbserial ..." line does not prevent ttyACM0 from appearing when the device is plugged in
- once ttyACM0 is there, no amount of "modprobe usbserial ..." will make ttyUSB0 appear
- however, if you "rmmod cdc-acm" and then "modprobe usbserial ..." you will get a ttyUSB0
Having figured that out, I got a test app reading the USB port with no problems. However my real app gave some odd 'Main class not found ...' error even though the exact same jarfile runs fine under Windows XP (you may be wondering why I develop there rather than under Ubuntu. Well, I have a dual-boot machine XP/Ubuntu and NetBeans runs *much* better under XP - quite puzzling). Eventually I solved this by creating a new NetBeans project/application and copying in the code from the existing one - a total mystery to me).
So now the device is in my garage collecting data from my seismograph. I'm writing to a USB stick, not sure about how long that will last but as I don't delete files much it's always writing in a new area and any given area gets very few write cycles.
This is marked SOLVED but I still have not found how to read ttyACM0 and I would like to do that.
Andrew -
"Missing port information" when calling web service
I have implemented a web service that works fine as long as I use primitive types as arguments and return types, but when I add a method that takes a user-defined class as an argument, I receive the following error when calling any of the methods in the web service:
[java] java.rmi.RemoteException: received fault: "Missing port information"
(code: "Server" namespace: "http://schemas.xmlsoap.org/soap/envelope/"); nested
exception is:
[java] received fault: "Missing port information" (code: "Server" names
pace: "http://schemas.xmlsoap.org/soap/envelope/")
[java] java.rmi.RemoteException: received fault: "Missing port information"
(code: "Server" namespace: "http://schemas.xmlsoap.org/soap/envelope/"); nested
exception is:
[java] received fault: "Missing port information" (code: "Server" names
pace: "http://schemas.xmlsoap.org/soap/envelope/")
[java] received fault: "Missing port information" (code: "Server" namespace
: "http://schemas.xmlsoap.org/soap/envelope/")
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingS
ender.java:321)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:211)
[java] at qsws.MyItf_Stub.HelloWorld(Unknown Source)
[java] at qsws.WSClient.main(Unknown Source)
The class I pass as an argument implements Serializable and a user-defined interface and it has two public member variables (int and String).
Anyone know why I receive this error?
/MagnusI am also seeing this same error. I have rebuilt and redeployed the service several times, but am still stuck getting this error. Strangely enough, the Tomcat server where the service is hosted is not reporting this type of error. Instead, it is recording an error 500 (Server Internal Error) each time I try to execute one of my services. I trimmed out the meat of the service and configured it so that it would echo the input parameters to the output (they are actually in/out params) but even this reduced configuration gives an error 500. I am inclined to suspect my deployment, but I have checked it several times against the examples.
Anyone else see the error 500 reported as missing port information?
Maybe you are looking for
-
How do I check a wifi network on my iphone 4S ?
I was in a Dennys restaurant that boasts a free WI-FI network, but couldnt logon to it. The iPhone saw the net but would not join it. No-one else could get onto the network either. This has happened in other locations too. My home network is via
-
Why do my greyscale photos have pink tinge when saved to PDF? HELP
I have made a booklet in Office Publisher and need to send to the printer today in PDF format, but whenever I save all of the greyscale photos end up having a pink tinge in some areas. This is quite bad considering the whole booklet (except for the c
-
In my system preferences under Security/User Group settings my diabsle auto login is ticked - I am unable to untick thia box. The system shows I have the hihgest level access admin level and I should therefore be able to untick this box. How do I do
-
LMS 3.2 Installation - Solaris 10/09 Patch Conflict:
Hello all, We are running Sun Solaris 10/09,working on installing LMS 3.2.As per documentation,attempted to install the two recommended patches,127127-11 and 122032-05. The 127127-11 patch is already contained in this OS packaging.The second recommen
-
Hi All, I have one iview which displays employee details from backend SAP system.Everthing is working fine.But after working sometime it is taking more time to display data and when i tried to catch the exception it is showing below error.If i rest