My app uses docx4J, XStream, and also uses an image on the start page. I placed all of this external libraries in Java Buid Path and in Eclipse it all works well but when I export all data to runnable jar file it doesn't work.
How does one use java.util.jar.JarOutputStream to create a jar file on button press? This new jar file, I want to make it runnable so it performs a specific action on run..
To deploy my project into %TOMCAT_HOME%webapps folder. Right click on Project ->Export-> War File Project Name: Hello Destination: D:Program FilesApache Software FoundationTomcat 6.0webappsHello.war
Result found in web browser:
HTTP Status 404 - /Hello/first And Hello.war file is not found in webapps folder too after exporting as .war. I am using Apache tomcat 6.0.37, eclipse 3.7.2 release, tomcat plugin :com.sysdeo.eclipse.tomcat_3.3.0
I have attached a picture. I am struggling to understand one of the errors. It says it requires an int and a string. I have put a number in but I don't understand the string part!
I wanted to create a simple window with the LWJGL and a key input request which closes the window.I also wanted to create the classes in seperated packages, so it's more organized.The window displays but if I press that certain key nothing happens.Here is the Main class:
package bb.main; import bb.input.Input; import bb.main.render.SimpleRenderer; public class Main { public static void main(String[] args){ SimpleRenderer createWindow = new SimpleRenderer(); Inputinput= new Input();
I wanted to use 16x16 pixel images in my game to make it look more "pixely", but the images get really blurry when they're rendered. How do I make them clearer?
Java Code:
import static org.lwjgl.opengl.GL11.*; import org.lwjgl.opengl.*; import org.lwjgl.*; import org.lwjgl.input.Mouse; import org.lwjgl.input.Keyboard; import org.newdawn.slick.opengl.Texture; import org.newdawn.slick.opengl.TextureLoader; import java.io.*; public class Test{ int DISPLAY_WIDTH = 1000, DISPLAY_HEIGHT = 500;
I'm looking for a working example of shadow mapping with java code using shaders. There are so many c++ or c tutorials out there but i haven't managed to rewrite them since I'm too bad in c/c++. I've been trying to implement this a long time but can't get the hang of it. Any example out there? Preferably as sstripped down as possible except for the shadow mapping.
I've recently started programming with lwjgl, playing around with some 3D graphics. I've built a house and now I'm trying to render a view looking straight onto the center of the roof, but with current configuration it's slightly off.
As you can see in the image the edges on the roof aren't perfetly straight which would be the case if I was looking straight to the center from a point on the roof normal vector. I'm using gluLookAt to get the view, using the following code:
I am doing a homework assignment and I am clueless as to what I did wrong or supposed to do in terms of placement of coding. If someone could dumb down their response and tell me what I did wrong
This is what I supposed to do:
1.) Type the following shell for the class:
public class ParadiseInfo { }
2.) Between curly braces of the class, indent a few spaces and create the shell for the main() method:
public static void main(String[] args) { }
3.) Between the braces of the main()Method, insert a call to the displayInfo() method:
displayInfo();
4.) Place the displayInfo() method outside of the main() method, just before the closing curly brace for the ParadiseInfo class:
public static void displayInfo() { system.out.println ("Paradise Day Spa wants to pamper you."); system.out.println ("We will make you look good."); }
This is what I attempted to do: I know it is wrong I am just clueless on where to put the code and why
public class ParadiseInfo { displayInfo(); public static void main(String[] args) { public static void displayInfo(); } system.out.println("Paradise Day Spa wants to pamper you."); system.out.println("We will make you look good."); }
--- Update ---
I have also tried this:
public class ParadiseInfo { displayInfo(); public static void main(String[] args) { } public static void displayInfo(); {
[Code]...
The very last attempt I only ended up with one error which is:
I want to make several classes which extend different objects and add additional functions to simplify them and make their purpose in my projects more narrow and make their instances easier to use. So an example, Image class which extends BufferedImage and the constructor in Image class directly loads the file without having to create it first and then have to use Try Catch and all that additional code. Now, here is where my question comes in. Can I make an class, an abstract class or something which can be IMPLEMENTED into these several classes such as the Image class, and in doing so those several classes will have to have (like unimplemented methods) a HashMap<String key, ChildClass instance_as_value>, child class being the Image class as an example.
So I would have something like public class Image extends BufferedImage implements Library, and this class, because it implements Library will have a HashMap<String key, Image value> in it or it's parent class.
I am doing an assignment and I am clueless as to what I did wrong or supposed to do in terms of placement of coding.
This is what I supposed to do:
1.) Type the following shell for the class:
public class ParadiseInfo { }
2.) Between curly braces of the class, indent a few spaces and create the shell for the main() method:
public static void main(String[] args) { }
3.) Between the braces of the main()Method, insert a call to the displayInfo() method:
displayInfo();
4.) Place the displayInfo() method outside of the main() method, just before the closing curly brace for the ParadiseInfo class:
public static void displayInfo() { system.out.println ("Paradise Day Spa wants to pamper you."); system.out.println ("We will make you look good."); }
This is what I attempted to do:
I know it is wrong I am just clueless on where to put the code and why
public class ParadiseInfo { displayInfo(); public static void main(String[] args) { public static void displayInfo(); } system.out.println("Paradise Day Spa wants to pamper you."); system.out.println("We will make you look good."); }
--- Update ---
I also tried it this one and ended up with 1 error..
public class ParadiseInfo { displayInfo(); public static void main(String[] args) { } public static void displayInfo(); { system.out.println("Paradise Day Spa wants to pamper you."); system.out.println("We will make you look good."); } }
I have a JFrame with a button called "Start". The code behind the "Start" button triggers a function (startwork() ) that traverses through log files and then inserts rows into my JTable. If I call the startwork() function from the Start button action performed event, then when it inserts the rows to the JTable it is not immediately shown...
The code has to finish before the JTable is refreshed. However, if I run the startwork() function as soon as the JFrame is displayed (from the main() function) then I can see the Jtable being populated dynamically as it is inserting the rows.
How to allow the user to click on the START button and yet behave correctly to where the JTable is updated properly so that I can see the rows being inserted as it progresses.
@MappedSuperclass public abstract class BssStandardEntityLaravel extends BssStandardEntity implements InterfacciaBssStandardEntity, Cloneable{ private static final long serialVersionUID = 1L; @Column(name = "created_at", nullable=true) @Temporal(TemporalType.TIMESTAMP) protected Date created_at = new Date();
[Code] ....
When i try to read some data with a JPA controller, this error is raised:
Persistent class "com.bss.libbssabstract.database.entity.BssStandardEntityLaravel" has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. org.datanucleus.store.rdbms.exceptions.NoTableManagedException: Persistent class "com.bss.libbssabstract.database.entity.BssStandardEntityLaravel" has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class. at org.datanucleus.store.rdbms.RDBMSStoreManager.getDatastoreClass(RDBMSStoreManager.java:702)
[Code] ....
It requires BssStandardEntityLaravel table like a normal entity. I used the same entity package in other applications and it works perfectly. Why this error is raised?
how to export a full jsf page to PDF. In my jsf page, I have a button to export to PDF and some fields where I am retrieving the values from a database. The form is ready but I don't know how to program code or program a button to export the page to PDF. I tried to search for an easy and a standard way but unfortunately I didn't find any useful example or code.
How to export a full jsf page to PDF. In my jsf page, I have a button to export to PDF and some fields where I am retrieving the values from a database. The form is ready but I don't know how to program code or program a button to export the page to PDF.
I'm doing a project in JSP and Oracle..Here in my project there are two types of department.. Accounts and Sales.. Accounts department is able to download some pages to Excel format and it is working properly.. now in the sales they have to download in pdf format.. then only it is possible to send to the HO..now what they are doing is downloading the JSP page in excel format and converting to pdf manually using the Acrobat Printer.. is that possible to change to pdf format.. for converting to excel format.. i'm just using 2 linesand it is here
I'm making an import/export of xml - I have the import of xml sorted I'm just trying to finish off the export. My export class is called XmlWriter.java. Inside the class I have an updateFile method to update an xml file as such:
public void updateFile(Environment environment,Document doc) { // code }
I then in my main method have
public static void main(String argv[]){ //declare new object of class XmlWriter xmlWriter = new XmlWriter(); //test testUpdate method // xmlWriter.testUpdate(); Environment environment = ;
[code]....
I don't know what to make my variables equal to - eclipse keeps trying to use null but obviously that won't work. The Environment is another class that just contains getters and setters for the 3 different databases (that are in the xml file) and the getter/setter for the environment ID (also in xml file).
I am trying to export a DB record to an excel sheet. Below is the code which I tried. I am not getting any error but still only the first record of the table is getting inserted into the excel sheet. But when I try printing, I prints all the records. Below is the code I did to insert records.
I have a JSP and Java program which will read data from Excel and add them dynamically to create table.My requirement is i should able to edit the columns what ever the data that was fetched from Excel and export those contents to another excel file.This should happen on clicking a button, i mean to exporting the contents of the table.