James Howerton

Ranch Hand
+ Follow
since Mar 14, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by James Howerton

If I post a question 4 days to a week ago and don't get an answer .What there some problem with asking it here.
that is stupid and don't waste my time with your stupid warnings.
take me off this stupid site.
14 years ago




I have another program 'Guitar Master'.I need to create this .jar gm.jar. and make it
executable.
then put this gm.jar inside the package of of 'Guitar Master' program. I have to be able to run the program when the client puts the disk in thier computer (not sure yet) I am having trouble understanding how to run any program outside of netbeans.

but if the program runs its first job is to take the gm.jar and put it on the clients
C:\ in the folder the program already creates. Also, it should create or put an icon on the
desktop so as to run the gm.jar .exe (pending).

The 'Guitar Master' program itself runs good. In need to install it.

[b]using the command line-not java[/b]
the command below deminstates that using the command line does almost the same
thing. It just creates a .jar of something ?? found in the program package and
creates and puts a gm.jar on the C:\ in the gmFolders dir as planned.

[b]this is the command and resultS:[/b]
[code][

C:\Program Files\Java\jdk1.6.0_11\bin>jar -cvmf C:\Users\depot\Documents\ceyesum
ma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_mast
er\guitar_master\build\classes\view\myManifest.txt C:\Users\depot\.gmFolders\gm.
jar C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_proj
ect\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.cla
ss
added manifest
adding: C:/Users/depot/Documents/ceyesumma/java_cache/my_projects/guitar_master_
project/target_guitar_master/guitar_master/guitar_master/build/classes/view/Main
.class(in = 944) (out= 584)(deflated 38%)

C:\Program Files\Java\jdk1.6.0_11\bin>jar -cvmf C:\Users\depot\Documents\ceyesum
ma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_mast
er\guitar_master\build\classes\view\myManifest.txt C:\Users\depot\.gmFolders\gm.
jar C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_proj
ect\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.cla
ss
[b]added manifest[/b]
adding: C:/Users/depot/Documents/ceyesumma/java_cache/my_projects/guitar_master_
project/target_guitar_master/guitar_master/guitar_master/build/classes/view/Main
.class(in = 944) (out= 584)(deflated 38%)

C:\Program Files\Java\jdk1.6.0_11\bin>
[/code]



Whether or not this is even close my main concern is that the jar created
is not executable it finds the myManifest.txt but can not load the attribute

[code]

Failed to load Main-Class.mnifest attribute from
C:\Users\depot\.gmFolders\gm.jar

[/code]

[b]the Main.class and the myManifest.txt are in the same folder[/b]
[code]
//////////

//////////
path to dest
//////////
C:\Users\depot\.gmFolders\gm.jar

//////////
path to myManifest.txt
////////////

C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_master\guitar_master\build\classes\view\myManifest.txt

////////
path to classes
///////////
////
C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.class

///////

[/code]

[b]myManifest.txt[/b]
[code]

Main-Class: Main
[/code]
14 years ago
JDesktop:JInternalFrame out of scope
/////////////////////////////////////////
Hello;
I Have a JDesktopPane that opens with a x frame (JInternalFrame)wit
a JMenuBar and 11 JTabbedPanels .produced by x.class.I click the menuItem to produce z.frame using x.class
a new JInternalFrame with 4 tabbedPanels on it again produced by x.class.
Now I click on x.frame and try to again use the menuBar and
x.frame is out of scope the menuItem clicked tries to perform its actionPerformed
using the InternalFrame with 4 tabs instead of the intended 11 tabbed JInternalFrame.

Is there a standard for requesting scope or fireing InternalFrame events or validation of which frame is
enabled?
Thanks
error

14 years ago
////////////////////////////////////////////////
moving a .jar to sys dir
//////////////////////////////////////////
Hello;
I can make a .jar from my program and move it to a folder in my project
The Command to make the -cmf (non runnable) .jar
works fine by adding the .jar to a folder in my project.
but my question is:
what do I have to do to create that .jar if it originated on
a disk drive and write it to a dir I have created on the hard drive?
is there some code to add a icon to the desktop too?

thanks
14 years ago
/////////////////////////////////////////////
make .jar runnable
//////////////////////////////////////////
Hello;
I can make a .jar from my program and move it to a folder in my progject but I would like to make
it runnable. So I have shown the Command to make the -cmf (non runnable) .jar that
works fine.
I will show the myManifest for the -cvmf (runnable) command but it will not load
the attribute from schoolofdb.jar.

I thought the attribute would be found in the myManifest.mf shown below.
the schoolofdb.jar is created as before but not runnabale. please find the error
stated below.

thanks
working -cmf command works fine

-cmvf command will not load

above 3 params



b]myManifest.mf this is the only thing in the myManifest[/b]



