File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes can't run app outside Netbeans - (javafx - ejb - glassfish) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can Watch "can New topic

can't run app outside Netbeans - (javafx - ejb - glassfish)

roman kabiev

Joined: Aug 16, 2011
Posts: 1
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

full exception here -
source code of my application here - - There are 3 app - server ejb app, ejb interface and application client app - FlyWorkstation, what I try to run outside Netbeans.

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))
Thank you!
Roman Piks

Joined: Mar 03, 2013
Posts: 1
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)
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46375
Welcome to the Ranch Roman Piks
I agree. Here's the link:
subject: can't run app outside Netbeans - (javafx - ejb - glassfish)
It's not a secret anymore!