Splashscreen (manifest file) using Netbeans
Hi,
I need an enlightenment.. I'm building an app with splash screen using Java's new SplashScreen class. In order to show the splash screen I already include the :
SplashScreen-Image: icon/Splash.gif
//icon is a folder inside my JAR fileinside the manifest file.
What I don't understand is that.. when I run my app from netbeans by pressing the Run button : No Splash Screen shows up. But when I run it directly by double clicking the JAR file (from windows explorer) : the Splash Screen shows up.. Anyone know what is the reason? Do I need to configure something on my Netbeans?
Thank you for any response..
Hello
I use Netbeans and I think maybe it is for this reason: inside Netbeans you compile and run the classes from the java files, not from the jar file.
So you are not executing the jar, and that is the reason, as that is a parameter in the jar manifest.
Jordi R Cardona
Similar Messages
-
Adding jar file in my gerareted jar file using netbean 4.0
Hi,
I write an application de process XML file using JDOM. I add the JDom package jar file to my project and everything work fine. But when I generate, my project jar file using netbean 4.0, my generated jar, is not working with the XML files anymore. Everything seems like it didn't include the JDOM jar file?
Thanks for any help to fix the problem.I find that you can not use command-line such as java -classpath add classpath
it can not work, I use netBeans4.0 i don't whether because of netbeans or java itself.
you can add classpath in jar's Manifest.mf file
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.5.0_01-b08 (Sun Microsystems Inc.)
Main-Class: chat.Main
// add this line
Class-Path: dir\*.jar //(jar file name)
X-COMMENT: Main-Class will be added automatically by build -
is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
I am using JBOSS 4.2.2 GA as server
thx!!Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?
-
Creating WSDL file using Netbeans and JAX-WS
I have created a web service called calculator in Netbeans IDE.
I build the project and deployed in Tomcat.
When I accessed WSDL file i getting as follows
*<?xml version="1.0" encoding="UTF-8" ?>*
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://actions.calculator.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://actions.calculator.com/" name="calculatorService">
- <types>
- <xsd:schema>
*<xsd:import schemaLocation="http://localhost:8080/calculator/calculator?xsd=1" namespace="http://actions.calculator.com/" />*
*</xsd:schema>*
*</types>*
etc.......
here schema is imported from another file...
I need schema to included in the WSDL file itself.
How can i get a WSDL file like this??
I am using Netbeans 5.5 and JAX-WS 2.0Hi,
Change the <soap:binding style="document"... to <soap:binding style="rpc"... and see if that works.
I'm not sure how to get <soap:binding style="document"... working yet - I'm not that experienced in web services yet.
Hope this helps and is not too late.
Regards,
Greg Nye -
How to build jms files using netbeans ide
hi,
i am using the latest netbeans ide to build a simple jms java file,
but i am getting this:
init:
deps-jar:
Compiling 10 source files to
C:\wrox\pro_jms\Chapter04\Test\build\classes
C:\wrox\pro_jms\Chapter04\AccountsDepartment.java:4: package
javax.jms does not exist
import javax.jms.*;
C:\wrox\pro_jms\Chapter04\AccountsDepartment.java:11: cannot find
symbol
the netbeans ide i am using is jdk_1.6, which when i use directly to
compile in command line mode, works. can anyone tell me why this is
happening?
thanks.I take it that you are trying to build a Java applicaiton that uses JMS API. To do it in netbeans using SUN OpenMQ I usually follow those steps:
1) I create a new project
2) I add JMS library. This is a library that I had created in netbeans using Library Manager. It consist of jms.jar ( this jar file contains the definition of JMS API). Next jar file is the implemention of the JMS API, in case of SUN OpenMQ it's imq.jar, but if you're using a different JMS provider it may be a different file. The last jar file in my JMS library is usually fscontext.jar, this jar file provides JNDI access to a file based store. Again if you're using something like ldap then it would be a different jar file.
That's basicly it - Tom -
Beginner question - Can't read nor write a file using NetBean...
Hi ,
I'm a beginner java programmer, I got trouble when it comes to read or write a file program..
I tried 3 programs and all of them can't read the file I want to read, eventhought I have put the txt file in the same folder with my source code.
here is the source code I got from some site
import java.io.*;
class FileReadTest {
public static void main (String[] args) {
FileReadTest f = new FileReadTest();
f.readMyFile();
void readMyFile() {
DataInputStream dis = null;
String record = null;
int recCount = 0;
try {
File f = new File("mydata.txt");
FileInputStream fis = new FileInputStream(f);
BufferedInputStream bis = new BufferedInputStream(fis);
dis = new DataInputStream(bis);
while ( (record=dis.readLine()) != null ) {
recCount++;
System.out.println(recCount + ": " + record);
} catch (IOException e) {
// catch io errors from FileInputStream or readLine()
System.out.println("Uh oh, got an IOException error! " + e.getMessage());
} finally {
// if the file opened okay, make sure we close it
if (dis != null) {
try {
dis.close();
} catch (IOException ioe) {
I also have tried another from book , both of them give the same result, can't read the file...
Please help me with this...
Thank you very muchTo start with use the full path to the file
i.e. File f = new File("c:\\the\\full\\path\\to\\your\\file\\mydata.txt"); // Assumes a Windows platform using the C drive
Then check to make sure you fiel exists e.g. System.out.println("File exists = " + f.exists());
You can even test to see if the file is readable but since you created the file this porbably is not required. -
what is 'classpath' in manifest file used for?
I tried to create classpath, but doesnt have any significant different....
thanks
YAnThis is what the tutorial says about class-path in a manifest file:
Download extensions are JAR files that are referenced by the manifest files of other JAR files. See the trail on the extension mechanism for information about extensions.
In a typical situation, an applet will be bundled in a JAR file whose manifest references a JAR file (or several JAR files) that will serve as an extension for the purposes of that applet. Extensions
may reference each other in the same way.
Download extensions are specified in the Class-Path header field in the manifest file of an applet, application, or another extension. A Class-Path header might look like this, for example:
Class-Path: servlet.jar infobus.jar acme/beans.jar
With this header, the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as extensions for purposes of the applet or application. The URLs in the Class-Path
header are given relative to the URL of the JAR file of the applet or application. For more details, see the link shown below:
http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html
V.V. -
When I created a jar file with the -m option to insert a list of Name headers in my manifest file, only the last one in the list shows up in the manifest file when I unjar it. What am I doing wrong?
i have used
jar command it takes whatever specified in your own manifest information file into the meta-inf 's manifest file
use jar -cvfm jarfile.jar maniinfofile.txt files.*
hope it helps !! -
How to use manifest file to indicate the entry class?
I am trying to package all my class files together and let the users to run my file using the following command line:
java -jar program.jar
For this purpose, I need to specify the main class in the manifest file. I create the manifest file as below:
Manifest-Version: 1.0
Created-By: 1.3.0 (Sun Microsystems Inc.)
Main-Class: classname
and include it in the same directory as my class file. then I jar all the files using:
jar cvmf manifest.mf program.jar *.*
However ,when I try to run the program using:
java -jar program.jar, I get the error message:
Failed to load Main-Class manifest attribute from program.jar.
What have I done wrong? pls help!!! thanks a lotHi.
here one example:
Manifest-Version: 1.0
Main-Class: Solitaire.RunMe
Created-By: 1.3.0 (Sun Microsystems Inc.)
you may run it by : java -jar Solitaire.jar, or doubleclick over the Solitaire.jar
the main class is RunMe in package Solitaire.
so the complite path would be Solitaire.RunMe.
enother one
Manifest-Version: 1.0
Main-Class: RunMe.RunMe
Created-By: Forte for Java v. 1.0
you may run it by : java -jar Transmission.jar, or doubleclick over the Transmission.jar
the main class is RunMe in package RunMe.
so the complite path would be RunMe.RunMe. -
Adding manifests to Jar files using different versions
I have been using the following to add a manifest pointer to my main class called JTiming
C:\jdk1.1.8\bin\jar cmfv MyMainClass.txt JTiming.jar *
and it works a treat, when I unjar the jar and look at the manifest file it includes the pointer to JTiming and lists each file jarred. When I try it with JDK1.3.1 or JDK1.4.1 jar.exe's they both fail to create the correct manifest entries. I can't see any notice of a change to the command line ooptions for the jar.exe's for these newer versions what am I missing?You seem to misunderstand - if you look at the command line I wrote in my original posting, I do exactly what you suggest!! I am able to include a reference to my starting class, my problem is that I appear to be able to get my own manifest inclusion using 1.1.8 jar.exe, but not using the jar.exe from 1.3.1 or 1.4.0
-
Help using manifest file classpath.
I have a jar file (A) that is dependant on another jar file (B). When I run my app, which references jar A, if it doesn't also include jar B in its class path I get an error referencing jar B (as expected)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
But if I add the following to jar A's manifest file:
Class-Path: E:\commons-io-1.1.jar
if get an error referencing jar A
java.lang.NoClassDefFoundError: utilities/gui/ExitApplicationProducerOk, now I have "Class-Path: .\commons-io-1.1.jar"...That's still Windows-specific. If you want it to be relative to the referring jar, then simply specify commons-io-1.1.jar without the windows-specific path notation prefixing it.
-
Using Manifest File in PowerBuilder 5
Hi,
We are working in an old project which was developed in PowerBuilder 5.0,
We followed the below steps to get the list of DLL and OCX getting register with our Application
1. Searched in application installation path.
2. Searched in source code.
Is there any other way to get the list of components and reference list?
We need the above list to create manifest file.
We have another big challenge that whether Manifest file is work with PB5 or not? If yes,how to make PB5 app to communicate with manifest?
Please help...
Thanks,
SundarRoland,
Please help me to find third party DLL and mention the DLLs to be register.
I hope that the below dlls are related to PowerBuilder 5.0 and need not to register
Pbbgr050.dll, Pbdbt050.dll, Pbdwe050.dll, Pbodb050.dll, Pbroi050.dll, Pbrtc050.dll, Pbrte050.dll, Pbrtf050.dll, Pbshr050.dll, Pbtyp050.dll
I have doubt on following DLLs and ocx
msvcrt.dll, MSVCRT40.dll, OLEPRO32.dll, Pfccom32.dll, CTDATE32.ocx
Please confirm above 4 DLLs and 1 OCX are need to register?
Thanks,
Sundar -
How to use Class-Path in Manifest file
hi,
I want to add jar files in another executable jar file but the Class-Path in Manifest file is not set correctly,please give an example for setting a Class-Path attribute in Manifest class.
regards,
selvarajYou looked into the Jar section of the Sun tutorial did you?
-
Web Service tutorial using NetBeans 5.5 fails on OS X Tiger
I have tried doing this tutorial using NetBeans 5.5 with the Enterprise Pack and Visual Web extensions installed. I am able to get it to run fine on my WinXP machine configured with the same NetBeans 5.5 stuff as the Mac. I have tried it several times always with the same result. Any insight that you can provide will be greatly appreciated.
The tutorial is located: http://www.netbeans.org/kb/55/websvc-jax-ws.html
Below is what is being returned in the Output window upon Run:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
Copying 4 files to /Users/bob/Programming/CalculatorWSApplication/build/web
library-inclusion-in-archive:
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
library-inclusion-in-manifest:
Compiling 1 source file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
wsgen-init-nonJSR109:
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/generated/wsgen/service
wsgen-CalculatorWS-nonJSR109:
Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.NoSuchMethodError: com.sun.codemodel.JCodeModel._class(Ljava/lang/String;Lcom/sun/codemodel/ClassType;)Lcom/sun/codemodel/JDefinedClass;
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.getCMClass(WebServiceWrapperGenerator.java:446)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:256)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:141)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:468)
at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:406)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:361)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:115)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:167)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
at com.sun.tools.apt.main.Main.compile(Main.java:1075)
at com.sun.tools.apt.main.Main.compile(Main.java:938)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
error: compilation failed, errors should have been reported
wsgen-generate-nonJSR109:
compile:
compile-jsps:
Created dir: /Users/bob/Programming/CalculatorWSApplication/dist
Building jar: /Users/bob/Programming/CalculatorWSApplication/dist/CalculatorWSApplication.war
do-dist:
dist:
Incrementally deploying http://localhost:8084/CalculatorWSApplication
Completed incremental distribution of http://localhost:8084/CalculatorWSApplication
Incrementally redeploying http://localhost:8084/CalculatorWSApplication
deploy?config=file:/tmp/context18085.xml&path=/CalculatorWSApplication
OK - Deployed application at context path /CalculatorWSApplication
run-deploy:
Browsing: http://localhost:8084/CalculatorWSApplication/CalculatorWS?Tester
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 1 second)This problem gets solved if you do NOT provide the Java path to the installer.
e.g.
if you have Java in /usr//bin/java
make sure your PATH does not have /usr/bin....
so basically which java throw error....Then provide the JRE PATH in oraparam.ini for the installer to start ...
Give it a try...
Karurkar -
Creating an exacutable jar file in netbeans
Hey, how can i create an exacutable jar file in netbeans ?
i guess you already have a project created, if you don't create a new java application project.
Then you need to do the following:
1. Set the main class. This is the class that will run first.
for this you need to right click in the project node, select properties, then run and in the Main Class field put the main class.
2. Set the classpath: you need to put all the libraries or resources you use in your project.
to do that right click the libraries node, select properties, then add library and add all the libraries that your project needs
by doing this steps netbeans will create your manifest file and the jar that will create will be executable.
Hope this helps.
Escobar5
Maybe you are looking for
-
Invoke IDOC ORDCHG whenenver credit block of sales order is released.
Hi All, Scenario : In the business process, whenever a sales order is created then a Purchase Order is created. And then an outbound ORDERS03 IDOC gets created. Now if the Sales Order is on credit block then a custom segment is dynamically created an
-
Not able to logging in DAC 11g, throws "Security Key is invalid or unavailable"
Hi Friends, I installed DAC 11g in Linux (Installed in Windows and moved it to Linux and configured). It was working fine and sometimes it throws "Security Key is invalid or unavailable". I updated the DAC Repository schema details using standaloneSe
-
've gotten 60 or 70 messages that that my iCloud doesn't work and to select preferences. The message says I will get an email to verify but I never get an email. I've checked old email, blocked email, and have low filters on emails. Any ideas?
-
How to connect on distance to airport extreme
I cant connect in the office to my airport extreme @ home. What sould I do?
-
How can I change the gui language to german? I can use the german gui in my sql developer version 1.5. If I update the version 1.5 to 1.5.1 through the "Check for Updates" button, the gui is still displayed in german language. If I download the sql d