b]error when trying to click the schoolofdb.jar created using -cvmf [/b]
14 years ago
Hello
Could someone find the missing code needed to render the table?
error:



AdminPanel.java GUI to add table


ConnectAdminDAO()
public int rst=ResultSet.TYPE_SCROLL_INSENSITIVE;
public int cro=ResultSet.CONCUR_READ_ONLY;
public int tsi=ResultSet.TYPE_SCROLL_INSENSITIVE;



Hello
I am trying to use the loadFromXML() load a properties file and

I don't understand the example because it is not reconizing the

dtd.
Is the example I am using wrong?


[code]public static void main(String[] args) throws

IOException,
FileNotFoundException, PropertyVetoException,

ProfileException, LoginException {
LoadXMLProperties lp =new LoadXMLProperties();
lp.loadXML("ModelResources_1.properties");
DerbyDAOFactory ddf =new DerbyDAOFactory();
ddf.buildDB();
createJDesktopPane();
XMLReaderComboBox rc = new XMLReaderComboBox();
} [/code]



[code]package model.dao;


import java.util.*;
import java.io.*;
import java.io.FileNotFoundException;
import java.io.IOException;


/**
*
* @author depot
*/
public class LoadXMLProperties {
public LoadXMLProperties(){

}
public void loadXML(String path) throws FileNotFoundException,

IOException{
Properties prop=new Properties();
FileInputStream fis=new FileInputStream(path);

prop.loadFromXML(fis);
prop.list(System.out);
System.out.println("\nThe XML property:

"+prop.getProperty("foo"));
}
}[/code]



[b]ModelResources_1.properties in XML format[/b]

[code]<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE properties SYSTEM "properties.dtd">
<properties>
<comment>Hi</comment>
<entry key="foo">bar</entry>
<entry key="fu">bar</entry>
</properties>[/code]



[b]properties.dtd[/b]

[code]<!ELEMENT properties ( comment?, entry* ) >
<!ATTLIST properties version CDATA #FIXED "1.0">
<!ELEMENT comment (#PCDATA)>
<!ELEMENT entry (#PCDATA)>
<!ATTLIST entry key CDATA #REQUIRED>
[/code]


[b]Error[/b]

[code]run:
Exception in thread "main"

java.util.InvalidPropertiesFormatException:

org.xml.sax.SAXException: Invalid system identifier:

file:///C:/Users/depot/Documents/ceyesumma/java_cache/my_project

s/schooldb_project/target_schooldb/schooldb/schoolofdb/propertie

s.dtd
at java.util.XMLUtils.load(XMLUtils.java:59)
at java.util.Properties.loadFromXML(Properties.java:852)
at

model.dao.LoadXMLProperties.loadXML(LoadXMLProperties.java:27)
at view.Main.main(Main.java:36)
Caused by: org.xml.sax.SAXException: Invalid system identifier:

file:///C:/Users/depot/Documents/ceyesumma/java_cache/my_project

s/schooldb_project/target_schooldb/schooldb/schoolofdb/propertie

s.dtd
at

java.util.XMLUtils$Resolver.resolveEntity(XMLUtils.java:174)
at

com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.re

solveEntity(EntityResolverWrapper.java:107)
at

com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolve

EntityAsPerStax(XMLEntityManager.java:1018)
at

com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$D

TDDriver.dispatch(XMLDocumentScannerImpl.java:1190)
at

com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$D

TDDriver.next(XMLDocumentScannerImpl.java:1089)
at

com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$P

rologDriver.next(XMLDocumentScannerImpl.java:1002)
at

com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.n

ext(XMLDocumentScannerImpl.java:648)
at

com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScann

erImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at

com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa

rse(XML11Configuration.java:807)
at

com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa

rse(XML11Configuration.java:737)
at

com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLPa

rser.java:107)
at

com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMPa

rser.java:225)
at

com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.pars

e(DocumentBuilderImpl.java:283)
at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:85)
at java.util.XMLUtils.load(XMLUtils.java:57)
... 3 more
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)[/code]


Thanks
Thanks
In MySQL it seems to can read the primary key like that but I used the alternative and it passed. Thanks for explaining how that error was working I didn't to count the characters to find the error.
Could someone look at my Statement stmt? is this error due to improper string creation?
Thanks












[moderator fixed BB Codes in this post]
Well I got the siblings I need but need a good method to produce the text node. Is there a standard method for this?

Could someone tell me what has to be changed to get the element name and text of my targetElement?

I just get

internal frame openFrameCount= 1
start obj() type= guide
cmaj
name: null value: null
name: null value: null
name: null value: null
cmaj
name: null value: null
name: null value: null
name: null value: null

What do I need to learn to stop on a certain element which this class can do. But I would like to work with the children of the element is finds?

