I am creating a .jar for a game I made. I'm not using any dev tools, just a DOS console call to java: %~dp0....javajdkinjar.exe -cfmv TheSwarm.jar manifest.txt *
My manifext.txt contains:
Main-Class: Game
But when I compile the jar, its manifest contains:
And I get an error about it not finding the main class. Shouldn't my Main-Class setting be added to the jar? I can manually rename it to .zip and edit the Manifest.MF but that is a huge pain when I'm testing the .jar file and regenerating it often.
I am trying to create executable jar file and I have test.mf file located in the dir from where jar cmd(JavaTest) is executed and also in dir which contains class files (jTest).
C:Users m2tDesktopJavaTest>jar cvfm JarTest4.jar test.mf jTest java.io.FileNotFoundException: test.mf (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.io.FileInputStream.<init>(FileInputStream.java:79) at sun.tools.jar.Main.run(Main.java:150)
[Code] .....
So how can Icreate manifest file and where shall I put it ?
I am trying to run a project and i am getting different errors, I know the code is working because i have seen it running, but now i cant even get the app to load up. sometime I get a AndroidManifest cannot be found error and sometimes i get a error like
My jar is running from local and when I put it in the network drive, it doesn't run.. shows this error
And it is working if I map my network drive.
Used ant build to generate jar.
this is the error I can see in command prompt jar is at the following location path oNetworkDrive oolsdevMyApp.jar
java.io.FileNotFoundException: path oNetworkDrive oolsdev oNetworkDrive oolsdevMyApp.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at com.javafx.main.Main.getJarAttributes(Main.java:447) at com.javafx.main.Main.main(Main.java:829)
I observed that the network drive path is duplicating.
If I try CLASSPATH: C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar I receive a "Could not find or load main class" error.
I have the following code. how can items be added to that list?
private List<IComponentNode> comp; interface IAAAView { // returns component with given code or null IComponentNode findComp(String a); // returns component with given renderer or null
I am trying to create a form where my customer can add some other fields(like: label,textbox), and he need to use that added fields for the next time he open the application...
I would like to know whether it is possible to save dynamically created controls and reuse it again...
I have a ace:dataTable which contains a variable number of columns. For this I use the c:forEach tag. All generated in the c:forEach are not displayed. In the sample, only columnLibelle and columnSum are displayed.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
I'm just a java beginner. I've spent a lot of time installing and configuring software. I'm using Netbeans 7.3 on Windows 7, 64 bit. Recently, I downloaded opencsv from sourceforge.
With no previous experience adding libraries, I read a blog post on adding the library. I think that I then:
Start a new project.
Right click on libraries
Add jar/folder
Gave the temporary path to the .jar file
After, I read the blog post again, and realized I'd missed it. This time I did:
Right click library, Add library, Create library
However, I kept getting a message that the same library already existed. If I do the first process above, I will find the same library.
However, I see no way in Netbeans to remove it. I've deleted the test projects. And started a new one. But the library now exists for all projects it seems.
I've grepped all the files under the Netbean directory, searching for "opencsv", but found nothing. The only things in the Windows registry were locations of files.
How can I delete this library permanently from Netbeans? Short of, uninstall, then reinstall? Is there a way to list all the libraries that Netbeans has?
Here is my full program, you can find these lines of code on lines 64 and 70.
Java Code:
import java.util.Scanner; public class StockTransaction { public static void main(String[] args) { // TODO Auto-generated method stub //Variable Declaration Section
My panel named panelIncomeInfo are not showing the components that I have added.
public class PayrollGUI { private JPanel panelIncomeInfo = new JPanel (); private JPanel panel = new JPanel (); private JPanel panelPayCheckInfo = new JPanel (); private JButton close = new JButton ("Close");
The following alert returns an added string instead of adding the var together to give me a total?
var tvHours = prompt('How many hours of Tv do you watch last week?'); var webHours = prompt('How many hours of internet surfing did you do last week?'); var gameHours = prompt('How many hours of video games did you play last week?'); alert(tvHours + webHours + gameHours);
Also can you store a var in an alert? e.g ( var time = alert(tvHours + webHours + gameHours); ???
I have a .jar that is installed in other computer(outside netbeans). Everything works fine except with report. I am sure the libraries needed for iReport is added in my lib folder but I receive this error message when I to load the report using the program.I use command prompt to see the error:
Java Code:
java -jar projCosting.jar mh_sh_highlight_all('java'); And here is the error message: Java Code: net.sf.jasperreports.engine.JRException: Error compiling report java source files : [b]D:CostingRptCosting_1288072391310_955208.java[/b] at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses
[code]....
I have included the library in lib folder but do you think I have to install the iReport application?
I am adding JLabels to my JPanel, and the last one always does not show up. For example if I add 3 JLabels, the 3rd will not show up. If i change it to add 4, the 4th will not show up, but the 3rd will now. Here is a snipit of what my code looks like:
A workaround that I DO NOT want to keep doing is to put an extra fake JLabel at the end of the for loop, that way everything I want to show up does, but the fake one does not.
I have been playing around all day trying to get this to increase the value of number by one after each new runner is added. How to get the value of number to increase after each record is added?
public class Runner { /* static variables */ /* instance variables */ private int number; // runner's number private String name; // runner's name private String ageGroup; // standard, junior or senior private int time; // runner's marathon time in minutes
On jsp page i have created table with dynamically added rows now i want to insert the data from dynamic row field into database. How would I get the ids of those dynamically created rows to insert into database using hibernate.
I am new to java and during my classes we built a basic calculator. I want to extend my calculator and added function to square numbers.Here is my program:
In the code below, under calculations, I have x=totalPrice+xXxXxX. Obviously the x's were just place holders, but I wanted to know if there was any way to add something there so the program would tally the totalPrice, store it in the x variable outside the loop, so when the loop ended it would display the total price from all the loops added together where I have System.out.println("TOTAL OF ALL ORDERS: $"+ round.format(x)); at the very end.
Java Code:
import java.util.Scanner; import java.text.DecimalFormat; public class ModifyOrderV2TEST { public static void main(String [] args) { //Rounding DecimalFormat round = new DecimalFormat("0.00");
I'm trying to develop a system for test cases so that whenever a test case is added to a particular package it will automatically be included in testing without having to manually add that particular test case. What is the best way to achieve this? Should I use java reflection? I'm just getting started with Jenkins and trying to configure Selenium test cases.
I am unable to clear disappear the background of .png image added in a translucent JPanel. I have tried it using JLabel but the image added is with white background. How can i get rid of this white background...
import javax.swing.*; import java.util.*; import java.awt.*; public class HomePage { JFrame frame; JPanel pnl1, pnl2, pnl3; JLabel lbl;
I have a JPanel that's using a simple GridBagLayout.
JPanel panel = new JPanel(); GridBagLayout qPanelLayout = new GridBagLayout(); qPanelLayout.columnWidths = new int[] { 0 }; qPanelLayout.rowHeights = new int[] { 0 }; qPanelLayout.columnWeights = new double[] { Double.MIN_VALUE }; qPanelLayout.rowWeights = new double[] { 0.0 }; panel.setLayout(qPanelLayout); componentCount = 0;
Based on user input I am adding sub-panels to the panel. These sub-panels may vary in height. They take up the full width of the Panel.
public void add(Component comp) { GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(2,2,2,2); gbc.gridx = 0; gbc.gridy = componentCount++; panel.add(comp, gbc_questionPane1); }
The odd behaviour I'm seeing is that if the height of the new sub-panel I'm adding is less than the height of the largest sub-panel currently displayed then the main panel does not repaint. If its height is equal or greater then the Panel does repaint, and any sub-panels that were added but not visible before are now painted. What have I missed?