ByteCodes

Hi,
I have a .class generated using Linux API to serial/paralell port comunication. Sould this bytecode runs in Windows? Because it doesn't, and I don't know why!
Thanx....
gtrue

Sun has API's like that to Windows and Solaris. On www.rxtx.com you can find a similar API done for Linux. Well, if I have developed this program on Windows (using Sun's API), would I have portability?

Similar Messages

  • 1.1 bytecode doesn't work on W2k ie5?

    One step forward and two steps back...
    I compiled my applet using the -target 1.1 option, so that everyone could use my applet without plug-in. I could get it to work with a plug-in, but students for some reason had a hard time following the directions involved in loading the plug-in and complained bitterly...
    So I asked the forum for help, and the suggestion was to compile to 1.1 bytecode. But for some reason, the applet did not work in ie5 on windows 2000. Netscape 6.2 asked me for the 1.3 plug-in when I tried to run it there. (But it already had loaded on it the 1.4 plug-in). The applet did work in Netscape and ie 5 in win98, and (ironically enough!) in ie6 on winxp!
    1) I thought 1.1 bytecode was universal for everything above ie3 and netscape 4!? Is this a false statement?
    2) Is there something with w2k that causes this?
    3) Is there some way to fix this problem for ie in w2k? (Other than to use the plug-in?) Ie returns the error message "applet not inited".
    I am not entirely sure that the applet will run on a computer that doesn't have a plug-in loaded (as I don't have any computers that don't have some sort of plug-in on them).
    The idea was to get my students to be able to run the darn applet with practically anything... but if this doesn't work I'm going back to using the plug-in.
    4) Does the applet run? http://www2.hawaii.edu/~jmcfatri/Java/SimpleFieldMap.html
    Thanks in advance!
    :) Jen

    Actually I don't think w2k is the problem.. I just tried it on my w98 computer with N 4.7, which has plug-in 1.3 and it looks like it is giving me a null pointer on an image which I load in the initialization of the bFieldPanel class.
    The Java Console:
    Netscape Communications Corporation -- Java 1.1.5
    Symantec Java! ByteCode Compiler Version 210.065
    Copyright (C) 1996-97 Symantec Corporation
    java.lang.NullPointerException
    at BFieldPanel.<init>(Compiled Code)
    at SimpleFieldMap.init(Compiled Code)
    at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    java.lang.NullPointerException
    at sun.awt.windows.WToolkit.checkScrImage(Compiled Code)
    at sun.awt.windows.WToolkit.checkImage(Compiled Code)
    at java.awt.Component.checkImage(Compiled Code)
    at java.awt.ImageMediaEntry.getStatus(Compiled Code)
    at java.awt.MediaTracker.statusID(Compiled Code)
    at java.awt.MediaTracker.waitForID(Compiled Code)
    at java.awt.MediaTracker.waitForID(Compiled Code)
    at MediaUtil.waitForImage(Compiled Code)
    at BFieldPanel.<init>(Compiled Code)
    at SimpleFieldMap.init(Compiled Code)
    *-at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)

  • Encode Bytecode in source field to base64 in target field

    Hello,
    I have already posted a similar question regarding base64 encoding of attachment. However now the bytecode is sent in a single field in the source message. This bytecode has to be encoded in base64.
    So far I have not found any solution to do so. I have read about the following API com.sap.aii.utilxi.base64.api.Base64  which should contain two static methods for encoding end decoding.
    However the package cannot be found when trying to import it into an UDF. As this API is not documented, could it be that it is not available anymore on PI 7.1?
    What other possibilites do I have? Do you have any idea? I
    Thank you very much!

    Hi Florian,
    com.sap.aii.utilxi.base64.api.Base64 is no official API, so there is no official documentation on this. Also, if you use this, there can be a possibility that changes might occur in this class without any notice.
    This class has two static methods:
    String encode(byte[]) // binary -> base64
    byte[] decode(String) // base64 -> binary
    Try looking for this class in aii_utilxi_misc.jar, which can be found on PI server - C:\usr\sap\*\*\j2ee\cluster\server0\bin\ext\com.sap.xi.util.misc
    Hope this helps.
    Regards,
    Neetesh

  • Read bytecode of a PDF file

    Hello
    I must read Bytecode of a .PDF file but the method I use is too slow.
    Is there anybody can suggest me a faster or better method, please?
    This is my code
    public String scriviBC (String strPercorso, String strFile) {
    binario = "";
    try {
    File file = new File (strPercorso + strFile);
    int i;
    InputStream input = new FileInputStream(file);
    BufferedInputStream in = new BufferedInputStream(input);
    BufferedReader reader = new BufferedReader(new InputStreamReader(in));
    while ((i = reader.read()) != -1) {
    binario += i;
    risultato = binario;
    System.out.println(binario);
    } // END try
    catch(Exception e) {
    System.out.println("error"); e.printStackTrace();
    risultato = e.toString();
    } finally {
    return risultato;
    Ps I've already tried without buffering but it's the same.
    Excuse me for my bad english and thank you!

    Use Code Tags
    The reasons this is slow is:
    1) reading a single byte at a time (reader.read())
    2) creating a new string each loop (for each char).
    To speed it up, you want to use the read method that takes an array, and read multiply letters at a time, and use a StringBuffer.
    Also are you doing what you want to do?
    For a start you say "Bytecode of a .PDF", but then you are reading using a "BufferedReader" which is for textual data, when a PDF is bytes (and so you should be using a Stream, not a Reader).
    Then you creating a long string of this (as understand the code, as a string of numbers like "1231878394794237", which would be not be useable), for bytes, would'nt a byte array or alike be a better option?

  • Solution manager 7.1 sp4 , error @Bytecode adpater installation

    HI All,
        I am facing the below issue while executing the managed system wizard @ Bytecode adapter installation.
    Error @ Managed system
    Failed to create Introscope Agent Connector at: /usr/sap/SMD/SMDA98/SMDAgent/applications.config/com.sap.smd.agent.application.wily/BytecodeAgent/ISAGENT.8.2.3.5-2011-09-13/wily/connectors: - java.io.IOException: Cannot run program "null/bin/java" (in directory "/usr/sap/SMD/SMDA98/SMDAgent/applications.config/com.sap.smd.agent.application.wily/BytecodeAgent/ISAGENT.8.2.3.5-2011-09-13/wily/connectors"): java.io.IOException: error=2, No such file or directory.
    Error @ Diagnostic agent level
    Jun 6, 2014 10:52:31 AM [Thread[Thread-19,5,main]               
    ] Error
    Operation Failed :
    [EXCEPTION]
    com.sap.smdagent.vmmanager.VMManagerException: Failed to get Instance properties - 48161
    at com.sap.smdagent.vmmanager.impl700.VMManager._getSettings(VMManager.java:170)
    at com.sap.smdagent.vmmanager.impl700.VMManager.getSettings(VMManager.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sap.smd.server.exec.asio.AsioInvocationHandler$1.call(AsioInvocationHandler.java:94)
    at com.sap.smd.server.util.concurrent.FutureResult$1.run(FutureResult.java:90)
    at com.sap.smd.server.exec.asio.AsioInvocationHandler$AsioRunner.run(AsioInvocationHandler.java:285)
    at com.sap.smd.server.exec.TaskRunner.run(TaskRunner.java:46)
    at com.sap.smd.server.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:785)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.SecurityException: User is not authorized to access Configuration Manager.
    at com.sap.engine.services.configuration.ConfigurationRuntimeInterfaceImpl.checkAuthorization(ConfigurationRuntimeInterfaceImpl.java:62)
    at com.sap.engine.services.configuration.ConfigurationRuntimeInterfaceImpl.getConfigurationContext(ConfigurationRuntimeInterfaceImpl.java:48)
    at sun.reflect.GeneratedMethodAccessor392.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:159)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:336)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:201)
    1. As per standard note , patch levels are on sap recommended level only.
    2. Created connector manually as per wily documentation , but still no use.
    3. Given the permissions for temp,<SID>cluster etc.. as per sap notes and restarted all the services including sapstartsrv
    4. Assigend SPML roles as suggested by note.
    5. checked java environment and umask  for diagnostic users , everything looks ok.
       Checked couple of notes related to the above issue ,
       1616058 - XSRF possible in SPML Services in AS Java
       1820230 - Byte Code Adapter Installation error in Solution Manager 7.1 Managed System Configuration step Configure Automatically
        1752441 - Introscope Agent Connector generation is done using JDK at: null

    I would like paste few more error lines,
    Jun 9, 2014 6:43:33 AM [Thread[FileSystemService_4cdecd7c,5,main]
    ] Error 
    [WHS] Failed to find javaPath for node 5818350
    [EXCEPTION]
    com.sap.smdagent.vmmanager.VMManagerException: Failed to get Instance properties - 58183
    at com.sap.smdagent.vmmanager.impl700.VMManager._getSettings(VMManager.java:170)
    at com.sap.smdagent.vmmanager.impl700.VMManager.getSettings(VMManager.java:156)
    at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sap.smd.server.exec.asio.AsioInvocationHandler$1.call(AsioInvocationHandler.java:94)
    at com.sap.smd.server.util.concurrent.FutureResult$1.run(FutureResult.java:90)
    at com.sap.smd.server.exec.asio.AsioInvocationHandler$AsioRunner.run(AsioInvocationHandler.java:285)
    at com.sap.smd.server.exec.TaskRunner.run(TaskRunner.java:46)
    at com.sap.smd.server.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:785)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.SecurityException: User is not authorized to access Configuration Manager.

  • 1.4 bytecode on earlier VM

    Now I'm using JDK 1.4 all my progs give NoClassDefFoundException (or whatever is is when it can't find the class) on jview or IE's applet VM, they all worked OK on JDK 1.3. I've tried javac -target 1.1 to no avail
    Shish

    Sorry i'm at home...
    Hm it's just like the VM isnt able to find the main class.
    ie.: TestApplet.class compiled with 1.3 - no prob
    compiled with 1.4: Java Console:
    ClassNotFoundException : TestApplet.class
    and when i load the TestApplet.class into RetroGuard (Obfuscator)
    it shows that the class is corrupt. With the 1.3 bytecode there is no prob at
    all. Everything the same setting and same code! Only difference is
    the java version to compile that Class.
    Tried it at work on different computers with a lot of classes. Even Hello World Applets etc. When i enable the Sun Java Plugin everything works fine again.
    It's not a Classpath problem - not a jdk1.1-1.2 problem with MS VM - it's just like the 1.4 bytecode is not compatible with 1.1,1.2 or 1.3 bytecode.
    Best hint: try it... get Retroguard - it's free... and try to load a class which is
    compiled with 1.4 and the same class with 1.3! it says that the 1.4 class file is corrupt! So it's right that Explorer wont accept this classfile as a java classfile.
    Seems like Sun is trying to push their JRE with denying 1.4 bytecode to work in pure IE, even if it's jdk1.1 compatible!!!
    Sven

  • Visualize binary bytecode

    Is there a tool that would allow me to see the binary of the Java byte code for comparison against the disassembled code (i.e. see the actual '0's and '1' that correspond to a given byte code)?
    Thanks in advance,

    Thanks, I've just tryed it but probably I'm explaining myself wrongly.
    I get the hexa of the whole file, however I don't get any delimitations just a bunch of hexa that I cannot relate to the disassembled Java bytecode. I would like to see which bits correspond to which bytecode LINE by LINE. Here I get the correspondence of a whole disassembled file with a whole hexa file, but I need more detail and to be able to see it instruction by instruction. Probably it should be something like [objdump -d|http://linux.die.net/man/1/objdump] but for Java.
    Thanks again, I appreciate very much your help
    Edited by: jernestop on Oct 27, 2009 1:16 AM

  • Java Error when attempting Chat: Invalid bytecode

    When I loaded up the chat on opera, it said invalide bytecode. So I tried loading it on firefox and IE, and it gave me the same message, "Error. Click for details" so I click and this is what I come up with:
    load: class com.chatspace.v400320.Chat not found.
    java.lang.ClassNotFoundException: com.chatspace.v400320.Chat
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    Exception: java.lang.ClassNotFoundException: com.chatspace.v400320.Chat
    May someone tell me what's going on here? It worked fine all day, for months and now it decides to do this. I reinstalled the java 6.0 upgrade 11 as well and it did nothing to help. Running Windows XP Home edition

    Presumably you understand this site is for programmers writing code. Thus you are asking a question about code that you have written. If you are asking about an application that someone else wrote then you must ask them.
    When I loaded up the chat on opera, it said invalide bytecodeThe exception that you posted says nothing about invalid bytecodes. It says it can't find the class. That means it is a class path problem.

  • Location of variable and function names in SWF bytecode?

    Ok, so I'm looking at the specification PDF for v10 of a SWF file.
    Here is a link to it: http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf
    I can't find anything in there about where or how a SWF stores variable and function names in the bytecode, though SWF decompilers can find them in any SWF file. So they must be in there somewhere.
    Can any one help me on this one?

    Hi check the varaibles by giving ur tech.name of report input parameter to the below program,
    RSRQ_QUERYDEFINITION
    it will all the query details. So you can find ur varaibles where it is used exactly.
    bhaskar

  • Java bytecode generation

    I am a student and am doing a project on converting java syntax which is in english into my own language which is urdu. the problem is that i am not able to read a single word from java class file inorder to get the specified bytecode. please provide me guidance.

    My interpretation of your question, is that you want to extract the constant strings out of a class file, translate them from English to Urdu, and rewrite the class file ?
    Basically, localisation, without the source code ?
    Here's a link to the detailled format of the class file format.
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#80961
    You probably only need to know how to read the constant pool.
    It stores all the constant strings in a class file.
    You won't need to touch the byte code itself.
    ( The byte code is the actual instructions stored in a code tag within the method attribute )
    So, in theory, you could read in the constant pool, translate the strings and write out the translated string to a new classfile.
    ( has to be same name, but in a different directory )
    It would require at least intermediate Java skills though.
    regards,
    Owen

  • Where to learn about the java bytecode?

    I want to learn the JAVA bytecode. Where to find information about that?

    The list of opcodes, list of data types, and how to use them is here:
    http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html
    I personally use BCEL to manipulate class files.
    http://jakarta.apache.org/bcel/
    Some report they prefer Soot.
    http://www.sable.mcgill.ca/soot/

  • How to know when invoke bytecode implements?

    I've got a classfile - it has few invokeinterface bytecodes inside - their count is defined dynamically - when class is running.
    And I've got a program, which runs this class.
    The aim of this program - to gather statistics of invokeinterface calling frequency.
    How to know when invokeinterface bytecode implements?
    (In that moment I plan to update several digits)
    Have You got an advise for me?
    Thanks.

    You must use the debugging interface, or get a code profiler. Do a search on all forums for profiler, you'll get tons of information.

  • Java bytecode operation 'invokevirtual' does not keep consistency

    I have following codes.
    public class Parent {
    @Override
    public int hashCode() {
    return 0;
    public class Child extends Parent {
    public void test() {
    this.toString();
    this.hashCode();
    As you see in the above codes, Child inherits toString() from Object and hashCode() from Parent. Bytecode operation of Child#test is as following.
    ALOAD 0: this
    INVOKEVIRTUAL Object.toString() : String
    ALOAD 0: this
    INVOKEVIRTUAL Child.hashCode() : int
    RETURN
    I think if invokevirtual calls Object.toString(), it should call Parent.hashCode() for consistency. or, Child.hashCode() called, then Child.toString() should be called.
    However, invokevirtual does not keep its consistency if and only if target method is inherited by Object.
    Only that case, invokevirtual calls method in the Object. For other cases, invokevirtual calls method in current class.
    I want to know why this happens.

    I think if invokevirtual calls Object.toString(), it should call Parent.hashCode() for consistencyExcept that it doesn't exist.
    You can't seriously be suggesting that this doesn't work correctly.

  • Discussion: Bytecode protection

    This thread is about discussing the present state of Java bytecode (.class file) protection.
    To make your programs portable, you are supposed to make your program available as bytecodes (.class files), or maybe the bytecodes stuffed in a .jar file. The avialability of decompilers like DJ Java Decompiler makes it possible to reconstrust the source code from the bytecodes.
    So how do you protect your code? And what does Sun have in mind for this (the same possibly applies to Microsoft Intermediate Language [MSIL] run by the Common Language Runtime [CLR])?

    Discussed many times. Try using the site Search facility, and if that's still performing badly try pointing Google at this site.

  • Run-time debugging of bytecode

    Good morning to all, do you know if there does exists any tool that allows to run and debug a Java bytecode without having the corresponding Java source files?
    Thanks in advance,
    Umberto Ferraro

    Hi Rajesh,
      Here are the attributes.
    1.FIXED_COLS
    2.LINES
    3.TOP_LINE
    4.CURRENT_LINE
    5.LEFT_COL
    6.LINE_SEL_MODE
    7.COL_SEL_MODE
    8.LINE_SELECTOR
    9.V_SCROLL
    10.H_GRID
    11.V_GRID
    12.COLS
    13.INVISIBLE
    Edited by: Vigneswaran S on May 16, 2008 12:26 AM

  • Problem in Stringecho "no bytecode available"

    Firstly, thanks for this initiative, I think its greaT!
    After following all the instructions in the Getting Started
    Page, I reached the 22nd Step(Windows) and wrote
    mxmlc.exe -library-path+=../stringecho.swc
    --target-player=10.0.0 EchoTest.as
    in the command line.
    I got the following output and error: "Loading configuration
    file E:\flex3sdk\frameworks\flex-config.xml
    D:\alchemy_home\samples\stringecho\stringecho.swc(cmodule/stringecho/CLibInit):
    Error: No bytecode is available."
    Does anyone know why this happened?
    Also, I'm using FlashDevelop, is it posible to get this
    working with the refered IDE?
    Thanks

    I had this problem as well.
    I deleted stringecho.swc and after that when i compiled again i got this error:
    [Compiler] Error #1063: Unable to open file: /alchemy-cygwin-v0.5a/flashlibs/global.abc.
    It appeared that on Windows you have to set the access rights to the alchemy folder properly. Otherwise the compiler can not access all necessary folders.

Maybe you are looking for

  • PL/SQL Web Service problem in Oracle10g

    Hi everybody I try to publish PL/SQL Web Service using JDeveloper 9.0.4.0 and Oracle10g. But when I deploy the Web Service using 'http-web-site', error messages are: oracle.oc4j.admin.internal.DeployerException: Unknown site: http-web-site Active sit

  • Problem while posting in MIGO

    Dear All, Need your urgent help. While posting in MIGO, i am getting a short dump, run time error--Message_Type_X. The details of trigger location of runtime error is as follows: Program: SAPLMBWL Include: LMBWLU21 Row:  59 Function Module Name: MB_P

  • Brush Tool and edge slider

    Hi. When you use the brush tool and down in the properties you have the edge slider from 0 to 100. I always use it on 0 and continually have to keep adjusting it everytime i go back to the brush tool. Is there any way it can be set to 0? Steve

  • If loop giving error???

    Can anyone tell why is this throwing error??says Operator is undefined for String??? if (name.equalsIgnoreCase("RB_Smart" || "CRI_NRI1_468x60"))

  • Photoshop CC - Consistent App Crash

    I consistently receive this error at least once a week, if not daily when working in photoshop CC. Does anyone know the cause of this and how to fix? Using W7-64. It is so bad that I have had to change save settings to store every 5 minutes and lose