The original question was an attempt to understand objects. The solution had nothing to do with getters or setters or nameing conventions. Now ,I am posting the actual solution. My showKey() needed to set the textFields of the object that was created originally. Any further information "Dealing with Object" is welcome. I hope this will help someone understand OOP a little better.
Thanks again.


[code]
public void fillSetters(KeyCards kc) {
// sets all textfields
showKey(kc);
}

public void showKey(KeyCards kc){
System.out.println("showKey sets all textfields");
kc.sigTxt.setText(strSigTxt);
kc.relaToneTxt.setText(strRelaToneTxt);
kc.paraToneTxt.setText(strParaToneTxt);
kc.relaSigTxt.setText(strRelaSigTxt);
kc.paraSigTxt.setText(strParaSigTxt);
kc.majTxt.setText(strMajTxt);
kc.iTxt.setText(strITxt);
kc.ivTxt.setText(strIVTxt);
kc.viiDDTxt.setText(strVIIDDTxt);
kc.iiiTxt.setText(strIIITxt);
kc.viTxt.setText(strVITxt);
kc.iiTxt.setText(strIITxt);
kc.vTxt.setText(strVTxt);

//textfield relamin
kc.relaMinTxt.setText(strRelaMinTxt);
kc.iRelaTxt.setText(strIRelaTxt);
kc.ivRelaTxt.setText(strIVRelaTxt);
kc.viiDDRelaTxt.setText(strVIIDDRelaTxt);
kc.iiiAugRelaTxt.setText(strIIIAugRelaTxt);
kc.viRelaTxt.setText(strVIRelaTxt);
kc.iiDDRelaTxt.setText(strIIDDRelaTxt);
kc.vRelaTxt.setText(strVRelaTxt);
//texfield paramin
kc.paraMinTxt.setText(strParaMinTxt);
kc.iParaTxt.setText(strIParaTxt);
kc.ivParaTxt.setText(strIVParaTxt);
kc.viiDDParaTxt.setText(strVIIDDParaTxt);
kc.iiiAugParaTxt.setText(strIIIAugParaTxt);
kc.viParaTxt.setText(strVIParaTxt);
kc.iiDDParaTxt.setText(strIIDDParaTxt);
kc.vParaTxt.setText(strVParaTxt);

//appegio==========================
// amajTxt.setText(");
kc.aITxt.setText(strAITxt);
kc.aIVTxt.setText(strAIVTxt);
kc.aVIIDDTxt.setText(strAVIIDDTxt);
kc.aIIITxt.setText(strAIIITxt);
kc.aVITxt.setText(strAVITxt);
kc.aIITxt.setText(strAIITxt);
kc.aVTxt.setText(strAVTxt);

//arelaMinTxt.setText(");
kc.rAITxt.setText(strRAITxt);
kc.rAIVTxt.setText(strRAIVTxt);
kc.rAVIIDDTxt.setText(strRAVIIDDTxt);
kc.rAIIIAugTxt.setText(strRAIIIAugTxt);
kc.rAVITxt.setText(strRAVITxt);
kc.rAIIDDTxt.setText(strRAIIDDTxt);
kc.rAVTxt.setText(strRAVTxt);
//Car. aparamin);
kc.pAITxt.setText(strPAITxt);
kc.pAIVTxt.setText(strPAIVTxt);
kc.pAVIIDDTxt.setText(strPAVIIDDTxt);
kc.pAIIIAugTxt.setText(strPAIIIAugTxt);
kc.pAVITxt.setText(strPAVITxt);
kc.pAIIDDTxt.setText(strPAIIDDTxt);
kc.pAVTxt.setText(strPAVTxt);

}

[/code]
15 years ago
Ok then the setters originally shown show the minimum amount of code because they have all the correct Strings in the variables and they are to set text fields in a class that has textfields that are already created. But nothing goes in the text field.

