This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hello guys! I'm absolutelly newby in Java, and looking for some help with ejb\glassfish\javafx.
I'm try to develop simple ejb application using javafx as client and javadb as database (and sample database "tours").
I downloaded netbeans 7, glassfish 3.1, javafx 2.0. After one day my fist application is finish - I ran them under Netbeans and they work fine - my application lunch the window with javafx tableview andshow me the flights grid from tours database. It was very fine moment ))
But when I try ran my app outside Netbeans I recive errors. This
Then I read a lot of forums and talks what google offer my by keywords "can't run app outside netbeans". In some times I got that I need to specify the classpath for used libs\jars.
I specify the libs, and run my app again.
"java -cp "C:\Users\afina\projects\flycenter\FlyRemoteInterface\dist\FlyRemoteInterface.jar;C:\Users\afina\projects\flycenter\FlyWorkstation\dist\FlyWorkstationClient.jar;C:\Program Files\glassfish-3.1.1\glassfish\lib\appserv-rt.jar;C:\Program Files\glassfish-3.1.1\glassfish\lib\javaee.jar;C:\Program Files\glassfish-3.1.1\glassfish\lib\gf-client.jar;C:\Users\afina\projectsfly\center\FlyWorkstation\dist\FlyWorkstation.jar"
My previous problem was solved, but I get new problem )
Java show me this - """Absent Code attribute in method that is not native or abstract in class file javax/ej
Maybe I have to specify some jar in classpath addinitially, but I don't know what exactly.
I spent a lot of times with Google, but find nothing explanation about this error..
I think a lot of guru-coders from Big Moose Saloon know what's that mean and what I have to do to solve this proplem. I will very happy if somebody give my an advice.
Sorry for my super-duper english and orthography))
I can advice to use appclient.exe from GlassFish "bin" directory.
I used it this way:
appclient -client my-client.jar
To run my project outside Netbeans i used these steps:
1. build the project (in the dist directory i get .ear file after it)
2. deploy received .ear to GlassFish (i copied it to "domains\domain1\autodeploy" in the GlassFish dir)
3. wait a couple of seconds (there has to appear new file (in the autodeploy dir) with the extension .ear_deployed)
4. in "domains\domain1\applications" .jar files will be created.
5. i used cmd to access this directory, then i used "appclient -client my-client.jar"
(if the .ear archive was built right then all the neccessary "jars" will be placed in the "applications" directory
and there haven't to be any errors about libraries and classpaths)