How to debug the jar files while developing the native extension for android
ANyone???
I'm having the same problem. I learned FB and Eclipse. I've read the tutorials, created an ane, and built it into a test app. I can debug my test app within FB 4.7 on my mobile device via USB. But there are bugs and they silently fail. Despite all my Log statements in my android java code, they won't output to the FB console. I'm blind, without even trace statements to help fix my ane. I've searched the internet and can't find anything. It must either be terribly obvious or arcane, because no one mentions it.
Can anyone tell me how to get trace out of an ane?
The Android reference claims debug and verbose priority are stripped out at runtime. I switched to Log.i() but still get nothing. I suppose for now I'll try throwing errors and see if I can report trace info that way if possible.
Anyone perhaps have a JUnit test that will mimic AIR using the ane jar file as an extension? Perhaps it will be easier to go full native until the android side is debugged.
Update Edit: Ok, now spending more time reading the Android developers website. I've found I can use logcat to get all kinds of useful system logs, including the log output of my embedded ane. I created a nice big command line window (180 char wide with a 500 deep buffer so I can scroll back through all the messages), then from the android platform tools directory I ran 'adb shell', then at the shell prompt $>logcat
Links to info that helped me:
http://developer.android.com/tools/debugging/index.html
http://developer.android.com/tools/help/logcat.html
Similar Messages
-
How to list the JAR files loaded into the Oracle Database ?
How to list the JAR files loaded into the Oracle Database ?
From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
JAVAJAR$
JAVAJAROBJECTS$
By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier. -
How do I move a file from "Recents" in Adobe Reader for Android to a folder in "Documents"?
How do I move a file from "Recents" in Adobe Reader for Android to a folder in "Documents"?
Files from Google Drive are appearing in "Recents" where I cannot organize them hierarchically.
I cannot find a user manual for Adobe Reader for Android with this level of detail.Hi John,
Files opened via Google Drive are not listed in ‘Documents' section of Adobe Reader, because they are read only files. If you really want to save these files to ’Documents' then please follow below steps -
Open the file from Google drive in Adobe Reader.
Tap on the Comment icon placed at top toolbar(Second icon from the beginning)
You would encounter a 'Read-Only document’ dialog, tap on Save button.
Once you performed above steps , your file will be saved in /Download/Adobe Reader/ folder.
Hope this will solve your problem.
Thanks,
Adobe Reader Team -
Developing and using Adobe AIR native extensions for Android devices
I was using this tutorial:
"Developing and using Adobe AIR native extensions for Android devices"
http://www.adobe.com/devnet/air/articles/ane-android-devices.html
When packing the Flex mobile ANESampleTest to deploy on an Android device, the below error happens
Error occurred while packaging the application:
aapt tool failed:invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/drawable-xxhdpi
invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw600dp
invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw720dp-lan
Does anyone know what the issue might be?Did you find a workaround for the Error? I'm getting the same and I can't seem to find any solution.
-
How To Access a jar file present outside the war file through a jnlp
Aoa
I m new to this forum
I m having problem with my jnlp file
i want to know is there any way to access a jar file through jnlp.The problem is that my jnlp file is present in the war file
and i want to know how to acess a jar file through this jnlp.The scenerio is as below
I m using ear file on jboss.Its hirerchy is as
-PAN-war.war
-launch.jnlp
-PAN-app-client.jar
my jnlp file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="PAN/launch.jnlp">
<information>
<title>PanEmirates</title>
<vendor>M Fazal Ur Rehman</vendor>
<description>PanEmirates</description>
<description kind="short">PanEmirates</description>
<homepage href=""/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<jar href="PAN-app-client.jar" download="eager"/>
<jar href="lib/javafxrt.jar" main="true" download="eager" />
<jar href="lib/Filters.jar" download="eager"/>
<jar href="lib/javafx-netbeans-fxuserlib.jar" download="eager"/>
<jar href="lib/swing-layout-1.0.3.jar" download="eager"/>
</resources>
<application-desc main-class="net.java.javafx.FXShell">
<argument>pan.Main</argument>
</application-desc>
</jnlp>
when i run launch.jnlp file it says unable to download resource http://localhost:8080/PAN/PAN-app-client.jar
how to access this jar file
Any help or comment would be highly appreciated
Regards
M Fazal Ur RehmanExcellent question. I don't see any client-jar in your EAR file structure. So I am assuming you are writing a separate client application which will talk to the ejbs deployed as part of this EAR. You need to do the following:
Write another EAR file with the following structure:
ear:
META-INF/application.xml
util.jar
client.jar
client.jar should have a META-INF/MANIFEST.MF and that should contain Class-Path:util.jar and value for Main-Class attribute.
Now deploy this new ear to your application server and execute it using Application Client Container that comes with your app server.
If you don't want to write another EAR file, then bundle th client.jar in your original EAR file.
Points to note are:
you have to repackage util.jar again inside this ear file.
For portability reason, you should use Class-Path manifest entry in client.jar. Refer to http://java.sun.com/j2ee/verified/packaging.html and J2EE platform spec section #8.2.
Hope this helps,
Sahoo -
To add the JNI dll to the jar file and use the dll inside the jar file
Hi to everybody,
I am new to java.
I want to add the JNI dll to the jar file and use it in the java class.
How can I achieve it.
Please help me.
Thanks in advance.
Regards,
M.Sivadhas.can't be done because none of the known operating systems support reading binary libraries from .jar files ... you can add the binary to the jar but then you have to extract it...
besides, mixing platform specific and platfrom independent components is not a very good idea, i'd keep the dll out of the jar to begin with -
Garbage name of the Archive File while using the FTP adapter
Hello All
I am using Oralcle FTP adapter to poll a file ,after polling I am deleting the file from the current directory and
archiving it into another directory.
Problem is after archiving the file into the another dirctory name of the is fine changed as follows :
d2wXEgGZrfypNsGa15uzOA==_20081015_082233_0015
I want same name for the archived file as orginal file with timestamp
Please help to solve this problem.
Thanks
Satendra PareYou cannot change the file name in the save dialog, it always uses the originally file name of the form.
But you can use scripting to save a form under another name.
Sample.
http://thelivecycle.blogspot.com/search/label/Save -
How to pass parameters to the Control file while loading the data from flat file to staging table
Thanks in advance
Hi ,
LOADDATA statement is required at the beginning of the control file.
INFILE: INFILE keyword is used to specify location of the datafile or datafiles.
INFILE* specifies that the data is found in the control file and not in an external file. INFILE ‘$FILE’, can be used to send the filepath and filename as a parameter when registered as a concurrent program.
INFILE ‘/home/vision/kap/import2.csv’ specifies the filepath and the filename.
Hope this will help you...... -
Where are the jar files located in the server in which the MS SQL Server is installed?
Hello All,
Please tell me the place where jar files are located in the system in which the MS SQL Server is installed.
Please help me as early as possible.
Thanks in advance.
Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.Check BOL page: Using the JDBC Driver
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Error opening the PDF file while sending the PDF as an attachment
Hi All,
I am sending a PDF as an attachment in the mail. I am using the code pasted on 'Jul 28, 2006 8:59 AM' subject OTF Format of Purchase Order in email unreadable.
My problem is when I open the attachment in SOST or in the mail, I get the error message "Adobe could not open *.PDF because it is either not a supported file type or because the file type has been corrupted."
Please let me know if anybody has faced such an issue.
The code is found below.
FORM MAIL_OBJECT *
This routine receives OTF data. OTF data is converted to PDF
format and send to the Partner's email address
FORM mail_object TABLES otf_data STRUCTURE itcoo .
DATA: pdf_size TYPE i, " PDF Size
pdf_itab_size TYPE i, " Attachment size
mailtxt_size TYPE i, " Text in mail size
l_vbeln LIKE vbdka-vbeln. " Order Doc
DATA:
it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, " Mail Text
it_pdf TYPE TABLE OF tline WITH HEADER LINE, " OTF output
it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
it_mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE," Header data
it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, " Rec List
it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE. " Attachment data
DATA: it_doc_att LIKE sodocchgi1. " Attri of new doc
DATA: BEGIN OF it_pdfout OCCURS 0, " PDF in 255 length
tline TYPE char255,
END OF it_pdfout.
Sales doc and Customer
DATA: BEGIN OF i_vbeln OCCURS 0,
vbeln LIKE vbpa-vbeln, " Sales Document
adrnr LIKE vbpa-adrnr, " Customer
END OF i_vbeln.
Sender Address no and SMTP address
DATA: BEGIN OF i_addrs OCCURS 0,
addrnumber LIKE adr6-smtp_addr,
smtp_addr LIKE adr6-smtp_addr,
END OF i_addrs.
Convert OTF to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = pdf_size
TABLES
otf = otf_data
lines = it_pdf.
Make each line 255 characters
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
TABLES
content_in = it_pdf
content_out = it_pdfout.
Create the PDF File
CLEAR it_pdfdata.
REFRESH it_pdfdata.
it_pdfdata[] = it_pdfout[].
LOOP AT it_pdfout.
MOVE it_pdfout-tline TO it_pdfdata-line.
APPEND it_pdfdata.
CLEAR it_pdfdata.
ENDLOOP.
DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
Text in the mail.
it_mailtxt-line = 'ORDER ACKNOWLEDGEMENT'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--1'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--2' &
' This is a test mail, Line Number--2'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5'.
APPEND it_mailtxt.
DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
Document Number for Output
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = vbdka-vbeln
IMPORTING
output = l_vbeln.
Attributes of new doc
CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
INTO it_doc_att-obj_descr SEPARATED BY space.
it_doc_att-sensitivty = 'F'.
it_doc_att-doc_size = mailtxt_size * 255.
Create Pack to text in mail body.
CLEAR it_mailpack-transf_bin.
it_mailpack-head_start = 1.
it_mailpack-head_num = 0.
it_mailpack-body_start = 1.
it_mailpack-body_num = mailtxt_size.
it_mailpack-doc_type = 'RAW'.
APPEND it_mailpack.
Create Pack to PDF Attach.
it_mailpack-transf_bin = 'X'.
it_mailpack-head_start = 1.
it_mailpack-head_num = 1.
it_mailpack-body_start = 1.
it_mailpack-body_num = pdf_itab_size.
it_mailpack-doc_type = 'PDF'.
CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
it_mailpack-doc_size = pdf_itab_size * 255.
APPEND it_mailpack.
*Get email addresses based on Sales document.
SELECT vbeln adrnr INTO TABLE i_vbeln
FROM vbpa
WHERE vbeln = vbdka-vbeln AND
parvw = nast-parvw.
IF NOT i_vbeln[] IS INITIAL.
SELECT addrnumber smtp_addr INTO TABLE i_addrs
FROM adr6 FOR ALL ENTRIES IN i_vbeln
WHERE addrnumber = i_vbeln-adrnr AND
smtp_addr NE space.
ENDIF.
IF i_addrs[] IS NOT INITIAL.
LOOP AT i_addrs.
it_reclist-receiver = i_addrs-smtp_addr.
it_reclist-express = 'X'.
it_reclist-rec_type = 'U'.
it_reclist-notif_del = 'X'. " request delivery notification
it_reclist-notif_ndel = 'X'. " request not delivered notification
APPEND it_reclist.
CLEAR: i_addrs.
ENDLOOP.
ENDIF.
Call FM to send email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = it_doc_att
put_in_outbox = 'X'
TABLES
packing_list = it_mailpack
object_header = it_mailhead
contents_txt = it_mailtxt
contents_hex = it_pdfdata
receivers = it_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorizationfiltered= 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " MAIL_OBJECT
Regards,
AjithHi Ajith !!
Please refer this link :
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Here a spool output is converted into PDF and then sent as an email.
I think instead of using FM to change the width, try the logic mentioned in the link.
Also instead of FM CONVERT_TO_OTF use :
1. CONVERT_OTFSPOOLJOB_2_PDF
I hope this should solve the problem.
I had referred the same program from the link and it worked absolutely fine. Also check the adobe acrobat version, i guess old version doesnt support SAP, though not very sure.
Best regards,
Prashant -
Facing error#3500 while running AIR native extension for windows
Hi,
I am stuck in a problem regarding AIR native extension from couple of days.Whenever I tried to run an extension for windows it gives error code 3500 (extension context cannot have the method ie methodname).I am doing all things correctly but don't know where I lack.I am using Flash Builder 4.6 and 64 bit machine.I made the sample extension POC for android ,they are working fine.No such issue.
Please post your valuable comments.Eagerly waiting for reply.
ThanksHi,
Finally I got the answer to my problem.Actually I dont have the dependency dll of .net framework 4.So I nstall these and now my code is working fine.
Thanks -
ODI - Multi development environment how to share the JAR files
Hi,
For some of our functionality, existing KM not sufficient so we created with our own KM and we have called some jave code which we created and place inside lib directory of ODI as a JAR file. there are four people in the development work. so we have four development environment(all are complete installation, i.e while installing we choosing Complete Option).
One of our developer created the our own KM and he placed the jar file in his own Dev environment's lib Directory. Since four Dev environment shares the some work rep we could see the new KM and all the ODI object in all the dev env. but if we run the the ODI interface which use the new KM from other Dev environment where we dint place the jar we are getting Error.
if we keep the jar file in all the other three Dev environment's LIB directory then respective interface working.
here my doubt, is there any other way to share the JAR file to all the Environment without copying into everywhere?
Thanks
KnidhiThanks you verymuch Cezar and Ratish, now almost i got the answer for my question.
i installed ODI Server into separate machine. it has folder structure as follows
Directory: D:/ODIServer/oracledi/ has the following subfolder
1.bin 2.drivers 3.lib 4.tools.
here i need to keep my Jar files under the lib folder. am i right?
and bin directory contains only Agent related batch files. (agent.bat, agentscheduler.bat,agentservice.bat,agentstop.bat,agentstart.bat,agentweb.bat and jython.bat and respective .sh files)
here dont know how to precede the following things
1. how to configure the Master and Work Repository information with ODI Server?(MR and WR i already created with the help of one the ODI Client)
2. how to configure the Client machine to Server?
3. Since ODI Server not having the Topology, how to create the Agent? do i need to use any one of the ODI Client for this task?
--Thanks
Knidhi -
How can i get the path to config folder placed inside the jar file?
Hi i have developed an RCP application using eclipse.
In my application config directory is there.
When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
Will the config folder exists in local cache in my system?
Help needed.
-Deepak-- This works in CS6:
tell application "Adobe InDesign CS6"
set myDocument to active document
set selectedRectangles to selection of myDocument
set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
--> "Macintosh HD:folder/folder/filename.tif"
end tell -
Exception is thrown only while executing the jar file
java.lang.NoClassDefFoundError: javax/mail/Address Exception is thrown only while executing the jar file. But the program compiles and executes good when executed for command prompt through the class files.
I used javamail API in my program. Classpath and every others are set to the right one's. Executed fine when used java Random.class. But the problem is only with the jar file.
Please help me out in this regard. Why the exception is thrown only in jar but not at class level.Assuming you're running your program using "java -jar", your jar file needs a Class-Path entry
in the manifest file that references mail.jar. -
How to build a jar file so the program can access its resources folder?
I have a java program written by someone else in which I have made a trivial change (I changed the background color). The jar file runs but it does not find one of the resources file.
Here is the project folder's structure
mainClass.txt (manifest text file)
folder resources (includes file Java does not find: order.txt, a text file)
folder CFPT ( includes .class files)
folder cpl (includes .class files)
folder results
I tried
jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
I get a lot of "adding: resources/..."
including the one pertaining to the files which is later not found
adding: resources/order.txt(in = 411) (out= 169)(deflated 58%)
the code that chokes right now is the following,
Object i = new Object();
InputStream is = i.getClass().getResourceAsStream("/resources/" + resourceName);
when I run java -jar CFPT0.jar the program runs
but it soon gives an error, cannot find resourceName order.txt (is == null)
I have Core Java Volume 1 page 498 but it does not help me figure out what I am doing wrong.
Can somone help me build the jar file correctly so the program can find its resources?
Is this a classpath issue? What do I need to do?My last mainClass.txt file content:
Main-Class: CFPT.CFPTRunner
Class-Path: ./resources ./results
I also tried
Class-Path: resources results
Initially I only had the first line.
I put back /resources in the java file as the / is necessary to indicate absolute path.
Otherwise it looks relative to calling class.
I tried adding the path on the second line of the manifest file per Wikipedia example
http://en.wikipedia.org/wiki/Classpath
I looked at
http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files.
http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
resources
I took out the -d classes and compiled the .class files right with the java files in case that was the problem
javac -classpath . CFPT/CFPTRunner.java
jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
java -jar CFPT0.jar
Still no go
Maybe you are looking for
-
Images not getting displayed!...Urgent
Hi, While developing code on my local machine, update, delete, etc images are not getting displayed. I am having problem while testing code on my machine. But the same code when i am deploying on the server works fine. How do i resolve this. Thanks i
-
Several apps not working in Mavericks
Hey! I have some issues with several of Apple's apps that came along with Mavericks. Neither the Messages app, Calendar, Maps, FaceTime, Photo Booth and Terminal worked after updating from Mountain Lion, so I wiped my drive clean and did a new instal
-
Time Machine or Super Duper??
I have been using Super Duper successfully under Tiger with an external Seagate USB Drive. Now that I have Snow Leopard... I was wondering about Time Machine. I only want to use it if it does something substantially better than Super Duper- outperfor
-
Migrating Exchange 5.5 to OCS 90301
Hi folks: We are in a competitve situation in a prospect who asked us about to make a prototipe of migration of their current mail system ( Exchange 5.5) to our OCS mail 9.0.3.1 . We used the OCS migrator 9.0.3 but the problem is the following: The m
-
Sending from a Mobile Me ALIAS using Mail v2.1.3
My desktop Mac uses OS 10.4.11, and Mail v2.1.3. I don't seem to be able to enter ALIAS addresses in the account preferences area "Email Addresses" as I am able to do on my MacBook Pro (OS 10.6.2) and Mail v4.2. On the MacBook Pro, I can successfully