public void showKey() {

System.out.println("showKey sets all textfields");
sigTxt = new JTextField();
sigTxt.setText(strSigTxt);
relaToneTxt = new JTextField();
relaToneTxt.setText(strRelaToneTxt);
paraToneTxt = new JTextField();
paraToneTxt.setText(strParaToneTxt);
relaSigTxt = new JTextField();
relaSigTxt.setText(strRelaSigTxt);
paraSigTxt = new JTextField();
paraSigTxt.setText(strParaSigTxt);
majTxt = new JTextField();
majTxt.setText(strMajTxt);
iTxt = new JTextField();
iTxt.setText(strITxt);
ivTxt = new JTextField();
ivTxt.setText(strIVTxt);
viiDDTxt = new JTextField();
viiDDTxt.setText(strVIIDDTxt);
iiiTxt = new JTextField();
iiiTxt.setText(strIIITxt);
viTxt = new JTextField();
viTxt.setText(strVITxt);
iiTxt = new JTextField();
iiTxt.setText(strIITxt);
vTxt = new JTextField();
vTxt.setText(strVTxt);

//textfield relamin
relaMinTxt = new JTextField();
relaMinTxt.setText(strRelaMinTxt);
iRelaTxt = new JTextField();
iRelaTxt.setText(strIRelaTxt);
ivRelaTxt = new JTextField();
ivRelaTxt.setText(strIVRelaTxt);
viiDDRelaTxt = new JTextField();
viiDDRelaTxt.setText(strVIIDDRelaTxt);
iiiAugRelaTxt = new JTextField();
iiiAugRelaTxt.setText(strIIIAugRelaTxt);
viRelaTxt = new JTextField();
viRelaTxt.setText(strVIRelaTxt);
iiDDRelaTxt = new JTextField();
iiDDRelaTxt.setText(strIIDDRelaTxt);
vRelaTxt = new JTextField();
vRelaTxt.setText(strVRelaTxt);
//texfield paramin
paraMinTxt = new JTextField();
paraMinTxt.setText(strParaMinTxt);
iParaTxt = new JTextField();
iParaTxt.setText(strIParaTxt);
ivParaTxt = new JTextField();
ivParaTxt.setText(strIVParaTxt);
viiDDParaTxt = new JTextField();
viiDDParaTxt.setText(strVIIDDParaTxt);
iiiAugParaTxt = new JTextField();
iiiAugParaTxt.setText(strIIIAugParaTxt);
viParaTxt = new JTextField();
viParaTxt.setText(strVIParaTxt);
iiDDParaTxt = new JTextField();
iiDDParaTxt.setText(strIIDDParaTxt);
vParaTxt = new JTextField();
vParaTxt.setText(strVParaTxt);

//appegio==========================
// amajTxt.setText(");
aITxt = new JTextField();
aITxt.setText(strAITxt);
aIVTxt = new JTextField();
aIVTxt.setText(strAIVTxt);
aVIIDDTxt = new JTextField();
aVIIDDTxt.setText(strAVIIDDTxt);
aIIITxt = new JTextField();
aIIITxt.setText(strAIIITxt);
aVITxt = new JTextField();
aVITxt.setText(strAVITxt);
aIITxt = new JTextField();
aIITxt.setText(strAIITxt);
aVTxt = new JTextField();
aVTxt.setText(strAVTxt);

//arelaMinTxt.setText(");
rAITxt = new JTextField();
rAITxt.setText(strRAITxt);
rAIVTxt = new JTextField();
rAIVTxt.setText(strRAIVTxt);
rAVIIDDTxt = new JTextField();
rAVIIDDTxt.setText(strRAVIIDDTxt);
rAIIIAugTxt = new JTextField();
rAIIIAugTxt.setText(strRAIIIAugTxt);
rAVITxt = new JTextField();
rAVITxt.setText(strRAVITxt);
rAIIDDTxt = new JTextField();
rAIIDDTxt.setText(strRAIIDDTxt);
rAVTxt = new JTextField();
rAVTxt.setText(strRAVTxt);
//Car. aparamin);
pAITxt = new JTextField();
pAITxt.setText(strPAITxt);
pAIVTxt = new JTextField();
pAIVTxt.setText(strPAIVTxt);
pAVIIDDTxt = new JTextField();
pAVIIDDTxt.setText(strPAVIIDDTxt);
pAIIIAugTxt = new JTextField();
pAIIIAugTxt.setText(strPAIIIAugTxt);
pAVITxt = new JTextField();
pAVITxt.setText(strPAVITxt);
pAIIDDTxt = new JTextField();
pAIIDDTxt.setText(strPAIIDDTxt);
pAVTxt = new JTextField();
pAVTxt.setText(strPAVTxt);

}

and the textfield names are all correct and use the proper conventions for getters and setters. they are in a system that describes 6 0r 7 word descriptions. You mentioned Hungarian notation. What does this mean?
how would you write variable names that describe one of 51 description prhases
pAIIDDTxt=Parallel key,arpeggio, supertonic, fully diminished chord text?

is there a better way to write this varaible?
15 years ago
Yes I understand that and I apologize but the last thing to post is the GUI keycard.java. I will attach it. However I guess I was expecting that I could not set text field on the class if it was already created. I've just never used extends to do this. The keycads.java is just panels and JTextfields and a combo box but it is very long. it used to have a 1000 line switch in it but I have been learning Dom and JDom so at least that is not there anymore. I will tell you that it used to work perfect with the swithch but it was time to learn XML

I can't attach it say no .zip , .java, .txt attchments what else is there? anyway I will post it if you want to see it but it too long to post unless you wamt tp weed through 900 lines of panels and JTextfields etc..
15 years ago