This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can Watch "can New topic
Author

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

roman kabiev
Greenhorn

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
image


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
b/RemoveException"""
image

full exception here - http://dpaste.com/hold/595384/
source code of my application here - https://bitbucket.org/roma/flycenter/src - 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
Greenhorn

Joined: Mar 03, 2013
Posts: 1
Hi.
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
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Welcome to the Ranch Roman Piks
 
wood burning stoves
 
subject: can't run app outside Netbeans - (javafx - ejb - glassfish)
 
Similar Threads
Newb EE deployment / exec questions - app client - EJB class not found exception.
Starting Glassfish as an application server with MyEclipse
unable to find remote interface,shows exception of NoClassDefFoundError
Bundle lib in ejb jar doesn't deploy
Sample java EE application not running on netbeans PLESASE HELP.