Compiling Java code with Japanese characters

I have a Java code with some Japanese characters. My compiler doesn't recognise these characters and gives me error messages.
Please help me.

Obviously it's not the copmiler's fault. You need to fix your code.
Here is a link to the Java Language Specification.
The link is to section 3.8 - Identifiers.
It describes the acceptable naming:
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625
Perhaps your editor is not saving the text file in an appropriate format.
What editor are you using?
Try vim http://www.vim.org
or SciTE http://www.scintilla.org/SciTE.html

Similar Messages

  • EXCEPTION_ACCESS_VIOLATION (0xc0000005) on compiled Java code

    I'm confronted with the following error of this code.
    http://db-www.naist.jp/~makoto-y/tmp/Int2LongHash.java
    The exception appears only when the system gets high-load.
    Is there work-arounds?
    I've tried also with jdk1.5.0_06, but the same error occurred.
    Converting the inner class to a top-level class has no effects.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00a2cd75, pid=1540, tid=2968
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b86 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x003f6800): JavaThread "main" [_thread_in_Java, id=2968]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfc2cee54
    Registers:
    EAX=0x42d43500, EBX=0x03d3ee00, ECX=0x03d3ee00, EDX=0x07911838
    ESP=0x0091f760, EBP=0x0091f778, ESI=0x0790f9f8, EDI=0xfc2cee38
    EIP=0x00a2cd75, EFLAGS=0x00010203
    Top of Stack: (sp=0x0091f760)
    0x0091f760: 0790ac30 079220b0 00000200 03d917f8
    0x0091f770: 00000000 6d955aa7 0091f7a8 00a2c9dc
    0x0091f780: 00000200 00000000 0091f7e8 00a12d50
    0x0091f790: 5ab674cf 00000000 07911838 03d3ee00
    0x0091f7a0: 03d8b700 00000010 0091f7f8 00a2c000
    0x0091f7b0: 03d8b700 078e4af4 00000010 00a2ab04
    0x0091f7c0: 078e4af4 03d8b700 00000010 00000001
    0x0091f7d0: 00000000 6d955ae7 5ab674d0 00000000
    Instructions: (pc=0x00a2cd75)
    0x00a2cd65: 20 8b fe c1 ef 09 c6 87 80 b1 5b 48 00 8b 79 20
    0x00a2cd75: 89 77 1c c1 ef 09 c6 87 80 b1 5b 48 00 8b e5 5d
    Stack: [0x008d0000,0x00920000), sp=0x0091f760, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg/apache/xerces/xni/QName;Lorg/apache/xerces/xni/Augmentations;)V
    J org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    j org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j org.apache.xerces.parsers.XML11Configuration.parse(Z)Z+132
    j org.apache.xerces.parsers.XML11Configuration.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+29
    j org.apache.xerces.parsers.XMLParser.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+9
    j org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+99
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x48aa5000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3636]
    0x48aa0800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4076]
    0x48a9e400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3144]
    0x48aac400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2248]
    0x48a86c00 JavaThread "Finalizer" daemon [_thread_blocked, id=2664]
    0x48a82800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2700]
    =>0x003f6800 JavaThread "main" [_thread_in_Java, id=2968]
    Other Threads:
    0x48a7f400 VMThread [id=4028]
    0x48aa6800 WatcherThread [id=3704]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 28616K [0x029d0000, 0x07890000, 0x07890000)
    eden space 64512K, 32% used [0x029d0000, 0x03e6fdd0, 0x068d0000)
    from space 8064K, 92% used [0x068d0000, 0x07022230, 0x070b0000)
    to space 8064K, 0% used [0x070b0000, 0x070b0000, 0x07890000)
    tenured generation total 967936K, used 253073K [0x07890000, 0x429d0000, 0x429d0000)
    the space 967936K, 26% used [0x07890000, 0x16fb4788, 0x16fb4800, 0x429d0000)
    compacting perm gen total 12288K, used 5879K [0x429d0000, 0x435d0000, 0x469d0000)
    the space 12288K, 47% used [0x429d0000, 0x42f8dd08, 0x42f8de00, 0x435d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jdk1.6.0\bin\javaw.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jdk1.6.0\jre\bin\msvcr71.dll
    0x6d7f0000 - 0x6da2f000      C:\Program Files\Java\jdk1.6.0\jre\bin\client\jvm.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x6d310000 - 0x6d318000      C:\Program Files\Java\jdk1.6.0\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d7a0000 - 0x6d7ac000      C:\Program Files\Java\jdk1.6.0\jre\bin\verify.dll
    0x6d3a0000 - 0x6d3bf000      C:\Program Files\Java\jdk1.6.0\jre\bin\java.dll
    0x6d7e0000 - 0x6d7ef000      C:\Program Files\Java\jdk1.6.0\jre\bin\zip.dll
    0x6d560000 - 0x6d573000      C:\Program Files\Java\jdk1.6.0\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d580000 - 0x6d589000      C:\Program Files\Java\jdk1.6.0\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(108924k free), swap 3511144k(1471688k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-beta2-b86) for windows-x86, built on Jun 2 2006 00:36:31 by "java_re" with unknown MS VC++:1310

    The following is the error that I got with using JDK 1.5.
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00b8c9f8, pid=4024, tid=1608
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    --------------- T H R E A D ---------------
    Current thread (0x00036190): JavaThread "main" [_thread_in_Java, id=1608]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfa424094
    Registers:
    EAX=0x00040e40, EBX=0xfa424078, ECX=0x05bd3fc0, EDX=0x05bd3fc0
    ESP=0x0007f578, EBP=0x0007f590, ESI=0xfa424078, EDI=0x081c8168
    EIP=0x00b8c9f8, EFLAGS=0x00010203
    Top of Stack: (sp=0x0007f578)
    0x0007f578: 081c1fa8 6d7d1061 022dd1c8 00000000
    0x0007f588: 00000200 00000200 0007f5c8 00b8c598
    0x0007f598: 0899f428 05bd3fc0 00000200 00000000
    0x0007f5a8: 0007f5c8 00b41018 00000200 000001cb
    0x0007f5b8: 05c50338 05c19448 05bd3fc0 000001a8
    0x0007f5c8: 0007f648 00b8b880 07dd565c 0899f428
    0x0007f5d8: 022dd1cb 00000000 08976190 00b8054c
    0x0007f5e8: 00001000 0000af89 00001000 6d7d1061
    Instructions: (pc=0x00b8c9f8)
    0x00b8c9e8: 89 5f 20 c1 e8 09 c6 80 00 a9 6c 48 00 8b 72 20
    0x00b8c9f8: 89 7e 1c c1 ee 09 c6 86 00 a9 6c 48 00 8b e5 5d
    Stack: [0x00040000,0x00080000), sp=0x0007f578, free space=253k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Lcom/sun/org/apache/xerces/internal/xni/QName;Lcom/sun/org/apache/xerces/internal/xni/Augmentations;)V
    J com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    v ~OSRAdapter
    j com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Z)Z+118
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+29
    j com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+9
    j com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+102
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    V [jvm.dll+0x845a9]
    V [jvm.dll+0xd9317]
    V [jvm.dll+0x8447a]
    V [jvm.dll+0x8b44a]
    C [java.exe+0x14c5]
    C [java.exe+0x64dd]
    C [kernel32.dll+0x16fd7]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00aa7490 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1780]
    0x00aa60f0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3456]
    0x00aa53f8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2544]
    0x00a96c80 JavaThread "Finalizer" daemon [_thread_blocked, id=856]
    0x00a957e8 JavaThread "Reference Handler" daemon [_thread_blocked, id=816]
    =>0x00036190 JavaThread "main" [_thread_in_Java, id=1608]
    Other Threads:
    0x0003fbd0 VMThread [id=3592]
    0x00ab0e20 WatcherThread [id=3108]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 59965K [0x02ae0000, 0x079a0000, 0x079a0000)
    eden space 64512K, 80% used [0x02ae0000, 0x05d8f7b0, 0x069e0000)
    from space 8064K, 99% used [0x069e0000, 0x071bfff8, 0x071c0000)
    to space 8064K, 0% used [0x071c0000, 0x071c0000, 0x079a0000)
    tenured generation total 967936K, used 451270K [0x079a0000, 0x42ae0000, 0x42ae0000)
    the space 967936K, 46% used [0x079a0000, 0x23251ab0, 0x23251c00, 0x42ae0000)
    compacting perm gen total 8192K, used 5367K [0x42ae0000, 0x432e0000, 0x46ae0000)
    the space 8192K, 65% used [0x42ae0000, 0x4301dfb0, 0x4301e000, 0x432e0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\Program Files\Java\jdk1.5.0_06\bin\java.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6e0000 - 0x6d874000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\client\jvm.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d6b0000 - 0x6d6bc000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\java.dll
    0x6d6d0000 - 0x6d6df000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\zip.dll
    0x6d530000 - 0x6d543000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d550000 - 0x6d559000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m -ea
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(370660k free), swap 3511144k(1545452k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0

  • Issue with Japanese characters in files/filenames in terminal.

    I recently downloaded a zip file with Japanese characters in the archive and in the files within the archive. The name of the archive is "【批量下载】パノプティコン労働歌 第一等.zip"
    The characters are properly displayed in firefox, chrome, and other applications, but in my terminal some of the characters appear corrupted. Screenshot: https://i.imgur.com/4R22m0D.png
    Additionally, this leads to corruption of the files in the archive. When I try to extract the files, this is what happens:
    % unzip 【批量下载】パノプティコン労働歌 第一等.zip
    Archive: 【批量下载】パノプティコン労働歌 第一等.zip
    extracting: +ii/flac/Let's -+-ʦ1,000,000-.flac bad CRC 5f603d51 (should be debde980)
    extracting: +ii/flac/+ѦѾP++ -instrumental-.flac bad CRC 78b93a2d (should be 3501d555)
    extracting: +ii/flac/----.flac bad CRC ddeb1d3e (should be c05ae84f)
    extracting: +ii/flac/+ѦѾP++.flac bad CRC 0ccf2725 (should be be2b58f1)
    extracting: +ii/flac/Let's -+-ʦ1,000,000--instrumental-.flac bad CRC 67a39f8e (should be ece37917)
    extracting: +ii/flac/.flac bad CRC f90f3aa0 (should be 41756c2c)
    extracting: +ii/flac/ -instrumental-.flac bad CRC 3be03344 (should be 0b7a9cea)
    extracting: +ii/flac/---- -instrumental-.flac bad CRC 569b6194 (should be adb5d5fe)
    I'm not sure what could be the cause of this. I'm using uxterm with terminus as my main font and IPA gothic (a Japanese font) as my secondary font. I have a Japanese locale set up and have tried setting LANG=ja_JP.utf8 before, but the results never change.
    Also, this issue isn't just with this file. This happens with nearly all archives that have Japanese characters associated with it.
    Has anyone encountered this issue before or knows what might be wrong?
    Last edited by Sanbanyo (2015-05-21 03:12:56)

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Compiling Java Servlet with Depricated Methods

    I have a problem of compiling Java servlets that contain depricated methods. If you compile against modern version of servlet.jar I see depricated methods error messages and if I use a very old servlet.jar it cannot find newer methods. What is is the best solution in this case?
    Thank you,
    Boris.

    The best thing to do would be compile your code with the -depreciated option to find which methods have been depreciated and the refactor your code to remove them.
    The next best thing is to ignore the messages (they are warnings not errors) and your code should still work

  • Error while running compiled java code

    Hi
    I have an evaluation license of the JDeveloper2.0 installed on my WindowsNT 4.0 workstation.
    I seem to have a problem running my compiled jave code. After compiling the source code(.java file) when I try to run the same I get a message saying
    "<FileName> not found in outpath classpath or sourcepath ".
    What does this mean and how can I rectify it?
    Regards
    Sree
    null

    Your classpath tells Java run time where to look for the class files it needs. In JDeveloper the class path is set in your project properties. Select Project->Properties and check that the source and output paths correspond to your myprojects and myclasses directories.

  • Problem to compile sample code with C++ Parser on Unix

    I just downloaded C++ parser and tried to compile the sample source code, but I got
    the following error:
    g++ -o DOMSample -I../include DOMSample.cpp -L../lib/xml8 -L../lib/core8 -L../lib/nls8 -L../lib/xmlc8 -L../lib/nsl -L../lib/socket
    Undefined first referenced
    symbol in file
    Node::getFirstChild(void) /var/tmp/ccarlA8y.o
    Node::getValue(void) /var/tmp/ccarlA8y.o
    XMLParser::xmlterm(void) /var/tmp/ccarlA8y.o
    XMLParser::getDocumentElement(void) /var/tmp/ccarlA8y.o
    xmlinit__9XMLParserPUcPFPvPCUcUi_vPvP8xmlsaxcbT3T1 /var/tmp/ccarlA8y.o
    Node::hasChildNodes(void) /var/tmp/ccarlA8y.o
    Node::getChildNode(unsigned int) /var/tmp/ccarlA8y.o
    Node::getName(void) /var/tmp/ccarlA8y.o
    Node::numChildNodes(void) /var/tmp/ccarlA8y.o
    XMLParser::xmlparse(unsigned char *, unsigned char *, unsigned int)/var/tmp/ccarlA8y.o
    Node::getType(void) /var/tmp/ccarlA8y.o
    ld: fatal: Symbol referencing errors. No output written to DOMSample
    collect2: ld returned 1 exit status
    make: *** [DOMSample] Error 1
    Please help me out. Thanks,
    null

    I have the similar problem when I tried to compile sample code with C++ parser on WinNT4. I am using Micrsoft Visual Studio V6.0. I added the include file and lib file in the path.
    Here are the error messages:
    Linking...
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall XMLParser::xmlterm(void)" (?xmlterm@XMLParser@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall DocumentType::getEntities(void)" (?getEntities@DocumentType@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NamedNodeMap::item(unsigned int)" (?item@NamedNodeMap@@QAEPAVNode@@I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall NamedNodeMap::getLength(void)" (?getLength@NamedNodeMap@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall DocumentType::getNotations(void)" (?getNotations@DocumentType@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class DocumentType * __thiscall XMLParser::getDocType(void)" (?getDocType@XMLParser@@QAEPAVDocumentType@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall XMLParser::xmlparse(unsigned char *,unsigned char *,unsigned int)" (?xmlparse@XMLParser@@QAEIPAE0I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall XMLParser::xmlclean(void)" (?xmlclean@XMLParser@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::replaceData(unsigned long,unsigned long,unsigned char *)" (?replaceData@CharacterData@@QAEXKKPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::deleteData(unsigned long,unsigned long)" (?deleteData@CharacterData@@QAEXKK@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::insertData(unsigned long,unsigned char *)" (?insertData@CharacterData@@QAEXKPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::appendData(unsigned char *)" (?appendData@CharacterData@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall CharacterData::substringData(unsigned long,unsigned long)" (?substringData@CharacterData@@QAEPAEKK@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall CharacterData::getLength(void)" (?getLength@CharacterData@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::setData(unsigned char *)" (?setData@CharacterData@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall CharacterData::getData(void)" (?getData@CharacterData@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Text::splitText(unsigned long)" (?splitText@Text@@QAEPAVNode@@K@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::cloneNode(int)" (?cloneNode@Node@@QAEPAV1@H@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NamedNodeMap::removeNamedItem(unsigned char *)" (?removeNamedItem@NamedNodeMap@@QAEPAVNode@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall NamedNodeMap::setNamedItem(class Node *,class Node * *)" (?setNamedItem@NamedNodeMap@@QAEHPAVNode@@PAPAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall Node::getAttributes(void)" (?getAttributes@Node@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::removeAttributeNode(class Attr *)" (?removeAttributeNode@Element@@QAEPAVAttr@@PAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::setAttribute(unsigned char *,unsigned char *)" (?setAttribute@Element@@QAEPAVAttr@@PAE0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Element::removeAttribute(unsigned char *)" (?removeAttribute@Element@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::getAttributeNode(unsigned char *)" (?getAttributeNode@Element@@QAEPAVAttr@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Attr::setValue(unsigned char *)" (?setValue@Attr@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Element::setAttributeNode(class Attr *,class Attr * *)" (?setAttributeNode@Element@@QAEHPAVAttr@@PAPAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Document::createAttribute(unsigned char *,unsigned char *)" (?createAttribute@Document@@QAEPAVAttr@@PAE0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class DocumentFragment * __thiscall Document::createDocumentFragment(void)" (?createDocumentFragment@Document@@QAEPAVDocumentFragment@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Element::normalize(void)" (?normalize@Element@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::removeChild(void)" (?removeChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::replaceChild(class Node *)" (?replaceChild@Node@@QAEPAV1@PAV1@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall Node::getOwnerDocument(void)" (?getOwnerDocument@Node@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getParentNode(void)" (?getParentNode@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NodeList::item(unsigned int)" (?item@NodeList@@QAEPAVNode@@I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall NodeList::getLength(void)" (?getLength@NodeList@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NodeList * __thiscall Document::getElementsByTagName(class Element *,unsigned char *)" (?getElementsByTagName@Document@@QAEPAVNodeList@@PAVElement@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Node::setValue(unsigned char *)" (?setValue@Node@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getPreviousSibling(void)" (?getPreviousSibling@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getLastChild(void)" (?getLastChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getNextSibling(void)" (?getNextSibling@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getFirstChild(void)" (?getFirstChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::insertBefore(class Node *,class Node *)" (?insertBefore@Node@@QAEPAV1@PAV1@0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class EntityReference * __thiscall Document::createEntityReference(unsigned char *)" (?createEntityReference@Document@@QAEPAVEntityReference@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class CDATASection * __thiscall Document::createCDATASection(unsigned char *)" (?createCDATASection@Document@@QAEPAVCDATASection@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class ProcessingInstruction * __thiscall Document::createProcessingInstruction(unsigned char *,unsigned char *)" (?createProcessingInstruction@Document@@QAEPAVProcessingInstruction@@PA
    E0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Comment * __thiscall Document::createComment(unsigned char *)" (?createComment@Document@@QAEPAVComment@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Text * __thiscall Document::createTextNode(unsigned char *)" (?createTextNode@Document@@QAEPAVText@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Element * __thiscall XMLParser::getDocumentElement(void)" (?getDocumentElement@XMLParser@@QAEPAVElement@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::appendChild(class Node *)" (?appendChild@Node@@QAEPAV1@PAV1@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Element * __thiscall Document::createElement(unsigned char *)" (?createElement@Document@@QAEPAVElement@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall XMLParser::getDocument(void)" (?getDocument@XMLParser@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall XMLParser::createDocument(void)" (?createDocument@XMLParser@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall XMLParser::xmlinit(unsigned char *,void (__cdecl*)(void *,unsigned char const *,unsigned int),void *,struct xmlsaxcb *,void *,unsigned char *)" (?xmlinit@XMLPar
    ser@@QAEIPAEP6AXPAXPBEI@Z1PAUxmlsaxcb@@10@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall Node::numChildNodes(void)" (?numChildNodes@Node@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NodeList * __thiscall Node::getChildNodes(void)" (?getChildNodes@Node@@QAEPAVNodeList@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Node::hasChildNodes(void)" (?hasChildNodes@Node@@QAEHXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Attr::getValue(void)" (?getValue@Attr@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Attr::getSpecified(void)" (?getSpecified@Attr@@QAEHXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Attr::getName(void)" (?getName@Attr@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Node::getValue(void)" (?getValue@Node@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Node::getName(void)" (?getName@Node@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: short __thiscall Node::getType(void)" (?getType@Node@@QAEFXZ)
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/orafulldom.exe : fatal error LNK1120: 64 unresolved externals
    Error executing link.exe.
    orafulldom.exe - 65 error(s), 0 warning(s)
    null

  • Embedded Java code with bpelx:exec

    When I embed Java code with bpelx:exec, I would like use classes packaged in a jar file. How do I ensure that the jar file is deployed with the suitcase? I tried adding the library to the JDeveloper project (right-click project, choose properties, libraries), but that did not work.

    Although the tooling does not expose this functionality yet, the bpel packaging and bpelc command line tool support the ability to put a library in BPEL-INF/lib and using it in the exec activity. You can also put classes in BPEL-INF/classes. Please look at:
    [ORACLE_HOME]\integration\orabpel\samples\references\JavaExec for more information.
    -Edwin

  • How to check for a logic bomb in compiled java code ?

    I have couple of security requirements.
    1. How do I check for logic bomb in the compiled java code ?
    2. Is there any way to monitor memory utilized by class when running inside a constructor ?

    1. Let me see if you can define 'logic bomb', then maybe a answer can be supplied. If you simply mean malicious code, then in general you cannot. You can attempt to do the kinds of things that antivirus software does, like check for the existence of known malicious code and code patterns, but that won't work any better on Java than it does on anything else.
    2. Google java profiling. Also, for something relatively simple, read about jconsole.

  • Collation issue with Japanese characters in Oracle8i

    Hi,
    I have japanese data in a varchar2 column in an Oracle8i instance which contains both single byte and multibyte Japanese characters. The encoding type of the instance is UTF-8.
    I want to sort them in such a way that equivalent single byte and multibyte Japanese characters are treated as same. Also while selecting, if I specify the single byte characters in the where condition it should select both single and double byte characters and vice-versa.
    The functionality I'm looking for is similar to the one which can be achieved by using Collator class in Java with FULL_DECOMPOSITION as decmposition mode.
    Could anyone please let me know how can I do it ?
    Thanks in advance.
    Best Regards,
    Sourav

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Oracle Report Server Issue with Japanese Characters

    We are trying to setup a Oracle Report Server to print the Japanese characters in the PDF format.
    We have separate Oracle Report servers for printing English, Chinese and Vietnamese characters in PDF formats using Oracle Reports in the production which are running properly with Unix AIX version 5.3. Now we have a requirement to print the Japanese characters. Hence we tried to setup the new server for the same and the configurations are done as same as Chinese/Vietnamese report servers. But we are not able to print the Japanese characters.
    I am providing the details which we followed to configure this new server.
    1.     We have modified the reports.sh to map the proper NLS_LANG (JAPANESE_AMERICA.UTF8) and other Admin folder settings.
    2.     We have configured the new report server via OPMN admin.
    3.     We have copied the arialuni.ttf to Printers folder and we have converted this same .ttf file in AFM format. This AFM file has been copied to $ORACLE_HOME/guicommon/gk/JP_Admin/AFM folder.
    4.     We have modified the uifont.ali (JP_admin folder) file for font subsetting.
    5.     We have put an entry in JP_admin/PPD/datap462.ppd as *Font ArialUnicodeMS: Standard "(Version 1.01)" Standard ROM
    6.     We have modified the Tk2Motif.rgb (JP_admin folder) file for character set mapping (Tk2Motif*fontMapCs: iso8859-1=UTF8) as we have enabled this one for other report servers as well.
    Environment Details:-
    Unix AIX version : 5300-07-05-0831
    Oracle Version : 10.1.0.4.2
    NLS_LANG : JAPANESE_AMERICA.UTF8
    Font Mapping : Font Sub Setting in uifont.ali
    Font Used for Printing : arialuni.ttf (Font Name : Arial Unicode MS)
    The error thrown in the rwEng trace (rwEng-0.trc) file is as below
    [2011/9/7 8:11:4:488] Error 50103 (C Engine): 20:11:04 ERR REP-3000: Internal error starting Oracle Toolkit.
    The error thrown when trying to execute the reports is…
    REP-0177: Error while running in remote server
    Engine rwEng-0 crashed, job Id: 67
    Our investigations and findings…
    1.     We disabled the entry Tk2Motif*fontMapCs: iso8859-1=UTF8 in Tk2Motif.rgb then started the server. We found that no error is thrown in the rwEng trace file and we are able to print the report also in PDF format… (Please see the attached japarial.pdf for your verification) but we are able to see only junk characters. We verified the document settings in the PDF file for ensuring the font sub set. We are able to see the font sub setting is used.
    2.     If we enable the above entry then the rwEng trace throwing the above error (oracle toolkit error) and reports engine is crashed.
    It will be a great help from you if you can assist us to resolve this issue…

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Not Able  to Compile Java code

    Hi Java Gurus
    I am not able to compile this code Pl help
    class For {
    public static void main (String [] args) {
    int I = 0;
    show:
         if (I < 2) {
    System.out.print("I is " + I);
    I++;
    continue show;
    }

    class For {
    public static void main (String [] args) {
          for(int i = 0; i < 2; i++){
                  System.out.print("I is " + i);
    }this does the same as your program: the for loop is the best for this, but i agree with the others read some tutorials on loops in java. As posted before java has no concept of the GoTo syntax, loops or recursion are your only options

  • Help required in compiling Java Code.

    I have java1.6 installed on my PC but I want to compile my code in such a way that
    it will run on PCs with lower versions of java installed.
    I am not using any feature specific to java1.6 in my program.
    I am using Netbeans IDE 6.1
    Thanks in advance.

    calypso wrote:
    Im not 100% sure of this but I would of thought a program will compile on any version of java as long as you dont use classes that are exclusive to higher version of java
    for example i would think if you comiled the helloworld tutorial on v.1.6 it will run on computers with lower versions.
    However a program which uses the scanner class (i think exclusive to 1.6 or 1.5 not sure though) will not run on say 1.2
    CalypsoIve tested to run an complied class(version 1.6) on an computer with jre 1.5 installed(before), and it doesnt work. Dont remember precisly the error but it didnt run atleast.

  • Executing tiny programming language compiled byte code with the JVM

    Hello,
    For a project, I am developing a simple programming language, with a syntax not unlike Pascal, which compiles to Java Byte Code. Currently I execute the compiled byte code using my own interpreter. This works OK, but what I'd like to do now is to execute the compiled byte code using the actual existing JVM. The compiled byte code resides in a text file upon compilation of a sample program written in my tiny programming language. Does anyone know how I may start to go about this? Thanks in advance.
    adam

    The only way of getting a standard Java virtual machine to execute your java byte code, is to wrap it up into a completely valid java class file.
    Any constants you use, must be put into the classes constant pool.
    Any local variables will have to go into the local variable table of the method which uses them... etc, etc.
    Something like ASM, would let you dynamically create a Java class file.
    http://asm.objectweb.org/
    regards,
    Owen

  • Compiling java code from a running java application

    How does compiling of java code from a running java application work?
    I found a class: com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class works.

    How does compiling of java code from a running java
    application work?Probably most reliably using Runtime.exec().
    I found a class:
    com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class
    works.For a purpose. You are not supposed to use this class. With the next JRE release or implementation, it might not exist anymore - it's not part of the standard API.

  • Compile c code with makefile

    i have the source code for a program on my mac and i dont really know how to compile it.
    it has a makefile and all of the sources but i dont really know how to compile it
    the source code is at this website
    http://bcrypt.sourceforge.net/
    how do i compile the code on os x
    ?

    Hi--
    First off, you have to have the developer tools installed. You can download the latest version at Apple's Developer web site:
    http://developer.apple.com/products/online.html
    Or, there will be an appropriate version for your OS located on the DVD or CD that contains your OS installation.
    Since your code has a makefile, you simply need to open the Terminal application and change into the directory with your source code, and type make at the prompt. If you're not familiar with the Unix command line, I'd suggest any one of dozens of tutorials on how to maneuver around your computer in the Terminal. This is only one example:
    http://www.osxfaq.com/Tutorials/LearningCenter/
    charlie

Maybe you are looking for

  • Since updating to ios 7 my itunes on the handset will not load any pictures/detail?

    Since updating my ipne 4s to the new ios 7 i cannot get the itunes on the handset to work, no pictures/detail appears just along the bottom of the screen , music, film, search etc.  I've also installed the latest update if itunes but it still doesnt

  • An unknown error occurred (-50) while uploading my library from a disc.

    I seriously need some help here. I recently wiped my computer and reinstalled everything. I have a PC with Windows XP Pro. I made sure that I backed up my entire iTunes library on DVD-RW's. My entire Libray is on five of these. Disc one and two works

  • Saving a pdf document

    I am using adobe reader on Windows 8. I am trying to save a pdf document to my laptop hard drive but it is not allowed and I get the error 'The document cannot be saved. There was a problem reading this document (135)'. anyone got any ideas? Tony

  • Remove Incidents in Data Warehouse DB

    Hi Is there a way to delete Incidents / Change items from the Data Warehouse DB so "test-workitems" don´t show up in reports? I know there´s no supported way of doing this, except re-install the DW-DB. But i don´t want to wipe the history just to rem

  • Have problem to enable CS6 using Adobe ID or the serial.

    Hello, we have problem to enable CS6 using Adobe ID or the serial . Follow the error information : We passed all these tests . https://helpx.adobe.com/br/download-install.html a) What applications are you trying to install ? CS6 Master Collection b)