Wrong charset in jar file
I'm using NetBeans 6.7.1, Firebird 2.1 with UTF8 charset. "jdbc:firebirdsql:localhost:erpdebug?sql_role_name=TENDERING;lc_ctype=utf8"
All works fine until program inside NetBeans. When jar file starts outside IDE - all non-English characters becomes corrupt. Only database data, not entire program.
Much clearer, thank you. However:
I cannot set any locale to IDE at allIn sincerely doubt that that is true - I'm no NetBeans expert, but it's a Java app that (in turn) runs Java apps. I'd expect you to be able to set the locale at both levels and I'll be astonished if it's not possible. I'm not saying that's the bug, but it's the first thing I'd want to check.
Any NB experts in the house?
Similar Messages
-
Hi All,
I have a moronic question. I have a simple jar file called xmlpowertoolkit.jar and I can't get any of the classes in it imported into my simple console app.
I unpacked the jar file to look at the namespace hierarchy since I have no documentation with this jar file. It came out like this:
xmlpowertoolkit\com\sabre\xmlpowertoolkit\
... then a bunch of classes in this directory. Specifically, there is a class called XMLPowerToolKit_Services that I need to use. Here is a typical constructor call for this class:
XMLPowerToolKit_Services myvar = new XMLPowerToolKit_Services ();
Can someone tell me what I'm doing wrong with this jar file? How do I import this namespace so that I can use the class?
Do I not say:
import com.sabre.*;
Thanks for your help.
Steven TateTry
import xmlpowertoolkit.com.sabre.xmlpowertoolkit.*;
OR
import com.sabre.xmlpowertoolkit.*;
I think com.sabre.* will just get you the classes at that "level" ... it doesn't grab the classes in subfolders.
i hope that works. -
Error JCo starting .jar file
Dear all,
I am new to Java, but I try to implement a small application which talks to our SAP. I am working with eclipse 3.3 and I've installed JCO 2.1.8. I modified Example1 a little bit and everything works fine when I start my program within eclipse with run as->java application. I added the sapjco.jar file to the build path of my project. I also added C:\Programme\sapjco-ntintel-2.1.8 to my windows path variable and copied *.dll to system32. When I export my project as a .jar file and try to start it with
java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. -jar Jco.jar
I get the error message
java.lang.NoClassDefFoundError: com/sap/mw/jco/IMetaData
The contents of my .classpath file is:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Programme/sapjco-ntintel-2.1.8/sapjco.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
But I can start the java program with
java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. Jco
when I am in the directory with the .class file.
Whats wrong with my .jar file?
Thanks in advance,
Rolf
Message was edited by:
Rolf WinterHi,
thanks for your answers.
C:\Programme\sapjco-ntintel-2.1.8 containing sapjco.jar is already added to the path environment variable.
summary:
-I installed JCO in folder C:\Programme\sapjco-ntintel-2.1.8
-I copied *.dll to Windows\system32
-I added C:\Programme\sapjco-ntintel-2.1.8 to the path environment variable
-sapjco.jar is in the building path
-<i>I can start the "normal Java .class file"</i> with java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. Jco
-I've created a jar file with the export dialog. I just followed the steps and selected the starting class "Jco".
-In the directory containing the jar file I tried to start it with the following commands
java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. -jar Jco.jar
java -jar Jco.jar
but I always get the message
Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/mw/jco/IMetaData
Any further ideas?
Rolf -
JWS requests jar files at the wrong place
Hi all,
I created JWS project with netbeans, and by deafult, NB places all required jar files in the "lib" folder. NB also created jnlp file with correct paths to required files. It looks like this
<update check="always" policy="always"/>
<resources>
<jar download="eager" href="main.jar" main="true"/>
<jar download="eager" href="lib/required.jar" main="false"/>
</resources> Now, when app is started, required.jar is correctly located at lib folder and application works, but from that moment on, JWS makes hundreds of request for "${codebase}/required.jar" (obviously wrong place) and gets 404 responses. It keeps making these requests as long as app is running and this slows down application significantly.
My temp workaround was to move required.jar to codebase root and problem is gone, but i still find it weird. I guess this may explain some complaints about slow JWS.
Is this a bug? Am I doing something wrong? Is there anything I can check?
Thanks!dario wrote:
..Is there anything I can check?The JNLP file, using JaNeLA. Even the three lines shown appear to include mistakes (probably because Ntebeans wrote it). -
Invalid MAGIC number in jar file
HI Gentlemen,
I just compiled a java file into a class file and then set up a jar file with that one single class. Manifest indicates that the Java version is 1.7.0 as is any other development tool. Now I am inspecting the file with my hex editor and it does not contain CAFEBABE as a magic number. However, a legacy jar file in an Applet sample code has it and works correctly. It was as well with my JDK 1.7.0 compiled. What can be wrong with my method? JDeveloper does not accept the jar when I want to deploy and call the applet.
Please help if you can.
Many thanks in advance, kindly regards
Miklos HERBOLYHI gimbal2,
Thank you for your reply. Just to start with, I included here some stuff.
(i) JDeveloper parameters
About
Oracle JDeveloper 11g Release 1 11.1.1.6.0
Studio Edition Version 11.1.1.6.0
Build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
Copyright © 1997, 2011 Oracle and/or its affiliates. All rights reserved.
IDE Version: 11.1.1.6.38.61.92
Product ID: oracle.jdeveloper
Product Version: 11.1.1.6.38.61.92
Version
Component Version
========= =======
ADF Business Components 11.1.1.61.92
Java(TM) Platform 1.7.0
Oracle IDE 11.1.1.6.38.61.92
Versioning Support 11.1.1.6.38.61.92
Properties
Name Value
==== =====
awt.toolkit sun.awt.windows.WToolkit
ceditor.java.parse.large 1500
ceditor.java.parse.small 300
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
compiler.vmargs -Xmx512m
EDITOR_J2SE_VERSION 1.5
feedbackmanager.disable false
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.7.0; Windows 7 6.1 x86; en_US) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.bootstrap.start 12082784954629
ide.build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
ide.conf C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev.conf
ide.config_pathname C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev.conf
ide.debugbuild false
ide.devbuild false
ide.editions oracle.studio, oracle.j2ee, oracle.jdeveloper
ide.extension.role.search.path jdev/roles
ide.extension.search.path jdev/extensions:sqldeveloper/extensions
ide.feedbackmanager.customer false
ide.firstrun false
ide.java.maxversion 1.8
ide.java.minversion 1.6.0_04
ide.launcherProcessId 2132
ide.main.class oracle.ide.boot.IdeLauncher
ide.max.jar.handles 500
ide.old.user.country DE
ide.old.user.language de
ide.patches.dir jdev/lib/patches
ide.pref.dir C:\Users\gksadmin\AppData\Roaming\JDeveloper
ide.pref.dir.base C:\Users\gksadmin\AppData\Roaming
ide.product oracle.jdeveloper
ide.role <none>
ide.shell.enableFileTypeAssociation C:\Oracle\Middleware\jdeveloper\jdeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\Oracle\Middleware\jdeveloper\jdeveloper.exe
ide.startingcwd C:\Oracle\Middleware\jdeveloper
ide.throttleLocale true
ide.user.dir C:\Users\gksadmin\AppData\Roaming\JDeveloper
ide.user.dir.var JDEV_USER_HOME,JDEV_USER_DIR
ide.work.dir C:\\JDeveloper
ide.work.dir.base C:\Users\gksadmin\Documents
ilog.propagatesPropertyEditors false
inJUIDesigntime true
insight.suppresshidden true
INSIGHT_OMIT_HIDDEN true
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 51.0
java.endorsed.dirs C:\Java\jdk1.7.0\jre\lib\endorsed
java.ext.dirs C:\Java\jdk1.7.0\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\Java\jdk1.7.0\jre
java.io.tmpdir C:\Users\gksadmin\AppData\Local\Temp\
java.library.path C:\Oracle\Middleware\jdeveloper;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\app\gksadmin\product\11.2.0\dbhome_1\bin;c:\Java\jdk1.7.0\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\ocf\lib;c:\Windows/System32;C:\Java\jdk1.7.0\bin;.
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.protocol.handler.pkgs oracle.jdevimpl.handler
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.7.0-b147
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 1.7
java.vendor Oracle Corporation
java.vendor.url http://java.oracle.com/
java.vendor.url.bug http://bugreport.sun.com/bugreport/
java.version 1.7.0
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Oracle Corporation
java.vm.specification.version 1.7
java.vm.vendor Oracle Corporation
java.vm.version 21.0-b17
javax.xml.parsers.DocumentBuilderFactory oracle.xml.jaxp.JXDocumentBuilderFactory
jbo.debugoutput silent
jbo.showdebugwarningbanner false
jps.authz NULL
line.separator \r\n
oracle.adfm.usemds false
oracle.home C:\Oracle\Middleware\jdeveloper
oracle.j2ee.extension.status enabled
oracle.jbo.usemds false
oracle.jdbc.Trace true
oracle.jdeveloper.webservice.hidePropertyOverride false
oracle.jdeveloper.webservice.showAllOwsmPolicyTypes false
oracle.mds.internal.config.override.emptystore true
oracle.security.jps.config /C:/Users/gksadmin/AppData/Roaming/JDeveloper/system11.1.1.6.38.61.92/DefaultDomain/config/fmwconfig/jps-config-jse.xml
oracle.soap.transport.noHTTPClient true
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
os.arch x86
os.name Windows 7
os.version 6.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sun.arch.data.model 32
sun.awt.disablegrab true
sun.awt.enableExtraMouseButtons true
sun.awt.keepWorkingSetOnMinimize true
sun.boot.class.path ../lib/lwawt.jar;C:\Java\jdk1.7.0\jre\lib\endorsed\javax.annotation_1.0.0.0_1-0.jar;C:\Java\jdk1.7.0\jre\lib\endorsed\javax.xml.bind_2.1.1.jar;C:\Java\jdk1.7.0\jre\lib\endorsed\javax.xml.ws_2.1.1.jar;C:\Java\jdk1.7.0\jre\lib\resources.jar;C:\Java\jdk1.7.0\jre\lib\rt.jar;C:\Java\jdk1.7.0\jre\lib\sunrsasign.jar;C:\Java\jdk1.7.0\jre\lib\jsse.jar;C:\Java\jdk1.7.0\jre\lib\jce.jar;C:\Java\jdk1.7.0\jre\lib\charsets.jar;C:\Java\jdk1.7.0\jre\classes;C:\Java\jdk1.7.0\lib\tools.jar;C:\Java\jdk1.7.0\lib\dt.jar
sun.boot.library.path C:\Java\jdk1.7.0\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.noddraw true
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level
svnkit.sax.useDefault true
user.country US
user.dir C:\Oracle\Middleware\jdeveloper\jdev\bin
user.home C:\Users\gksadmin
user.language en
user.name gksadmin
user.script
user.timezone Europe/Berlin
user.variant
wasp.location ../../uddi
weblogic.home C:\Oracle\Middleware\wlserver_10.3\server
weblogic.security.SSL.ignoreHostnameVerification true
weblogic.security.TrustKeyStore DemoTrust
windows.shell.font.languages en
Extensions
Name Identifier Version Status
==== ========== ======= ======
ADF Business Components oracle.BC4J 11.1.1.6.38.61.92 Loaded
ADF Business Components Annotations oracle.adfbcdt.annotations 11.1.2 Loaded
ADF Business Components Dependency oracle.bc4j.dependency 11.1.1.6.38.61.92 Loaded
ADF Business Components Deployment oracle.bc4jdt.deploy 11.1.1.6.38.61.92 Loaded
ADF Business Components Modeler oracle.adfbcdt.modeler 11.1.1.6.38.61.92 Loaded
ADF Business Components Syscat oracle.bc4j.syscat 0 Loaded
ADF Business Components Tester oracle.bc4j.tester 11.1.1.6.38.61.92 Loaded
ADF Common Audit oracle.adf.common.audit 0 Loaded
ADF Context Debugger oracle.adf.share.debug 11.1.1.6.38.61.92 Loaded
ADF Controller Configuration Design Time oracle.adf.controller.config.dt 11.1.1.6.38.61.92 Loaded
ADF Data Visualizations Design Time Tests oracle.dvt.dt 11.1.1.6.38.61.92 Loaded
ADF Debugger oracle.adf.debug 11.1.1.6.38.61.92 Loaded
ADF Debugger Diagram Support oracle.adf.debug.diagram 11.1.1.6.38.61.92 Loaded
ADF Desktop Integration Design Time oracle.adfdt.desktopintegration 11.1.1.6.38.61.92 Loaded
ADF Faces Cache oracle.webcache 11.1.1.6.38.61.92 Loaded
ADF Faces Data Visualization Tools Help oracle.dvt-faces-doc 11.1.1.0.0 Loaded
ADF Faces Databinding Design Time oracle.adf-faces-databinding-dt 11.1.1.6.38.61.92 Loaded
ADF Faces Design Time oracle.adf-faces-dt 11.1.1.6.38.61.92 Loaded
ADF Faces Design Time Migration oracle.adffacesdt.migration 11.1.1.6.38.61.92 Loaded
ADF Faces Runtime Help oracle.adf-faces-rt-doc 11.1.1.0.0 Loaded
ADF Faces Skin Design Time oracle.adf-faces-skin-dt 11.1.1.6.38.61.92 Loaded
ADF JMX Data Control Designtime oracle.adf.jmxdc 11.1.1.6.38.61.92 Loaded
ADF Java Server Faces Diagram oracle.adf.jsf.diagram 11.1.1.6.38.61.92 Loaded
ADF Library Design Time oracle.jdeveloper.adflibrary 11.1.1.6.38.61.92 Loaded
ADF Lifecycle Design Time oracle.adf.lifecycle.dt 11.1.1.6.38.61.92 Loaded
ADF Management Pages oracle.adf.management 11.1.1.6.38.61.92 Loaded
ADF Menu Model Design-Time oracle.adfmenudt 11.1.1.6.38.61.92 Loaded
ADF Page Flow Design Time oracle.adf.pageflow.dt 11.1.1.6.38.61.92 Loaded
ADF Page Flow Design Time Extras oracle.adf.pageflow.dt.extras 11.1.1.6.38.61.92 Loaded
ADF Page Template DT oracle.adf-faces-templating-dt 11.1.1.6.38.61.92 Loaded
ADF Region Design Time oracle.adf-faces-region-dt 11.1.1.6.38.61.92 Loaded
ADF Struts Page Flow Modeler oracle.struts.adf 11.1.1.6.38.61.92 Loaded
ADF Struts and Model One Databinding oracle.adf.struts.and.model.one.databinding.dt 11.1.1.6.38.61.92 Loaded
ADF Swing oracle.adfdt.swingcore 11.1.1.6.38.61.92 Loaded
ADF View Debugging Design Time adf.view.debugging.dt 11.1.1.6.38.61.92 Loaded
ADFv Common Databinding oracle.adf-view-databinding-dt 11.1.1.6.38.61.92 Loaded
Ant oracle.ant 11.1.1.6.38.61.92 Loaded
Application Server Manager oracle.jdeveloper.asnav 11.1.1.6.38.61.92 Loaded
Application State - Application Navigator oracle.ideimpl.appstate.appnav 11.1.1.6.38.61.92 Loaded
Application State - Editors oracle.ide.appstate.editors 11.1.1.6.38.61.92 Loaded
Application State Manager oracle.ide.appstate 11.1.1.6.38.61.92 Loaded
Archive Compare oracle.jdeveloper.archive-compare 11.1.1.6.38.61.92 Loaded
Audit Oracle Public Cloud Support oracle.jdeveloper.audit.cloud 11.1.2 Loaded
BI Beans Graph oracle.bibeans 11.1.1.6.38.61.92 Loaded
BM metamodel framework oracle.bm.meta 11.1.1.6.38.61.92 Loaded
Bug Reporter oracle.jdeveloper.bugfiler 11.1.1.6.38.61.92 Loaded
Business Modelers oracle.bm 11.1.1.6.38.61.92 Loaded
Check For Updates oracle.ide.webupdate 11.1.1.6.38.61.92 Loaded
Code Editor oracle.ide.ceditor 11.1.1.6.38.61.92 Loaded
Command Line Formatting Support oracle.jdeveloper.ojformat 11.1.1.6.38.61.92 Loaded
Command Line Make/Rebuild Support oracle.jdevimpl.oj-compiler 11.1.1.6.38.61.92 Loaded
Common Controller Design-Time oracle.controller.dt 11.1.1.6.38.61.92 Loaded
Common Page Flow Design-Time oracle.pageflow.dt 11.1.1.6.38.61.92 Loaded
Component Palette oracle.ide.palette1 11.1.1.6.38.61.92 Loaded
Controller to ADF Bindings Bridge oracle.controller.bindings.dt 11.1.1.6.38.61.92 Loaded
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.6.38.61.92 Loaded
Database Features (JDeveloper) oracle.jdeveloper.db 11.1.1.6.38.61.92 Loaded
Database Features (SQLDeveloper in JDeveloper) oracle.jdeveloper.db.navigator 11.1.1.6.38.61.92 Loaded
Database Modeler oracle.dbmodeler 11.1.1.6.38.61.92 Loaded
Database Modeler Migration oracle.dbmodeler.migrate 11.1.1.6.38.61.92 Loaded
Database Object Dependency API Support oracle.jdeveloper.db.dependency 11.1.1.6.38.61.92 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.6.38.61.92 Loaded
Database Object Transfer Framework oracle.jdeveloper.db.transfer 11.1.1.6.38.61.92 Loaded
Database UI oracle.ide.db 11.1.1.6.38.61.92 Loaded
Design Time Resource Bundle Variable Resolver oracle.jdeveloper.resourcebundle.resolver.dt 11.1.1.6.38.61.92 Loaded
Diagram Framework oracle.diagram 11.1.1.6.38.61.92 Loaded
Diagram Framework Toplink extensions oracle.diagram.toplink 11.1.1.6.38.61.92 Loaded
Diagram Javadoc Extension oracle.diagram.javadoc 11.1.1.6.38.61.92 Loaded
Diagram Thumbnail oracle.diagram.thumbnail 11.1.1.6.38.61.92 Loaded
Diagram to XMLEF Bridge oracle.diagram.xmlef 11.1.1.6.38.61.92 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.6.38.61.92 Loaded
EJB oracle.ejb 11.1.1.6.38.61.92 Loaded
EJB Modeler oracle.ejbmodeler 11.1.1.6.38.61.92 Loaded
Editor Tint oracle.ide.ceditor-tint 11.1.1.6.38.61.92 Loaded
Editor Tint (Java) oracle.jdeveloper.ceditor-tint-java 11.1.1.6.38.61.92 Loaded
Extended IDE Platform oracle.javacore 11.1.1.6.38.61.92 Loaded
Extension Designtime Core oracle.jdeveloper.extensiondt.core 11.1.1.6.38.61.92 Loaded
Extension Designtime UI oracle.jdeveloper.extensiondt.ui 11.1.1.6.38.61.92 Loaded
External Tools oracle.ide.externaltools 11.1.1.6.38.61.92 Loaded
Feedback oracle.ide.feedback 11.1.1.6.38.61.92 Loaded
File Support oracle.ide.files 11.1.1.6.38.61.92 Loaded
Fusion Application Overview Definition oracle.ide.appoverview.fusion.definition 11.1.1.6.38.61.92 Loaded
Fusion Web Application (ADF) Template oracle.adf.webapp.template 11.1.1.6.38.61.92 Loaded
Go to File oracle.ide.gotofile 11.1.1.6.38.61.92 Loaded
Go to Java Type oracle.jdeveloper.gotojava 11.1.1.6.38.61.92 Loaded
HTML oracle.html 11.1.1.6.38.61.92 Loaded
Help System oracle.ide.help 11.1.1.6.38.61.92 Loaded
History Support oracle.jdeveloper.history 11.1.1.6.38.61.92 Loaded
IDE Reports Extension oracle.ide.report 11.1.1.6.38.61.92 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.6.38.61.92 Loaded
Index Migrator support oracle.ideimpl.indexing-migrator 11.1.1.6.38.61.92 Loaded
J2EE oracle.j2ee 11.1.1.6.38.61.92 Loaded
J2EE oracle.j2ee.webapp.ve 11.1.1.6.38.61.92 Loaded
J2EE oracle.j2ee.webapp.ve.facelets 11.1.1.6.38.61.92 Loaded
J2EE CSS oracle.css 11.1.1.6.38.61.92 Loaded
J2EE Faces Config oracle.j2ee.facesconfig 11.1.1.6.38.61.92 Loaded
J2EE Web App oracle.j2ee.webapp 11.1.1.6.38.61.92 Loaded
J2EE-ADRS oracle.j2ee.adrs 11.1.1.6.38.61.92 Loaded
J2ee extension help oracle.j2ee.help 11.1.1.0.0 Loaded
JDeveloper oracle.jdeveloper 11.1.1.6.38.61.92 Loaded
JDeveloper Runner oracle.jdeveloper.runner 11.1.1.6.38.61.92 Loaded
JGoodies Forms oracle.jdeveloper.jgoodies 11.1.1.6.38.61.92 Loaded
JPublisher oracle.jdeveloper.db.jpub 11.1.1.6.38.61.92 Loaded
JSON Language support oracle.jdeveloper.json 11.1.1.6.38.61.92 Loaded
JViews Registration Addin oracle.diagram.registration 11.1.1.6.38.61.92 Loaded
Java Annotation Inspector oracle.jdeveloper.annotation.inspector 11.1.1.6.38.61.92 Loaded
Java Breadcrumbs oracle.jdeveloper.ceditor-breadcrumbs-java 11.1.1.6.38.61.92 Loaded
Java Class Modeler oracle.javamodeler 11.1.1.6.38.61.92 Loaded
Java Modeler Toplink extensions oracle.javamodeler.toplink 11.1.1.6.38.61.92 Loaded
Java Server Faces Page Flow Modeler oracle.jsfmod 11.1.1.6.38.61.92 Loaded
Java Structure Compare oracle.jdeveloper.java-compare 11.1.1.6.38.61.92 Loaded
Java Type Search oracle.jdeveloper.searchbar.java 11.1.1.6.38.61.92 Loaded
Java extension help oracle.java.help 11.1.1.0.0 Loaded
JavaBeans, Swing, and AWT oracle.swingawt 11.1.1.6.38.61.92 Loaded
JavaScript Language Support oracle.ide.javascript 11.1.1.6.38.61.92 Loaded
Jdeveloper UI Editor oracle.jdeveloper.uieditor 11.1.1.6.38.61.92 Loaded
Jdeveloper XML Extension oracle.jdeveloper.xml 11.1.1.6.38.61.92 Loaded
Legacy Controller Design-Time oracle.controller.bm.dt 11.1.1.6.38.61.92 Loaded
Legacy Preferences integration for BM oracle.modeler.bm.prefs 11.1.1.6.38.61.92 Loaded
Log Window oracle.ide.log 11.1.1.6.38.61.92 Loaded
MDS Extension oracle.mds 11.1.1.6.38.61.92 Loaded
MOF Ide Integration oracle.mof.ide 11.1.1.6.38.61.92 Loaded
MOF Modeler Integration oracle.modeler.mof 11.1.1.6.38.61.92 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.6.38.61.92 Loaded
Modeler Framework oracle.modeler 11.1.1.6.38.61.92 Loaded
Modeler Framework Common Layer oracle.modeler.common 11.1.1.6.38.61.92 Loaded
Modelling migration from BM oracle.modeler.bm.migrate 11.1.1.6.38.61.92 Loaded
Navigator oracle.ide.navigator 11.1.1.6.38.61.92 Loaded
Nightly Indexing support oracle.ideimpl.indexing-rt 11.1.1.6.38.61.92 Loaded
OAR/MAR/SAR Deployment Support Extension oracle.deploy.orapp 11.1.1.6.38.61.92 Loaded
OWSM Policy Manager Installer oracle.jdeveloper.webservice.wsmpm.installer 11.1.1.6.38.61.92 Loaded
Object Gallery oracle.ide.gallery 11.1.1.6.38.61.92 Loaded
Object Viewer oracle.sqldeveloper.oviewer 11.1.1.64.48 Loaded
Offline Database oracle.jdeveloper.offlinedb 11.1.1.6.38.61.92 Loaded
Offline Database Import/Generate oracle.jdeveloper.offlinedb.transfer 11.1.1.6.38.61.92 Loaded
Offline Database Reports Extension oracle.jdeveloper.offlinedb.report 11.1.1.6.38.61.92 Loaded
Offline Database SXML oracle.jdeveloper.offlinedb.sxml 11.1.1.6.38.61.92 Loaded
Offline Database User Properties oracle.jdeveloper.offlinedb.userprops 11.1.1.6.38.61.92 Loaded
Offline Database User Properties SXML oracle.jdeveloper.offlinedb.userprops.sxml 11.1.1.6.38.61.92 Loaded
Oracle Database Browser oracle.sqldeveloper.thirdparty.browsers 11.1.1.64.48 Loaded
Oracle Enterprise Repository Editor oracle.jdeveloper.oereditor 11.1.1.6.38.61.92 Loaded
Oracle IDE oracle.ide 11.1.1.6.38.61.92 Loaded
Oracle JDevloper Deployment Core Module oracle.deploy.core 11.1.1.6.38.61.92 Loaded
Oracle MDS Design time oracle.mds.dt 11.1.1.6.38.61.92 Loaded
Oracle Mobile ADF oracle.wireless.dt 11.1.1.6.38.61.92 Loaded
Oracle Page Templates oracle.adf-page-template-samples 11.1.1.6.38.61.92 Loaded
Oracle Public Cloud oracle.jdeveloper.cloud 11.1.1.0.0 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.1.1.64.48 Loaded
Oracle SQL Developer Reports oracle.sqldeveloper.report 11.1.1.64.48 Loaded
Oracle SQL Developer Worksheet oracle.sqldeveloper.worksheet 11.1.1.64.48 Loaded
Oracle XML Schema Support oracle.sqldeveloper.xmlschema 11.1.1.64.48 Loaded
PL/SQL Debugger oracle.jdeveloper.db.debug.plsql 11.1.1.6.38.61.92 Loaded
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.6.38.61.92 Loaded
Peek oracle.ide.peek 11.1.1.6.38.61.92 Loaded
Persistent Storage oracle.ide.persistence 11.1.1.6.38.61.92 Loaded
Profiler oracle.jdeveloper.profiler 11.1.1.6.38.61.92 Loaded
Properties File Support oracle.jdeveloper.props 11.1.1.6.38.61.92 Loaded
Property Inspector oracle.ide.inspector 11.1.1.6.38.61.92 Loaded
Quick Start Features for Web Applications quickstart.webapp.dt 11.1.1.6.38.61.92 Loaded
QuickDiff oracle.ide.quickdiff 11.1.1.6.38.61.92 Loaded
REST Web Services oracle.jdeveloper.webservice.rest 11.1.1.6.38.61.92 Loaded
Refactoring oracle.jdeveloper.refactoring 11.1.1.6.38.61.92 Loaded
Replace With oracle.ide.replace 11.1.1.6.38.61.92 Loaded
Reports Extension oracle.javatools.report 11.1.1.6.38.61.92 Loaded
Resource Bundle Support oracle.ide.resourcebundle 11.1.1.6.38.61.92 Loaded
Resource Bundle Support for Properties Files oracle.jdeveloper.resourcebundle.props 11.1.1.6.38.61.92 Loaded
Resource Catalog Application Server Adapter oracle.jdeveloper.asadapter 11.1.1.6.38.61.92 Loaded
Resource Catalog DB UI extension oracle.jdeveloper.db.rcadapter.ui 11.1.1.6.38.61.92 Loaded
Resource Catalog Database Adapter oracle.jdeveloper.rcdbadapter 11.1.1.6.38.61.92 Loaded
Resource Catalog WSIL Adapter oracle.jdeveloper.rcwsiladapter 11.1.1.6.38.61.92 Loaded
Resource Lookup oracle.jdeveloper.rclookup 11.1.1.6.38.61.92 Loaded
Runner oracle.ide.runner 11.1.1.6.38.61.92 Loaded
SQL*Plus Integration oracle.jdeveloper.db.sqlplus 11.1.1.6.38.61.92 Loaded
SQLJ oracle.jdeveloper.sqlj 11.1.1.6.38.61.92 Loaded
Search Bar oracle.ide.searchbar 11.1.1.0.0 Loaded
SearchBar Commands oracle.ide.searchbar.commands 11.1.1.6.38.61.92 Loaded
Searchbar Preferences oracle.ide.searchbar.preferences 11.1.1.6.38.61.92 Loaded
Snippet Window oracle.sqldeveloper.snippet 11.1.1.64.48 Loaded
Struts Page Flow Modeler oracle.struts 11.1.1.6.38.61.92 Loaded
Studio oracle.studio 11.1.1.6.38.61.92 Loaded
Studio extension help oracle.studio.help 11.1.1.0.0 Loaded
Template oracle.ide.ceditor-template 11.1.1.6.38.61.92 Loaded
TopLink oracle.toplink 11.1.1.6.38.61.92 Loaded
Trinidad Databinding Design Time oracle.trinidad-databinding-dt 11.1.1.6.38.61.92 Loaded
Trinidad Design Time oracle.trinidad-dt 11.1.1.6.38.61.92 Loaded
UDDI Resource Catalogue Provider oracle.jdevimpl.uddiadapter 11.1.1.6.38.61.92 Loaded
UML XMI oracle.uml.v2.xmi 11.1.1.6.38.61.92 Loaded
UML v2 oracle.uml.v2 11.1.1.6.38.61.92 Loaded
UML v2 Activity Modeler oracle.uml.v2.activity 11.1.1.6.38.61.92 Loaded
UML v2 Class Diagram oracle.uml.v2.clazz 11.1.1.6.38.61.92 Loaded
UML v2 Migration oracle.uml.v2.migrate 11.1.1.6.38.61.92 Loaded
UML v2 Sequence Diagram oracle.uml.v2.sequence 11.1.1.6.38.61.92 Loaded
UML v2 Transformation to Java oracle.uml.v2.umljava 11.1.1.6.38.61.92 Loaded
UML v2 Use Case Diagram oracle.uml.v2.usecase 11.1.1.6.38.61.92 Loaded
UML2 Modelers Common Classes oracle.uml.v2.modeler 11.1.1.6.38.61.92 Loaded
URL Connection Designtime oracle.jdevimpl.urlconn 0 Loaded
VHV oracle.ide.vhv 11.1.1.6.38.61.92 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.6.38.61.92 Loaded
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.6.38.61.92 Loaded
Virtual File System oracle.ide.vfs 11.1.1.6.38.61.92 Loaded
WSDL Chooser oracle.jdeveloper.wsdllookup 11.1.1.0.0 Loaded
WSDL web services extension oracle.jdevimpl.wsdl 11.1.1.6.38.61.92 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.6.38.61.92 Loaded
Web Services oracle.jdeveloper.webservice 11.1.1.6.38.61.92 Loaded
WebDAV Connection Support oracle.jdeveloper.webdav2 11.1.1.6.38.61.92 Loaded
WebStart oracle.j2ee.webstart 11.1.1.0.0 Loaded
XML Compare oracle.jdeveloper.xml-compare 11.1.1.6.38.61.92 Loaded
XML Editing Framework IDE Extension oracle.ide.xmlef 11.1.1.6.38.61.92 Loaded
XML Editing Framework Java Integration oracle.jdeveloper.xmlef 11.1.1.6.38.61.92 Loaded
adf-deploy-dt oracle.adfdt.common.deploy 11.1.1.6.38.61.92 Loaded
adf-deploy-dt-mds oracle.adfdt.common.deploy.mds 11.1.1.6.38.61.92 Loaded
adf-installer-ide adf.installer.dt 11.1.1.6.38.61.92 Loaded
adf-logging-dt oracle.adf.logging.dt 11.1.1.6.38.61.92 Loaded
adf-model-debugger-dt oracle.adf-model-debugger-dt 11.1.1.6.38.61.92 Loaded
adf-model-sqldc-ide oracle.adfm.sqldc 11.1.1.6.38.61.92 Loaded
adf-model-tools oracle.adf.model.tools 11.1.1.6.38.61.92 Loaded
adf-security-policy-dt oracle.adfdtinternal.adf-security-policy-dt 11.1.1.6.38.61.92 Loaded
adf-share-audit oracle.adf-share-audit 11.1.1.6.38.61.92 Loaded
adf-share-deploy-dt oracle.adf.share.deploy.dt 11.1.1.6.38.61.92 Loaded
adf-share-dt oracle.adf.share.dt 11.1.1.6.38.61.92 Loaded
adfm-business-editor-deploy oracle.adf.businesseditor.deploy 11.1.1.6.38.61.92 Loaded
adfm-business-editor-ide oracle.adf.model.businesseditor 11.1.1.6.38.61.92 Loaded
adfm-business-editor-settings-ide oracle.adfm.businesseditor.settings 11.1.1.6.38.61.92 Loaded
adfmcoredt-xdf oracle.adfm.xdf 11.1.1.6.38.61.92 Loaded
adfquerylovdt oracle.adf-faces-query-and-lov-dt 11.1.1.6.38.61.92 Loaded
appoverview oracle.ide.appoverview 11.1.1.6.38.61.92 Loaded
asnav-cloud oracle.jdeveloper.asnav.cloud 11.1.1.6.38.61.92 Loaded
asnav-weblogic oracle.jdeveloper.asnav.weblogic 11.1.1.6.38.61.92 Loaded
audit oracle.ide.audit 11.1.1.6.38.61.92 Loaded
audit-core oracle.ide.audit.core 11.1.1.6.38.61.92 Loaded
bi-jdbc oracle.bi.jdbc 11.1.1.6.38.61.92 Loaded
classpath: protocol handler extension oracle.jdeveloper.classpath 11.1.1.0.0 Loaded
db-audit oracle.ide.db.audit 11.1.1.6.38.61.92 Loaded
db-modeler-transform oracle.dbmodeler.transform 11.1.1.6.38.61.92 Loaded
dcadapters-ide oracle.adfm.dc-adapters 11.1.1.6.38.61.92 Loaded
dependency-java oracle.jdeveloper.java.dependency 11.1.1.6.38.61.92 Loaded
dependency-refactor oracle.jdeveloper.refactoring.dependency 11.1.1.6.38.61.92 Loaded
deploy-ant oracle.deploy.ant 11.1.1.6.38.61.92 Loaded
deploy-rt oracle.jdevimpl.deploy-rt 11.1.1.6.38.61.92 Loaded
feedback-client2 oracle.ideimpl.feedback2.client 11.1.1.6.38.61.92 Loaded
ide-diagnostics oracle.ide.diagnostics 11.1.1.0.0 Loaded
j2ee-adrsimpl oracle.j2ee.adrsimpl 11.1.1.0.0 Loaded
j2ee-cloud oracle.j2ee.cloud 11.1.1.6.38.61.92 Loaded
j2ee-facelets oracle.j2ee.facelets 11.1.1.6.38.61.92 Loaded
j2ee-jpsconfig oracle.j2ee.jpsconfig 11.1.1.6.38.61.92 Loaded
j2ee-security oracle.j2ee.security 11.1.1.6.38.61.92 Loaded
j2ee-server oracle.j2ee.server 11.1.1.0.0 Loaded
j2ee-server-dt oracle.j2ee.server.dt 11.1.1.6.38.61.92 Loaded
j2ee-serverimpl oracle.j2ee.serverimpl 11.1.1.6.38.61.92 Loaded
j2ee-weblogic oracle.j2ee.weblogic 11.1.1.6.38.61.92 Loaded
j2ee-weblogic-editors oracle.j2ee.weblogic.editors 11.1.1.6.38.61.92 Loaded
jdukshare oracle.bm.jdukshare 11.1.1.6.38.61.92 Loaded
library-dconfig-infra oracle.jdeveloper.library.dconfig.infra 11.1.1.6.38.61.92 Loaded
library-jee-api oracle.jdeveloper.library.jee.api 11.1.1.6.38.61.92 Loaded
library-jmx oracle.jdeveloper.library.jmx 11.1.1.6.38.61.92 Loaded
library-jps oracle.jdeveloper.library.jps 11.1.1.6.38.61.92 Loaded
library-weblogic-api oracle.jdeveloper.library.weblogic.api 11.1.1.6.38.61.92 Loaded
library-weblogic-client oracle.jdeveloper.library.weblogic.client 11.1.1.6.38.61.92 Loaded
mof oracle.mof 11.1.1.6.38.61.92 Loaded
mof-index oracle.mof.index 11.1.1.6.38.61.92 Loaded
mof-xmi oracle.mof.xmi 11.1.1.6.38.61.92 Loaded
oracle.adfm oracle.adfm 11.1.1.6.38.61.92 Loaded
oracle.adfm.contextual oracle.adfm.contextual 11.1.1.6.38.61.92 Loaded
oracle.dynamic-faces-dt oracle.dynamic.faces 11.1.1.6.38.61.92 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.6.38.61.92 Loaded
oracle.ide.filequery oracle.ide.filequery 11.1.1.6.38.61.92 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.6.38.61.92 Loaded
oracle.ide.usages-tracking oracle.ide.usages-tracking 11.1.1.6.38.61.92 Loaded
oracle.todo.tasks oracle.todo.tasks 11.1.1.6.38.61.92 Loaded
palette2 oracle.ide.palette2 11.1.1.6.38.61.92 Loaded
placeholder-jsf-ui oracle.placeholderjsf-ui 11.1.1.6.38.61.92 Loaded
placeholderdc-dt oracle.placeholderdc.dt 11.1.1.6.38.61.92 Loaded
rcasadapter-cloud oracle.jdeveloper.asadapter.cloud 11.1.1.6.38.61.92 Loaded
rcasadapter-cloud-api oracle.jdeveloper.asadapter.cloud.api 11.1.1.6.38.61.92 Loaded
rcasadapter-dt oracle.jdeveloper.asadapter.dt 11.1.1.6.38.61.92 Loaded
rcasadapter-oc4j oracle.jdeveloper.asadapter.oc4j 11.1.1.6.38.61.92 Loaded
rcasadapter-rescat2 oracle.jdeveloper.asadapter.rescat2 11.1.1.6.38.61.92 Loaded
rcasadapter-thirdparty oracle.jdeveloper.asadapter.thirdparty 11.1.1.6.38.61.92 Loaded
rcasadapter-weblogic oracle.jdeveloper.asadapter.weblogic 11.1.1.6.38.61.92 Loaded
rcasadapter-weblogic-api oracle.jdeveloper.asadapter.weblogic.api 11.1.1.6.38.61.92 Loaded
rescat2 oracle.jdevimpl.rescat2 11.1.1.6.38.61.92 Loaded
resourcebundle-api-adfdeps oracle.jdeveloper.resourcebundle.adfdeps 11.1.1.6.38.61.92 Loaded
resourcebundle-api-xliff oracle.resourcebundle.xliff 11.1.1.6.38.61.92 Loaded
resourcebundle-customization oracle.jdeveloper.resourcebundle.customization 11.1.1.6.38.61.92 Loaded
searchbar-gallery oracle.ide.searchbar.gallery 11.1.1.6.38.61.92 Loaded
searchbar-help oracle.ide.searchbar.help 11.1.1.6.38.61.92 Loaded
searchbar-index oracle.ide.searchbar.index 11.1.1.6.38.61.92 Loaded
status oracle.ide.status 11.1.1.6.38.61.92 Loaded
xml-schema-dt oracle.jdevimpl.xml.schema 11.1.1.6.38.61.92 Loaded
xsl-dt oracle.jdevimpl.xml.xsl 11.1.1.6.38.61.92 Loaded
xsqldt-ide oracle.xsqldt-ide 11.1.1.6.38.61.92 Loaded(ii) The beginning portion of my jar file as output by the hex editor
504B0304140008080800844E7E41000000000000000000000000090004004D4554412D494E462FFECA00000300504B0708000000000200000000000000504B0304140008080800844E7E41000000000000000000000000140000004D4554412D494E462F4D414E49464553542E4D46F34DCCCB4C4B2D2ED10D4B2D2ACECCCFB35230D433E0E5722E4A4D2C494DD175AA040998EB192868F8172526E7A42A38E71715E417259600D56AF272F1720100504B07083F4283104000000041000000504B030414000808080010AF7D4100000000000000000000000010000000443030314170706C65742E636C6173739557097C1C6515FF7FD94D66773B39CB962ED096D256364DD26D5A48611B5ADA84D4D42454124AD35ACD6477924CBAD95D66274D8B0A1E8007E20188E00148C17880D052368170299EA878A2888A8A175A4F040FAC84FF9BDD5C6D5A607F3BDFF1EEF7BEF7DE37F3D84BF73F0460B5F206B01E5704A0E1CA00DE83F7CAEA7D1ADE1F4021AED2F001D95FA1E1EA00FC42E6C70765B8D2870F09F9877DF888ECAF11B26B65B84EB61F0DE07A7C4C861B647BA31F1FC72764F8A46C3F25C34D427C7300B7E03A0D9FD6706B000BB04FF6B7C970BB86CF04701A867DF8ACCC9FF3E1F3327F41863B64B8730E16E28B427B57007763BF860301D4E01E0D070388E05E19B21A460258855119EEF3E37E8CF9F08086070378080F6B782480B385F2167C49905F16A71F0D70F5150D5F5528CB98B66524B69A76C64A252F6C6E54509B158A1B52C98C63249DAD4662D02C44EEA7148AEAADA4E5AC53F0842BB72A781B527153A1B4C54A9A6D8303DDA6DD61742708A96849C528D6A070EEF340AFD36765144E6889AF5C596BA4D39146CE1BD2E984E9ACA5E8FEEE66CA56089CB72766A61DDA4362AFE5C214D9832DFDC66E23923092BD9149123216B73B466C57AB9176D5F060C9356058498579E11DD378DA1DDB4AF6AE75ED36EC5E0A9F3B0B9A8618AE490A853DB631608AC142B527921922416473934049A7E213A88831E4441AAD013399C999E47739DBAD4BC85DC840DA94E6CD38A9B4821637338E9DDAABE0B34D232E21A0288B4FB34241CC5658D2924A9BC99861C723B1946D467844BBAD98196920E402F3E241F253454126A6B0F818A4ED035429F424F4F61831FA5A35459A4A3B112B938AF464224D56C2DC108B99998C50B7E7D8457ABC4761E1AC2C42286CAE68CB3DD7B8E118E4D9B191437FAD0CAB08(iii) Contents of MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.7.0 (Oracle Corporation)(iv) The error message as it appears
*ClassFormatError*
Incompatible magic value 1013478509 in class file D001AppletI know that searching a stuff as the hex output is tedious; however, I did it and did not find the value 0xCAFEBABE, the magic value.
Please let me know if this helped or if you need some further info.
Thanks, regards,
Miklos -
Using a JAR file as a project file
My application allows the user to create projects. Previously, a project file was simply an XML file. Now, a project file needs to also contain many images.
I thought it would be a good idea to simply use a JAR file as my project file.
Since I've really never really worked with JAR files and the java.util.Jar package directly, I have a few questions.
1) Would it be better just to simply store the images as binary in the XML file? I just spent a good amount of time making the XML file very readable so I thought it would be better to keep the images separate while still having a single "project" file.
2) Is there anything inherently wrong with the way I'm working with the JAR file in the code below?
Simple XML file:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE project [
<!ELEMENT project (img+)>
<!ELEMENT img EMPTY>
<!ATTLIST img src CDATA #REQUIRED>
]>
<project>
<img src="blah.jpg"/>
</project>
import java.io.*;
import java.util.jar.JarFile;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
public class LoaderTest {
private String imageName;
public LoaderTest() {
InputStream i = null;
JarFile jf = null;
try {
jf = new JarFile("project.jar");
i = jf.getInputStream(jf.getJarEntry("project.xml"));
// Here's my simple XML parser to load the project and images
SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
parser.parse(new InputSource(i), new DefaultHandler() {
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
// Right now we only care about images
if (qName.equalsIgnoreCase("img")) {
imageName = attributes.getValue("src");
// Load the image from the inputstream
java.awt.image.BufferedImage img = javax.imageio.ImageIO.read(jf.getInputStream(jf.getJarEntry(imageName)));
// Display the image in a JFrame
javax.swing.JFrame f = new javax.swing.JFrame();
f.setLayout(new java.awt.BorderLayout());
f.setSize(800, 600);
f.getContentPane().add(new javax.swing.JLabel(new javax.swing.ImageIcon(img)), java.awt.BorderLayout.CENTER);
f.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
} catch (ParserConfigurationException ex) {
ex.printStackTrace();
} catch (SAXException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
} finally {
// Do our best to close the input streams
if (i != null) {
try {
i.close();
} catch (IOException ex) {}
if (jf != null) {
try {
jf.close();
} catch (IOException ex) {}
public static void main(String[] args) {
new LoaderTest();
}Thank you!1) I also think it's much better to keep your images separate from your XML, this prevents a lot of in case you just want to read XML data
2) What's exactly going wrong here? For the project.xml, make sure it's not inside a directory within the JAR file, or else the variable i will be null. Otherwise it looks fine.. -
Code ran fine in Eclipse, no output as a Jar file..help!
I have been working on a piece of code that reads an excel spreadsheet, and writes xml files based on that. (I'm to cheap to buy the numerous software out there)
The code ran beautifully in Eclipse, and all the right dialog windows and console outputs were present, as well as the final product, about 250 XML files.
I exported the src to a sealed jar file and ran it.
I get the first few dialogs that ask info of me, but as soon as it starts the process I get nothing!...
no exceptions, no errors, no xml...does anyone know what i did wrong?
Thanks so much for the help.we can't help you if we don't know the real probelm you've got.
use an error logger like log4j http://logging.apache.org/log4j/docs/index.html and report the exception messages. -
Help adding new files to Jar file.
I am new to Java and am having problems haveing our Web App work after I have recreated the JAR file...this is what I did...
Changed to the following directory at a dos prompt:
D:\jdk1.3.1_01\bin
Ran the following to extract the files from the jar file.
jar xvf app2.jar
...this created 5 directories with various files.
copied new and updated graphic files to
D:\jdk1.3.1_01\bin\app2\images
Recreated the jar file using the following command (pv com javavp meta-inf borland are the 5 directories that were extracted from the original jar file above):
jar.exe cvf app2.jar pv com app2 meta-inf borland
I now have a new jar file that is a similar size, so it looks good, but when I put it in our web site, it does not recognize certain frames (that get information from the database) that it did before (the frames are blank)
Any thoughts on what I am doing wrong?
Also, are there any Windows programs that i can use to make this easier instead of using the dos commands?
Thanks...To change the contents while inside a java program, you might be able to use Runtime.exec(String[]). Make the array with "jar.exe" as the first index, flags in the second, and remaining arguments in the remaining indecies.
-
My JAR file is not working properly!!!
Hi everyone,
I made an application that has a GUI (window). I converted it into a JAR file so I can send it to a friend by email. Then she can run it to generate the output. First, the user has to select a destination to save the .txt file (using JFileChooser). Then enters the inputs (using JTextFields). Clicks "Run" button (Results will be calculated and copied to the file). A Message will appear indicating that the results are copied. The problem is that when I run the application in the IDE (Eclipse) it works fine. But when I convert it into JAR, The moment I click the "Run" button, suddenly the window closes. Please HELP???
Thank youDrClap wrote:
Eng.Sh_2004 wrote:
Sorry guys, but i would like to make things clearer, As I mentioned earlier, What i'm doing is the following: 1) Using the Jfilechooser, save the results into a filename.txt file _[main class in the manifest file (class for the GUI) ]._ 2) Click "run" to write the data to the created file in step 1 [_another class is used to write to file_]. I have a feeling that the problem is related to the manifest main class. What do you think guys?I think your description of the problem is very bad. And I think your idea of making wild guesses is a bad way of diagnosing problems.
First of all. A JFileChooser does not save anything. It just allows the user to select a file to be saved to. So if you thought that the first step was writing anything or creating any file, you're probably wrong. But examining the code would help you understand.
Second, if you're having problems because one class chooses the file name and a second class writes data to it, then you're probably running into the basic beginner problem we see around here all the time of how to communicate data between objects. Again, examining the code might help.
Third, you need to understand what is writing that error message. Examining the code would help there too.
So: stop guessing. Look at the code.I'm still New To Java that's why i find difficulty in problems diagnosis. Regarding the JAR problem, as you mentioned, I used JFileChooser to select a file and (copying data) is the other part. So I will look at the code again.
Edited by: Eng.Sh_2004 on Aug 26, 2010 1:10 PM -
How to retrieve constants value from compiled code in jar file?
Hi everyone,
I've been looking for a way to solve this for a week now, without any much success... and I've finally decided to ask the Java gurus for a solution! :-)
Here's what I am basically trying to do:
I have several jar files in which there are only compiled code (.class).
In every class, there are 2 constants (declared as static final String) that I would like to retrieve (one is the version and the other the date of the last modification).
My goal is to print a list of all the classes in the jar files with the values of these 2 constants for each class.
The solution that I have right now to do this does not work properly: for now, I read all the elements of the classpath, check if these are jar files, and if so, I look into each one and load all the classes one by one and print the results.
The problem with this is that it uses the method Class.forName(className) and as some classes are unfortunately present in many jar files (2 or 3 copies), once the classes have been loaded, then it won't be "reloaded".
Without the possibility to "reload" these classes, I cannot see inconsistencies in the versions of the classes present in the jar files.
I have read many articles, and I thought that I could then use a custom classloader and create a new instance of this classloader for each jar file.
2 problems with this:
- according to many posts in the different forums I have read, the jar files should not appear in the CLASSPATH (but this would be easier for me if I could use it...)
- some classes will not be loaded if some classes (present in other jar files) are not loaded... and this makes things really really complicated to implement...
So, I thought that I was maybe doing this the wrong way, and that there might be an easy way out of this...
In fact, I do not need to load the classes... all I need to do, is take a sneak peek at the constants and print their values... and that's it!
Somehow, I think that this is possible to retrieve the values of compile time constants (declared as static final String) as I can see that with Eclipse (when opening a jar file).
So, my question is: how can I do that within my java application?
Or maybe there is another easier solution to do what I need?
Thanks in advance for your help!Hi everyone,
I've been looking for a way to solve this for a week now, without any much success... and I've finally decided to ask the Java gurus for a solution! :-)
Here's what I am basically trying to do:
I have several jar files in which there are only compiled code (.class).
In every class, there are 2 constants (declared as static final String) that I would like to retrieve (one is the version and the other the date of the last modification).
My goal is to print a list of all the classes in the jar files with the values of these 2 constants for each class.
The solution that I have right now to do this does not work properly: for now, I read all the elements of the classpath, check if these are jar files, and if so, I look into each one and load all the classes one by one and print the results.
The problem with this is that it uses the method Class.forName(className) and as some classes are unfortunately present in many jar files (2 or 3 copies), once the classes have been loaded, then it won't be "reloaded".
Without the possibility to "reload" these classes, I cannot see inconsistencies in the versions of the classes present in the jar files.
I have read many articles, and I thought that I could then use a custom classloader and create a new instance of this classloader for each jar file.
2 problems with this:
- according to many posts in the different forums I have read, the jar files should not appear in the CLASSPATH (but this would be easier for me if I could use it...)
- some classes will not be loaded if some classes (present in other jar files) are not loaded... and this makes things really really complicated to implement...
So, I thought that I was maybe doing this the wrong way, and that there might be an easy way out of this...
In fact, I do not need to load the classes... all I need to do, is take a sneak peek at the constants and print their values... and that's it!
Somehow, I think that this is possible to retrieve the values of compile time constants (declared as static final String) as I can see that with Eclipse (when opening a jar file).
So, my question is: how can I do that within my java application?
Or maybe there is another easier solution to do what I need?
Thanks in advance for your help! -
Can't open .jar file? (I have Lion)
I have written a program in Eclipse, and I exported it as a runnable jar to my desktop. But when I go and click on it I get this message:
The Java Jar file "Four Room Game.jar" could not be launched
check the console for possible error messages
what is wrong with it and how can I fix it?Izeki3l wrote:
It says I have Java 7
Were you able to turn logging on, try the .jar again and then read the log?
I know nothing about Eclipse, but I do know there are many applications and web sites that are not Java 7 compatible. You will probably have to check with the developer and find out if Eclipse is and if an update is available or in the works. You will most probably need to have information from the Java log to submit to the developer. -
I'm running OS X 10.9.1 on a MacBook Air with the newest Java. For some reason, whenever I try to open a .jar file, it gives me a message saying "The Java JAR file... could not be launched. Check the console for possible error messages." How do I get it to run?
You downloaded the wrong thing if you wanted jar.exe. The J2RE d/l is the runtime only package, and doesn't contain the developer tools.
To download the current developer version of Java, go here:
http://java.sun.com/j2se/1.4.1/download.html
and click on the word DOWNLOAD in the column labeled SDK in this line:
Windows (all languages, including English)
After downloading, click on this page of installation instructions and read through #6:
http://java.sun.com/j2se/1.4.1/install-windows.html
NOTE: If you are installing on other than a standard 32-bit Windows system, go to this page:
http://java.sun.com/j2se/1.4.1/install.html and choose the installation instructions for your system.
Install the software according to the preceeding instructions -
OC4J: Class not found for class in jar file placed in \j2ee\home\applib\
I have an ADF application which uses external libraries (jars), which works fine when running the application from within JDeveloper (TP4).
However if I deploy the application to the embedded OC4J server it won't find any classes imported in those external libraries at runtime (deploy does work). E.g. one library class imports oracle.jbo.server.DBTransaction. If a method of this class is called I get the following exception:
Unexpected exception caught: java.lang.NoClassDefFoundError, msg=oracle/classloader/util/AnnotatedNoClassDefFoundError
oracle/classloader/util/AnnotatedNoClassDefFoundErrorThe same exception, when using a german locale, explicitely states that it cannot find oracle.jbo.server.DBTransaction.
The jar files are placed in the \j2ee\home\applib\ directory and a <library> element to this path is present in application.xml.
Any further hints what could be wrong?Hi Edwin,
tried your suggestions but without success.
when I add this library to server.xml then following error occures when starting OC4J
17.09.2008 17:10:33 oracle.oc4j.util.SystemLog log
SCHWERWIEGEND: Server start failed processing configuration
java.lang.InstantiationException: Illegal tag, 'library': The library tag has moved from config/server.xml to config/application.xml, please update your configuration manually or reinstall.
at com.evermind.server.XMLApplicationServerConfig.parseDeploymentMainNode(XMLApplicationServerConfig.java:1227)
at com.evermind.xml.XMLConfig.parseRootNode(XMLConfig.java:342)
at com.evermind.xml.XMLConfig.init(XMLConfig.java:222)
at com.evermind.xml.XMLConfig.init(XMLConfig.java:154)
at com.evermind.server.XMLApplicationServerConfig.<init>(XMLApplicationServerConfig.java:237)
at com.evermind.server.ApplicationServer.createConfig(ApplicationServer.java:661)
at oracle.oc4j.server.ServerFactory$Worker.prepareConfig(ApplicationServerFactory.java:225)
at oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:244)
at oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:259)
at java.lang.Thread.run(Thread.java:619)
17.09.2008 17:10:33 oracle.oc4j.util.SystemLog logNoStack
SCHWERWIEGEND: Server exiting: ApplicationServer entered state EXITING--> I added this to application.xml
Than I enabled more logging of classloader "-Duser.country=US -Dclass.load.log.level=finest"
Here a snippet of the output at starttime of OC4J:
================================
08/09/18 10:17:07 Initial class loaders created. Uptime: 3156ms.
08/09/18 10:17:07 Loading main class com.evermind.server.OC4JServer...
08/09/18 10:17:07 com.evermind.server.OC4JServerMain class loaded. Uptime: 3344ms.
08/09/18 10:17:07 Transferring to com.evermind.server.OC4JServer.main()...
08/09/18 10:17:15 Ignoring non-existent code source: D:\oracle\jdevstudio1111_preview4_standalone\j2ee\home\config\..\..\..\BC4J\lib\jmxdc.jar(from <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml)
08/09/18 10:17:15 Ignoring <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml entry: code-source /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/lib/api-ext/adflogginghandler.jar (from system property api.ext.dirs) is already visible in the search path of adf.oracle.domain:11.1.4949.
08/09/18 10:17:15 Ignoring non-existent code source: D:\oracle\jdevstudio1111_preview4_standalone\j2ee\home\config\..\..\..\BC4J\lib\jmxdc.jar(from <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml)
08/09/18 10:17:15 Import was not resolved for adf.oracle.domain:11.1.4949: shared library "oracle.fabric.runtime" could not be found.
08/09/18 10:17:15 Import was not resolved for adf.generic.domain:11.1.4949: shared library "oracle.fabric.runtime" could not be found.Seems that oracle.fabric.runtime couldn't be found but the jar's are located in D:\oracle\jdevstudio1111_preview4_standalone\lib\java\shared\oracle.fabric.runtime\11.1.1.0.0
It's the same as with my jdeveloper installation where I don't have this problems.
regards
Peter -
Problem deploying connector: META-INF/ejb-jar.xml not found in jar file
Has anyone seen this problem:
I built Sun's Blackbox implementation and packaged
it identical to the BlackBoxNoTx.rar included with
Weblogic's 'jconnector' sample (even using the same
ra.xml and weblogic-ra.xml). When I try to deploy
it, the server reports:
java.io.FileNotFoundException:
META-INF/ejb-jar.xml not found in jar file
I have no idea why the server thinks my connector
is an EJB. If I deploy the BlackBoxNoTx.rar included
with the sample, everything works without a hitch.
The only variable that I'm changing in my BlackBoxNoTx.rar
is that I build the Blackbox classes myself--otherwise,
the RAR packagings are identical. Any assistance is
greatly appreciated since I'm banging my head against
a wall...
Thanks,
-jason
I was finally able to resolve this one. On the odd chance that someone else encounters
the same problem, here's what went wrong:
My RAR file had two directories: 'META-INF' and 'meta-inf'. The first was created
by the jar tool and contained the manifest.mf file. The second I created manually
and it contained my ra.xml and weblogic-ra.xml. When I examined the RAR using
any tools or I extracted the contents, it looked like it only contained one directory:
META-INF (because NT is case-insensitive).
"Jason L" <[email protected]> wrote:
>
>Has anyone seen this problem:
>
>I built Sun's Blackbox implementation and packaged
>it identical to the BlackBoxNoTx.rar included with
>Weblogic's 'jconnector' sample (even using the same
>ra.xml and weblogic-ra.xml). When I try to deploy
>it, the server reports:
>
>java.io.FileNotFoundException:
>META-INF/ejb-jar.xml not found in jar file
>
>I have no idea why the server thinks my connector
>is an EJB. If I deploy the BlackBoxNoTx.rar included
>with the sample, everything works without a hitch.
>The only variable that I'm changing in my BlackBoxNoTx.rar
>is that I build the Blackbox classes myself--otherwise,
>the RAR packagings are identical. Any assistance is
>greatly appreciated since I'm banging my head against
>a wall...
>
>Thanks,
>
>-jason
-
Import JAR files (integrating JasperReports)
Dear all,
I'm using JDeveloper 11.1.1.3.0 on Windows 7 32bit.
I search this forum and I google a lot, but I couldn't find any workable solution.
I downloaded the newest version of JasperReport and iReport from the official website. I've done some tutorials from this site and everything seems to work fine.
Now I want to integrate JDev with JasperReports. I create new Fusion Web Application ADF, I get the properties of Model project, Libraries and Classpath tab, add Library and click New... I set the Library name as JasperReports, location as Project, check Deploy ad Default. I add to Class path every JAR files in E:\JasperReports\jasperreports-3.7.6\lib and to Source path the whole directory E:\JasperReports\jasperreports-3.7.6\src. I get sure that the Export is checked and I save all the changes.
I create a new Java Class JasperTest and I use this sample code:
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.export.*;
import java.util.*;
public class JasperTest {
public static void main(String[] args) {
String fileName = "test.jasper";
String outFileName = "test.pdf";
HashMap hm = new HashMap();
try {
// Fill the report using an empty data source
JasperPrint print = JasperFillManager.fillReport(fileName, hm, new JREmptyDataSource());
// Create a PDF exporter
JRExporter exporter = new JRPdfExporter();
// Configure the exporter (set output file name and print object)
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
// Export the PDF file
exporter.exportReport();
} catch (JRException e) {
e.printStackTrace();
System.exit(1);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}I cant compile this, it gives me Error(1,1): package net.sf.jasperreports.engine does not exist etc..
I cant import any class from JasperReports. Did I something wrong with importing the JAR files to my project ? Maybe I should set some system environment variable ? What else I can do ?
Any help will be appraciated.
Regards,
Wojtek.Hi,
I am also facing the same problem, I have few Jasper Reports which are closely integrated with my APEX applications, but for this i am using another application ( Jasper reports) which deployed in tomcat. This application hardly have 20 lines of java code, so i thought of embedding same in PL/SQL itself, But i am facing problem while importing JAR files i.e.
1. Where to put these JAR files so that i can import them in my PL/SQL.
2. I also tried using JAVALOAD function, but that also not worked for me.
Please give me some solution how to go about it??
Maybe you are looking for
-
I have another question related to the connection and operation of FP-RLY-422
1. I use one 25 VDC power to supply power for all the five fieldpoint modules(i.e. V and C terminals of FP-2000, FP-AI-110, FP-AO-200 and FP-RLY-422 are connected) However, as cascading power from neighboring bases or network modules defeats isolatio
-
MBP won't detect 20" Cinema Display
I am trying to connect my two-year old 20" Cinema Display to a last gen MacBook Pro 15". When I plug in the power to the monitor and the DVI cord, the white indicator light on the monitor is on and stays on - as if power is consistently being fed to
-
Why are a lot of the words cut in half (horizontally) in my finder windows?
Why are a lot of the words cut in half (horizontally) in my finder windows?
-
Why "Drag the Firefox Icon into the Applications folder" always pops up?
i follow the steps shown to install firefox on mac. Firefox is working well except every time when i lauch it, "Drag the Firefox Icon into the Applications folder" always pops up? Can you help me solve the problem? Thank you!
-
Can't use non apple mouse with hard drive test?
Having trouble reading an installation CD for a new scanner. Laptop with Tiger fine. Not iMac. So, was trying to run Hardware Test. Inserted disk, restarted with option key down. Image comes up. Can't select anything because Macally mouse won't work