Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

One source file used in multiple projects?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 Belgium   Members   

123
Like
0Likes
Like

Posted 20 January 2012 - 02:19 PM

Hi,

I've written a few classes in java which are useful in multiple projects. Unfortunately, without copy/pasting them I haven't been able to figure out how to use the classes in multiple projects.

In C++ I would just include the .h file and make sure the compiler knew where to look for it.

However, using Netbeans for my Java, I receive a "Package Folder Already Used in Project" message. How can I have just one source file but use it in multiple projects?

Thanks

#2 way2lazy2care   Members   

786
Like
1Likes
Like

Posted 20 January 2012 - 03:43 PM

Hi,

I've written a few classes in java which are useful in multiple projects. Unfortunately, without copy/pasting them I haven't been able to figure out how to use the classes in multiple projects.

In C++ I would just include the .h file and make sure the compiler knew where to look for it.

However, using Netbeans for my Java, I receive a "Package Folder Already Used in Project" message. How can I have just one source file but use it in multiple projects?

Thanks

stick it in a jar.

#3 Belgium   Members   

123
Like
0Likes
Like

Posted 20 January 2012 - 04:14 PM

stick it in a jar.


Thanks. That does the trick.

#4 szigeti_roland   Members   

96
Like
0Likes
Like

Posted 20 January 2012 - 07:26 PM

C# is way easier, there's a button wher you can link it. in VStudio.

#5 Danny02   Members   

279
Like
0Likes
Like

Posted 23 January 2012 - 07:43 AM

C# is way easier, there's a button wher you can link it. in VStudio.

this has nothing todo with the language.


In Netbeans u can set another project as a dependencie.(project->preferences->libarys->add project)




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.